/luffy-arm:luffy-armfrom luffy-arm
Gives a local AI agent remote access to a Linux server over SSH to explore data, run commands, inspect logs, diagnose issues, or pull data down. Also handles initial SSH setup.
Ships in luffy-arm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Give a local agent a remote hand: the agent's brain (process, config, memory)
stays on this machine; an SSH "arm" reaches into a remote Linux server to read,
run, and diagnose — never to rewrite. Native parts only (SSH keys, ssh config,
ControlMaster, POSIX ACLs). Key-based safe mode uses a non-privileged cc account;
registered password sessions use the existing account and its actual permissions.
python3 scripts/targets.py list; register key/password servers through
targets.py add, never special-case a server name. Use
python3 scripts/power.py status TARGET / off TARGET for either login mode.python3 scripts/session.py status TARGET / run TARGET 'command'. The human alone
runs luffy fullpower on TARGET --password in their terminal. This path uses the
existing account's permissions, not cc isolation. Do not run the cc installer or
the default key gate (scripts/fullpower.sh) for it.
New password connections run in the background after human authentication.
Repeated ON reuses them. For explicit all-target shutdown/status, call
python3 scripts/lifecycle.py all off / all status on the host. OFF targets
registered Luffy resources only; incomplete closure must not be reported as success.ssh <alias> already works (Host in ~/.ssh/config; ssh -O check <alias> ok) → USE mode.SSH and ssh-agent are host capabilities. If the agent runtime is known to sandbox network access or the login-session ssh-agent, request the platform's narrowly scoped, user-approved host execution for the first SSH/status command. Do not run a known-blocked sandbox probe first.
UNKNOWN. Do not ask the user
to re-enable Full Power merely because the sandbox cannot observe it.Violating the letter of these is violating the spirit. They hold in safe mode (the default). Full-power mode is a separate opt-in (see below) that deliberately lifts INV-2 and the data-read-only net — but INV-1 and INV-3 still hold even there.
~/.claude, ~/.codex, ~/.cursor, ~/.config/opencode — it holds
credentials + MCP secrets) there. Fix lag with ControlMaster, not by moving.sed -i, vim, tee, > on a remote
path). Fix locally, then sync.sudo and every server-root action
use a password the user types. Never embed or ask for a password or key passphrase;
never add NOPASSWD sudoers to dodge the gate.setfacl, installing keys = you
generate the commands, the user runs them with their own sudo. The agent does not run
privileged server setup, even if it technically could.| Rationalization | Reality |
|---|---|
| "Just hotfix the file directly over ssh, no reason to re-upload" | Editing remote source (INV-2). Edit locally + sync. |
| "We're in a hurry / it's only one line" | Urgency doesn't change the source of truth. Still local-then-sync. |
| "I have ssh+sudo, I'll just run adduser/setfacl myself" | Server-root is the user's (INV-3). Print the commands; they run them. |
"Copy my agent's config dir (~/.claude/~/.codex/…) up so it behaves the same on the server" | Leaks credentials, breaks INV-1. Use ControlMaster instead. |
| "Embed the password/passphrase so it runs unattended" | Never (INV-3). Passphrase-less dedicated key + the user's interactive sudo. |
Red flags — STOP: remote-path sed -i/vim/tee/> · sudo'ing server setup · scp'ing your agent config dir · a secret in a command.
Reach in over the alias. Default is read-only; only WORK_DIRS are writable.
| Want | Do |
|---|---|
| run a command / explore | ssh <alias> "<cmd>" |
| check the multiplexed connection | ssh -O check <alias> |
| read a file | ssh <alias> "cat <path>" |
| download data → local | scp <alias>:<path> ./ · rsync -avz <alias>:<dir>/ ./<dir>/ — anything cc can read (secrets in READ_EXCLUDES can't be pulled) |
| grant a new read/write dir | bash scripts/grant.sh ro|rw <path> → user runs the printed server cmds |
| update to the latest version | bash scripts/update.sh (Claude Code plugin users: /plugin update luffy-arm) |
Source edits happen locally; sync up only into WORK_DIRS when needed.
Treat the user as a first-timer — assume nothing is configured. You drive the whole thing; the user only does the two steps you literally cannot: type their sudo password on the server, and (full-power only) type a key passphrase. Run scripts from this skill's dir.
ssh <their-user>@<server> (or has an
account they can get). If they can't reach the server at all, fix that before anything else.~/.config/luffy-arm/params.sh from scripts/params.example.sh — don't make them hand-edit.~/.ssh): bash scripts/keygen.sh
then bash scripts/ssh-config.sh.bash scripts/gen-server-setup.sh
emits a filled-in luffy-arm-server-setup.sh (their params + the pubkey inlined). Tell them
to copy it to the server and run bash luffy-arm-server-setup.sh there — it self-uses
sudo, so they type their password. You must NOT run it and must NOT ask for that
password. Wait for them to confirm it finished. (Fallback if the generator can't run:
hand-walk references/server-setup.md.)bash scripts/verify.sh → expect 🎉 all passed.The whole flow: install (one command) → you configure local + interview + hand them one server command → they run it → you verify. Don't hand-walk the individual server commands unless step 4 can't generate them.
Human walkthrough: TUTORIAL.md. Quick steps: references/setup-guide.md. Why it's safe:
references/security-model.md.
Default is safe mode (read-only cc). If the user explicitly wants the agent to
edit/write as themselves, full-power mode is available — treat it as a loaded gun:
ssh-add -t TTL) arms that credential, and the key auto-drops after the TTL.
The passphrase-in-ssh-agent is the gate for this key. ON publishes a user-private stable
reference to that agent and the admin alias uses it through IdentityAgent, so separate
conversations do not depend on inherited SSH_AUTH_SOCK. No key material or passphrase is
copied. This gate does not revoke personal or other SSH keys accepted for the same
ADMIN_USER identity.bash scripts/admin-keygen.sh (the user types a real
passphrase — you never see it; an empty one is rejected), then re-run bash scripts/ssh-config.sh (adds the admin alias) and bash scripts/gen-server-setup.sh (its
output now also installs the admin pubkey under the user's own account — no sudo).bash scripts/ssh-config.sh once so the
existing admin alias receives the shared IdentityAgent entry. Connection fields are preserved.bash scripts/fullpower.sh on and type
the passphrase. Never auto-load the key, never make it passphrase-less, never add it to
ssh-agent on their behalf, never enable it "to save a step" (that removes the gate = INV-3).
Repeated ON now leaves an already loaded, verified key and its expiry unchanged.
To change a running lifetime, the user runs luffy fullpower extend [TARGET] DURATION (adds
to the time left) or luffy fullpower reset [TARGET] [DURATION] (restarts the countdown).
Never run these for them. Lifecycle operations require
local Python 3 for kernel locks; locks are automatically released on process exit.luffy-arm-fullpower-on skill; "turn off full power" routes to
luffy-arm-fullpower-off. ON checks host status first: an already-ON gate is reused without
another passphrase prompt, and only verified OFF asks the user to run the ON command personally.
If the same request includes a remote task, a verified-ON switch continues under this main
skill. OFF may be run by the agent. It proves whether the dedicated key stopped authenticating,
then separately reports any alternate credential that still reaches ADMIN_USER.ssh <ADMIN_ALIAS> "<cmd>" runs as
ADMIN_USER. Confirm the identity and configured target-path write access with
bash scripts/verify-fullpower.sh.bash scripts/fullpower.sh off (the key also expires
after the TTL). If another key still reaches ADMIN_USER, OFF reports that effective user
access remains and does not claim Safe Mode has returned.status reports the dedicated credential gate
(ON/OFF/UNKNOWN), the authenticated remote identity, and alternate non-interactive user
access (AVAILABLE/NOT FOUND/UNKNOWN). Authentication as ADMIN_USER means commands run
with that user's OS permissions; exact path write access and sudo must be verified separately.
Never infer effective permissions from the key filename or gate state alone.UNKNOWN; never infer a gate or capability state from
Operation not permitted, network failure, or an inaccessible agent socket. A user-run
normal-terminal check is the last fallback, not the default agent workflow.If the user wants a record of what the agent has actually run on the server — the one
thing the local machine can't see inside ssh <alias> "…" — offer server-side auditing.
It's off until the user explicitly turns it on, and it's detect, not prevent (a fifth,
complementary layer on top of the four safety nets; it never blocks anything).
bash scripts/gen-audit-setup.sh (local, no secrets) emits
luffy-arm-audit-setup.sh; the user copies it to the server and runs
bash luffy-arm-audit-setup.sh enable with their own sudo. You do NOT run it (INV-3).bash luffy-arm-audit-setup.sh show [N] lists recent audited commands;
… disable removes it cleanly (past log entries are kept).cc account is audited; full-power (login as the user) is
never intercepted. Details + honest limits + an auditd alternative: references/audit-logging.md.Human shortcut (not for you, the agent): if the user ran
install.sh, they may have aluffy-armcommand on their PATH — or its shorterluffyalias — (luffy-arm fullpower on,luffy verify,luffy-arm audit-gen, …) that simply forwards to these samescripts/*.sh. You should keep calling the scripts by path — it's PATH-independent and unambiguous. The command exists for the human.
UNKNOWN in a sandbox → this is not OFF. Retry with approved host
execution; only explicit authentication denial proves OFF.OFF, but EFFECTIVE USER ACCESS: AVAILABLE → an alternate key reaches
the same ADMIN_USER. The agent has that user's effective permissions; do not call this Safe
Mode or pause merely to re-arm the dedicated key.references/setup-guide.md → Troubleshooting.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
luffy-arm@ares-toolkit is listed by ares960826/ares-agent-toolkit — review the source before installing
npx claudepluginhub ares960826/ares-agent-toolkit --plugin luffy-arm3 skills in this plugin
/luffy-arm-fullpower-offUse when the user asks to turn off, disable, close, or disarm luffy-arm full-power mode, including "turn off full power", "disable full-power", 关闭 full power, 退出全功率模式. Removes the dedicated admin key, verifies that credential is off, and reports alternate user-level SSH access separately./luffy-arm-fullpower-onUse when the user explicitly asks to turn on, enable, open, or arm luffy-arm full-power mode, including "turn on full power", "enable full-power", 打开 full power, 开启全功率模式. Check layered host status first and reuse an already-ON dedicated gate; gate state and effective ADMIN_USER access are distinct. The agent never loads the key for them.Other plugins' skills for the same job