ssh
БесплатноЗапускает вложенные скриптыНе проверенSSH server management — connect, configure, deploy, administer Linux servers with safety gates.
от kochetkov-ma★ 41 звезда на GitHubОб этом скилле
SSH Server Management
Prompt contract
$ARGUMENTS is one free-form RU/EN prompt; mode tokens may sit anywhere in it. This skill has no
mutate-vs-read-only flags — every mode can end up running commands, gated by Phase 5 Step 3's
own MODIFY/SERVICE/DELETE/PRIVILEGE confirmation.
- Mode: an explicit mode token wins outright (operations table in Phase 0 below); else the most
distinct whole-word keyword hits. Equal highest scores/conflicting explicit modes -> ask before
actions, never guess a mutation. No hit ->
execute, letting Phase 5's own command classification gate any mutation. Empty ->setupif no servers are configured, elseexecute(Phase 1 asks which server). Never a hardcoded default independent of that check. - Scope: prose that is not a mode keyword is still input: take the host, server alias or command intent from it, never the first word of a sentence as a positional id.
- Ask: outcome-changing ambiguity (which server, DELETE/PRIVILEGE commands) ->
AskUserQuestionbefore any work — this is Phase 1/5's own gate, not a new one.
Print once, at the end of Phase 1 — once mode AND server (default/asked/newly-set-up) are both resolved, before branching into Phase 2/3/5 (labels and plan values English, INPUT verbatim):
PLAN — brewtools:ssh
INPUT: <arguments verbatim, or "(empty)">
MODE: <resolved> — <explicit | matched keyword: X | default>
SCOPE: <resolved paths / target / level / flags>
DO: <2-5 imperative bullets>
RESULT: <what the user ends up holding>
Robustness Rules (all phases)
| Rule | Limit / scope |
|---|---|
Bash calls report OK/FAILED, keep non-zero status: && echo "OK ..." || { rc=$?; echo "FAILED ..." >&2; exit "$rc"; } |
all scripts; discovery's documented 124 captured separately |
SSH options -o ConnectTimeout=10 -o BatchMode=yes |
every SSH call |
FAILED -> stop the phase, report; never retry the same command blindly. Script non-zero -> read stderr, fix root cause, retry ONCE |
all phases; scripts |
| Retries per failed operation | max 2, then report and stop |
| Phase 2 key attempts | max 3, then ask the user |
| Re-entries into Phase 2 | max 1, then stop and report |
| Phase 5 SSH commands per invocation | max 5; more -> delegate (Phase 5 Step 4) |
| SSH calls per invocation | max 15, then stop, report progress, suggest manual continuation |
| update-agent servers per run | max 3; report the rest |
| AskUserQuestion | max 3 per phase; combine missing info into one question |
| SSH connection test | 10s (ConnectTimeout=10) -> "Server unreachable", stop |
| Single SSH command | 60s via ght 60 ssh ... (watchdog from deploy-common.sh, Phase 5 Step 4; ght_reason tells timeout, missing tool, failure apart) -> kill, report "Command timed out", ask the user. Never assume stock macOS has bare timeout |
Fallback Strategy
Unfixable script failure: report it (Error Reporting below); do the operation by hand in inline Bash (scripts are helpers, not gatekeepers); that fails too -> report both attempts, ask the user. Never continue with stale/missing data.
| Failed script | Manual alternative |
|---|---|
| detect-mode.sh | Match the mode keywords of Phase 0 yourself |
| ssh-env-check.sh | Run ls ~/.ssh/id_* 2>/dev/null, ssh-add -l, cat ~/.ssh/config |
| server-discover.sh | Run individual SSH commands: uname -a, docker version, df -h |
| claude-local-ops.sh | Read/write CLAUDE.local.md directly with Read/Edit tools |
Error Reporting
On any failure, before stopping or asking the user, output:
SCRIPT_ERROR: <script-name>
EXIT_CODE: <code>
STDERR: <error message>
PHASE: <current phase>
ACTION: <what was attempted>
FALLBACK: <what will be tried next OR "asking user">
Phase 0: Mode Detection (first step)
EXECUTE using Bash tool, PROMPT_HERE = the whole prompt as ONE safely shell-quoted data argument, never eval'd or interpolated as code:
bash "${CLAUDE_SKILL_DIR}/scripts/detect-mode.sh" "PROMPT_HERE"
Optional 2nd argument: an already resolved canonical mode, never a host/port. Parse exactly one MODE:
line (after ARGS:). MODE: ask -> ask the material-choice question before any action, rerun with
the chosen mode as 2nd argument. Flags, values, paths, key=value scopes stay data; server/command intent comes from
the whole prompt, never as a port.
| Mode | EN keywords | RU keywords | Mutates? |
|---|---|---|---|
setup |
setup, set up, new server, add server | настрой, добавь сервер, новый сервер | yes |
connect |
connect to, ssh to, login | подключись, зайди по ssh, логин | no (routes to execute) |
configure |
configure, config, harden | конфигурируй, укрепи, захардень | yes |
update-agent |
update agent, refresh agent, refresh | обнови агента, обнови | yes |
execute |
(any other text) | (любой другой текст) | depends — Phase 5 Step 2 classifies each |
Установить ssh в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashAgentAskUserQuestionGlobGrepВложенные файлы
FAQ
Что делает скилл ssh?
SSH server management — connect, configure, deploy, administer Linux servers with safety gates.
Как установить скилл ssh?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ssh запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic