Agent skill

SSH Remote Command CLI

by KonghaYao in KonghaYao/peri

Runs commands, reads and edits files, and copies data on remote machines through a single-file Node script that wraps the system ssh and scp, in Chinese.

Apache-2.0Auto-check: warningsDevOps & Cloud

SKILL.md written in Chinese; this summary is our English description.

Install SSH Remote Command CLI

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add KonghaYao/peri --skill ssh-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KonghaYao/peri ssh-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/KonghaYao/peri.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ssh-cli .claude/skills/ssh-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ssh-cli
GitHub stars
223
Token cost
~924 tokens
SKILL.md length
183 words
Files
2 (incl. scripts)
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Runs commands, reads and edits files, and copies data on remote machines through a single-file Node script that wraps the system ssh and scp, in Chinese.

  • Works in 6 steps: 先诊断再操作 → 多步操作用 && 链式(无状态语义) → 文件编辑走 read → edit 两步(避免一次改错) → …
  • Running a build or test command on a remote dev server
  • SKILL.md covers 子命令, 交互模式(推荐), 参数约定 and 工作流, plus 1 more section
  • Runs JavaScript scripts from its folder; calls node, npm and git; needs SSH_CLI_STRICT_HOST_KEY

What it does

The skill ships `scripts/ssh-cli.js`, a one-file Node program with no dependencies that calls the system `ssh` binary. Its subcommands are `exec` for remote commands (pipes, && and redirects work), `read` for text files with optional line ranges, `write` with append or stdin modes, `edit` for exact unique string replacement, `ls`, `push` and `pull` for scp transfers, and `test` for connection diagnostics. Passing just a host name opens an interactive mode where the host is remembered.

Credentials go only through the system ssh setup, meaning config aliases, an agent or keys. Password login is deliberately unsupported, so for a host that needs a password you run `ssh-copy-id` once in your own terminal. Options include a host allowlist, timeout, port, key path and an audit log, each with an environment variable. A failing remote command returns its exit code, a timeout returns 124 and other errors return 1. The recommended habit is to run `test` on a new host first and to read a file before editing it.

When your agent uses it

  • Running a build or test command on a remote dev server
  • Reading and changing a config file on a remote host step by step
  • Uploading a build directory to a server or pulling a log file back
  • Diagnosing why an SSH connection to a host fails

Example prompts

  • “Test the connection to dev-server, then run npm test in /app.”
  • “Read /srv/app/config.js on prod and change the port setting, then show me the diff.”
  • “把本地 dist 目录上传到 dev-server 的 /srv/app/dist。”
  • “Pull /var/log/app.log from dev-server into ./app.log.”

Requirements

  • Node.js
  • System `ssh` and `scp` binaries
  • Key or agent based SSH access to the remote host

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 先诊断再操作
  2. 多步操作用 && 链式(无状态语义)
  3. 文件编辑走 read → edit 两步(避免一次改错)
  4. 文件传输用 push / pull(scp 包装)
  5. 大文件/长内容
  6. 安全建议

What it can do on your machine

Read from SKILL.md and the folder at commit d7ee444. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • npm
    • git
    • rsync

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, git and rsync, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SSH_CLI_STRICT_HOST_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SSH Remote Command CLI loads about 924 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 183 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~924

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • NoteMentions a .env fileSKILL.md:20
    ite` | 写/追加远程文件 | `write dev-server /app/.env "KEY=value"`(追加加 `--append`,长内容用 `--stdin`) |
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:44
    - `host`:`user@host` 或 `~/.ssh/config` 别名;凭据只走系统 ssh(config/agent/key),**密码不进入脚本**(需要账号密码的机器先 `ssh-copy-id`)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from KonghaYao/peri at commit d7ee444, republished under its Apache-2.0 licence (© KonghaYao). 183 words, ~924 tokens.

Download SKILL.mdSave it as .claude/skills/ssh-cli/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ssh-cli
description
Execute commands and manage files on remote machines over SSH via a zero-dependency Node CLI (ssh-cli.js). Use when the user needs to run commands, read/write/edit files, or diagnose connectivity on a remote host, or asks for anything "on the server / remote machine / dev box".

SSH CLI

通过系统 ssh 二进制操作远程机器。单文件零依赖 CLI,无需安装任何东西:

node .claude/skills/ssh-cli/scripts/ssh-cli.js <子命令> ...

子命令

子命令用途示例
exec远程执行命令(支持管道/&&/重定向)exec dev-server "cd /app && npm test"
read读远程文本文件(可只读行区间)read dev-server /etc/hosts --offset 5 --limit 10
write写/追加远程文件write dev-server /app/.env "KEY=value"(追加加 --append,长内容用 --stdin)
edit精确替换(old_string 必须唯一,多匹配加 --all)edit dev-server /app/main.js "old" "new"
ls目录列表ls dev-server /app
push本地上传远程(scp,--recursive 传目录)push ./dist dev-server /srv/app/dist
pull远程下载本地(scp)pull dev-server /var/log/app.log ./app.log
test连接诊断(主机名/系统/连通性)test dev-server

交互模式(推荐)

连续操作同一台主机时,直接 ssh-cli <host> 进入主机上下文,之后只敲子命令(host 自动带入),exit 或 Ctrl-D 退出:

bash
node .claude/skills/ssh-cli/scripts/ssh-cli.js dev-server
# dev-server> exec "cd /app && npm test"
# dev-server> read /etc/hosts --limit 10
# dev-server> push ./dist /srv/app/dist --recursive
# dev-server> pull /var/log/app.log ./app.log
# dev-server> exit

交互模式下 push/pull 省略 host:push <local> <remote>、pull <remote> <local>;其余子命令参数与单次调用一致。所有命令照常受白名单/审计约束。

参数约定

  • host:user@host 或 ~/.ssh/config 别名;凭据只走系统 ssh(config/agent/key),密码不进入脚本(需要账号密码的机器先 ssh-copy-id)
  • 全局选项:--hosts <白名单>(逗号分隔,* 放行所有;不传默认放行)、--timeout <ms>、--port <n>、--key <path>、--audit-log <path>
  • 环境变量:SSH_CLI_ALLOWED_HOSTS / SSH_CLI_TIMEOUT / SSH_CLI_PORT / SSH_CLI_AUDIT_LOG / SSH_CLI_STRICT_HOST_KEY
  • 退出码:exec 远程非零退出返回同码;超时 124;其他错误 1 —— 可用于判断成败
账号密码登录(无 key 的机器)

ssh-cli 不支持密码认证(脚本禁止接触密码,BatchMode=yes 强制 key/agent)。遇到需要账号密码的主机,先让用户执行 ssh-copy-id 一次性导入 key(密码只在此刻、在用户自己的终端输入,不经过任何脚本):

bash
# 用户终端执行(只需一次):
ssh-copy-id user@10.0.0.5        # 输入账号密码 → 之后全免密

指引流程:ssh-copy-id 报错或用户没配 key 时,提示先 ssh-keygen -t ed25519 再执行;导入后所有 ssh-cli 子命令直接可用。

工作流

1. 先诊断再操作

未知/新主机先 test,确认连通性与认证:

bash
node .claude/skills/ssh-cli/scripts/ssh-cli.js test user@10.0.0.5
2. 多步操作用 && 链式(无状态语义)
bash
node .claude/skills/ssh-cli/scripts/ssh-cli.js exec prod "cd /srv/app && git pull && npm ci --omit=dev && pm2 restart app"
3. 文件编辑走 read → edit 两步(避免一次改错)
bash
node .claude/skills/ssh-cli/scripts/ssh-cli.js read dev-server /srv/app/config.js
node .claude/skills/ssh-cli/scripts/ssh-cli.js edit dev-server /srv/app/config.js "port: 3000" "port: 8080"
4. 文件传输用 push / pull(scp 包装)

单文件/目录都支持;大目录建议 --recursive,传输超时调大 --timeout:

bash
node .claude/skills/ssh-cli/scripts/ssh-cli.js push ./build/ dev-server /srv/app/build --recursive
node .claude/skills/ssh-cli/scripts/ssh-cli.js pull prod /var/log/nginx/access.log ./access.log

需要增量同步/断点续传的大目录时,直接用 rsync(两端都要有):

bash
rsync -avz --partial ./dir/ user@host:/srv/dir/
5. 大文件/长内容
  • 读大文件:read 只传输需要的行区间(sed 实现),返回前会打印总行数
  • 写长内容:write 用 --stdin 从 stdin 读,避免命令行长度限制与注入风险
bash
cat local-file.txt | node .claude/skills/ssh-cli/scripts/ssh-cli.js write dev-server /srv/app/data.json --stdin
6. 安全建议
  • 生产主机建议配置 --hosts "prod" 白名单,白名单外主机直接拒绝
  • 敏感操作(部署、改配置)配合 --audit-log /tmp/ssh-cli-audit.jsonl,每次调用留痕(含命令与退出码)

已知限制

  • 单次输出无上限(stdout 直接透传);二进制文件会被检测并拒绝(仅文本)
  • multiline 正则类搜索不支持(无 grep 子命令;需要时用 exec + rg)
  • 无持久会话:exec 每次新 shell,跨步骤状态用 && 保持

© KonghaYao, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in .claude/skills/ssh-cli of KonghaYao/peri.

  • SKILL.md
  • scripts/ssh-cli.js

Open the folder on GitHubat commit d7ee444

Compare with similar skills

SSH Remote Command CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SSH Remote Command CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SSH Remote Command CLI this skillKonghaYao/peri223—~924Automated safety check: WarnApache-2.0
Openbkn Deployopenbkn-ai/bkn-foundry636—~1.9kAutomated safety check: NotesCustom licence
Agenticx DeployerDemonDamon/AgenticX294—~866Automated safety check: PassApache-2.0
Doca Bare Metal DeploymentNVIDIA/skills3.5k—~2.9kAutomated safety check: PassApache-2.0
Django Deployment Test Loophashgraph-online/awesome-codex-plugins1.2k—~851Automated safety check: PassMIT
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT

Similar skills

  • Openbkn Deploy

    openbkn-ai/bkn-foundry

    Deploy or upgrade OpenBKN on a customer-authorized Linux server through the repository's deploy scripts, with preflight checks, explicit confirmation, secret handling, and post-deployment…

    636 GitHub stars~1.9k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Agenticx Deployer

    DemonDamon/AgenticX

    Guide for deploying AgenticX agents to production including Docker containerization, Kubernetes orchestration, Volcengine AgentKit cloud deployment, and API server setup.

    294 GitHub stars~866 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Official

    A skill your agent uses for launching, supervising, debugging, OR platform lifecycle on a BlueField — BFB install, RShim/TMFIFO, host PF rebind, post-BFB recovery — taking a DOCA-linked binary to a…

    3.5k GitHub stars~2.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Django Deployment Test Loop

    hashgraph-online/awesome-codex-plugins

    Make Django deployment changes test-driven across Docker, production settings, Gunicorn, WhiteNoise/static files, environment variables, Ansible/server setup, staging smoke tests, and release checks.

    1.2k GitHub stars~851 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated today
    DevOps & CloudAuto-check: notes

More from KonghaYao/peri

All 19 skills in this repo
  • Queries Langfuse traces, prompts, datasets and sessions, and analyzes local LLM gateway logs for requests, context growth, token use and cache hits.

    223 GitHub stars~4.3k tokensUpdated today
    Auto-check: notes
  • Audits recent agent conversation history and turns repeated failures and successes into testable harness improvement proposals that later audits can check.

    223 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Advisor Consultation

    KonghaYao/peri

    Sends a compact, redacted decision packet to a tool-free Opus advisor subagent when a task has high-risk trade-offs or stalled investigations, then weighs the answer.

    223 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Scheduled Tasks Cron

    KonghaYao/peri

    Registers, lists and removes recurring agent tasks with five-field cron expressions, and sets safety rules so a schedule is created only when the user clearly asks.

    223 GitHub stars~683 tokensUpdated today
    Auto-check passed
  • Verifies and repairs a feature by using the real Peri terminal UI as a user would, looping verify, decide, fix and review until a fresh round shows no blockers.

    223 GitHub stars~2.1k tokensUpdated today
    Auto-check: notes
  • Ultracode

    KonghaYao/peri

    Multi-agent workflow orchestration. An agent skill from KonghaYao/peri.

    223 GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about SSH Remote Command CLI

What does SSH Remote Command CLI do?

Runs commands, reads and edits files, and copies data on remote machines through a single-file Node script that wraps the system ssh and scp, in Chinese. js`, a one-file Node program with no dependencies that calls the system `ssh` binary. Its subcommands are `exec` for remote commands (pipes, && and redirects work), `read` for text files with optional line ranges, `write` with append or stdin modes, `edit` for exact unique string replacement, `ls`, `push` and `pull` for scp transfers, and `test` for connection diagnostics.

When should I use SSH Remote Command CLI?

SSH Remote Command CLI fits situations like: running a build or test command on a remote dev server; reading and changing a config file on a remote host step by step; uploading a build directory to a server or pulling a log file back; diagnosing why an SSH connection to a host fails.

How do I install SSH Remote Command CLI in Claude Code?

Run `npx skills add KonghaYao/peri --skill ssh-cli -a claude-code`. Or copy the skill folder (.claude/skills/ssh-cli in KonghaYao/peri) into .claude/skills/ssh-cli in your project. Claude Code loads it when a task matches its description.

How do I install SSH Remote Command CLI in Codex?

Run `npx skills add KonghaYao/peri --skill ssh-cli -a codex`. Or copy the skill folder (.claude/skills/ssh-cli in KonghaYao/peri) into .agents/skills/ssh-cli in your project. Codex loads it when a task matches its description.

Can I use SSH Remote Command CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KonghaYao/peri --skill ssh-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ssh-cli, .gemini/skills/ssh-cli, .github/skills/ssh-cli and .opencode/skills/ssh-cli in your project.

What does SSH Remote Command CLI need to run?

Going by SKILL.md and its folder, SSH Remote Command CLI needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node, npm, git and rsync) and credentials named SSH_CLI_STRICT_HOST_KEY. Our summary lists: Node.js; System `ssh` and `scp` binaries; Key or agent based SSH access to the remote host.

Does SSH Remote Command CLI access the network?

SKILL.md contains no URLs. Its commands use npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is SSH Remote Command CLI safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does SSH Remote Command CLI use?

SSH Remote Command CLI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SSH Remote Command CLI use?

About 924 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SSH Remote Command CLI?

Skills that share tags, products or a category with SSH Remote Command CLI: Openbkn Deploy (openbkn-ai/bkn-foundry, 636 stars), Agenticx Deployer (DemonDamon/AgenticX, 294 stars), Doca Bare Metal Deployment (NVIDIA/skills, 3.5k stars) and Django Deployment Test Loop (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SSH Remote Command CLI?

KonghaYao (a GitHub user) maintains it in KonghaYao/peri, which has 223 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: KonghaYao/peri on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.