alma-linux-remote-plugin
Remote Linux management for Alma via SSH/SFTP with persistent stateful SSH sessions, thread-session binding, NL-to-command bridge, xterm.js websocket terminal bridge, dangerous-command approval flow, strict command policy option, host-key verification modes, RBAC allowlist, and SIEM-friendly redacted audit fields.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o alma-linux-remote-plugin.zip https://jpskill.com/download/9630.zip && unzip -o alma-linux-remote-plugin.zip && rm alma-linux-remote-plugin.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9630.zip -OutFile "$d\alma-linux-remote-plugin.zip"; Expand-Archive "$d\alma-linux-remote-plugin.zip" -DestinationPath $d -Force; ri "$d\alma-linux-remote-plugin.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
alma-linux-remote-plugin.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
alma-linux-remote-pluginフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Alma Linux Remote Plugin
Use this project to manage remote Linux hosts from Alma with safety controls.
Capabilities
- SSH connection test
- Single/batch command execution
- Primary tools:
run_command,run_batch - Compatibility aliases:
execute_command,execute_batch
- Primary tools:
- Upload/download files via SFTP
- Service status and journal logs
- Dangerous command protection:
- Manual approval workflow (
approval_id) - Operator RBAC allowlist (
approval.allowed_operators) - Optional one-time confirmation token mode
- Manual approval workflow (
- Command policy hardening:
policy.strict_policy=false(compatible mode)policy.strict_policy=true(normalized/token-level matching)
- Host key verification policy (
ssh.host_key_policy):known_hosts(RejectPolicy + optionalknown_hosts_required)reject(strict reject unknown hosts)auto_add(compatibility mode)
- Server profile docs:
- First remote access auto-creates
server_profiles/<IP>.md - Subsequent remote calls read this profile before connect
- First remote access auto-creates
- Audit logging (
JSONL) with SIEM-friendly fields and safety:request_id/trace_id/operator_ip- Sensitive fields redacted (
password/token/secret/key/passphrase) stdout/stderrtruncated for log safety
- Persistent SSH sessions (stateful shell):
open_session,list_sessions,close_sessionrun_command_in_session,write_session,read_session,resize_session- Session metadata persistence (
session.storage_file)
- Real terminal bridge (xterm.js + WebSocket):
start_terminal_wsreturnsws://.../terminal/<session_id>stop_terminal_wsunregisters a session or stops the WS server
- Session key injection:
send_keys_to_sessionsupportsESC/UP/DOWN/LEFT/RIGHT/TAB/ENTER
- Thread-session binding layer:
bind_thread_session,get_thread_session,unbind_thread_sessionensure_thread_session(auto-open and bind when missing)
- NL -> command bridge:
plan_command_from_text(plan only)execute_text_in_session(plan + run in persistent session)
Install
git clone https://github.com/adfoke/alma-linux-remote-plugin.git
cd alma-linux-remote-plugin
uv sync --all-extras
Quick Start
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle health
uv run python demo_cli.py --config ./examples/hosts.example.yaml tools
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle execute_command '{"host_name":"prod-web-1","command":"uptime"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle open_session '{"host_name":"prod-web-1"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle list_sessions '{"status":"all"}'
uv run python demo_cli.py --config ./examples/hosts.example.yaml plan-text thread-a prod-web-1 "帮我看下磁盘和内存"
uv run python demo_cli.py --config ./examples/hosts.example.yaml exec-text thread-a prod-web-1 "查看 nginx 状态和最近日志"
uv run python demo_cli.py --config ./examples/hosts.example.yaml handle send_keys_to_session '{"session_id":"<SESSION_ID>","keys":["ESC",":wq","ENTER"]}'
English doc: README.en.md
Safety Workflow (dangerous command)
- Run dangerous command → receive
approval_requiredandapproval_id - Approver calls
approve_requestwith allowedoperator - Re-run command with
approval_id
Code Audit Notes
plugin.pynow uses_with_connected_client(...)to consolidate repeated connect/close patterns.- Added focused tests for
ssh_client.pyandterminal_ws.pyto keep critical path coverage high.
Quality Gate
uv run ruff check src tests demo_cli.py
uv run pytest --cov=src/alma_linux_remote_plugin --cov-report=term-missing --cov-fail-under=65
Main Entrypoint
- Runtime adapter:
src/alma_linux_remote_plugin/runtime_adapter.py - Plugin metadata:
plugin.yaml