Cassiiopeia/projectops / skills/pro-ssh
pro-ssh
UnverifiedRun commands on remote servers over SSH (AWS EC2, Synology NAS, Linux or Windows hosts), by saved name or direct host/user/key, including PowerShell and Python scripts on Windows. Use for 'check the server', 'look at logs', 'is the deploy live'.
SSH: remote server access
When to use
- "Check the server", "show the logs", "connect to EC2", "connect to the Synology" (Korean: '서버 확인해줘', '로그 봐줘', 'EC2 접속해', '시놀로지 접속해')
- "Inspect prod", "check server status", "check whether the deploy is live", "do ~ on the server" (Korean: 'prod 검수해줘', '서버 상태 확인', '배포 됐는지 확인해줘', '서버에서 ~해줘')
- It connects by a saved server name, or without saving by passing host, port, account and password/key directly.
The connection runner is launch_cli.py ssh from pro-launch (#841). It works with a saved server (--cred) or with connection details passed directly, without saving.
Talk to the user in the user's language (or the configured language preference).
- Use it for: checking server status, logs and files, post-deploy server checks, "go into the server and do ~".
- Do not use it for: Synology DSM reverse proxy and domain setup →
pro-synology-expose(in the optional projectops-extras plugin).
{SCRIPTS} is pro-launch's scripts/ (how to find it: ../pro-launch/SKILL.md). Calls are {PYTHON} {SCRIPTS}/launch_cli.py ….
Workflow
Phase 0: Which server
Look in the project before asking the user. Even when the user only gives a name, such as "the Iroom server DB", the answer is usually in the repo.
-
access show: if this repo has recorded how to connect (ssh.<env>·db·logs), use that first. -
Find the target server in the project files (host · account · port · DB host/name):
Where What application-*.yml·application-*.properties(prod·dev…)DB host and name in spring.datasource.url, external API addresses.env*·docker-compose*.ymlDB_HOST·DB_NAME· service names · ports.github/workflows/*DEPLOY*·*CICD*sshtarget host · account · port · deploy path · container name (if the value issecrets.*, you only know the name)- Never copy secret values (passwords, tokens, keys) into output or reports. Even if you read them, give only the location, such as "
spring.datasource.passwordinapplication-prod.yml". - Match the host you found against
hostincred list. If a saved server matches, use it.
- Never copy secret values (passwords, tokens, keys) into output or reports. Even if you read them, give only the location, such as "
-
Look at saved servers (
kind: ssh) withcred list. Use only those whoseuse_whenfits the current task. If there is only one, select it automatically; if several, let the user pick by number.- If
scopeisask-first, confirm with the user before connecting ("I'll connect to the ○○ server and check △△. Proceed?"). Never use it without approval.
- If
-
If nothing was found above, or the user already gave connection details (for example "host 1.2.3.4 port 2222 user ubuntu key ~/k.pem"), connect directly without saving. Ask for missing details one per message:
- host (IP/domain) 2) port (suggest 22 if unknown) 3) account 4) auth method (password / PEM key) 5) password or key file path.
-
When a connection succeeds through an unrecorded path, record it so you do not search again next time.
- How to connect (no secrets) goes in this repo:
access set --key ssh.<env> --json '{"host":…,"port":…,"user":…,"cred":"<saved name>","source":"<file where found>"}', and for a DBaccess set --key db --json '{"how":"ssh",…}'(../pro-launch/references/server.md). Putting a secret value in is rejected withsecret_in_value. - For credentials such as passwords and keys, ask whether they may be saved, then
cred set(below). If the user says it is one-off, do not save.
- How to connect (no secrets) goes in this repo:
Phase 1: Run commands
If the user did not choose a command, the agent picks one that fits the goal and runs it.
| Situation | Command |
|---|---|
| Saved server | ssh --cred <server> --command '…' (for password sudo, --sudo + SUDO <command>) |
| No saving · password | ssh --host H --port P --user U --password-env VAR --command '…' (never put the password on the command line: the permission classifier blocks it and it stays in logs) |
| No saving · PEM key | ssh --host H --port P --user U --key-path ~/k.pem --command '…' |
| Try a saved server with a different port or account | ssh --cred <server> --port 2022 --command '…' (values given directly win) |
| Save a new server | Ask whether it may be saved, and let the user type the password themselves: ! {PYTHON} {SCRIPTS}/launch_cli.py cred set --name <server> --prompt --json '{"kind":"ssh","host":…,"port":…,"user":…,"use_when":…,"scope":…}' (do not put the password in --json). For key auth, put key_path in --json without --prompt |
Import servers from the old ssh section | Check the list with cred import-ssh --dry-run → run without it (copies the values too) → after confirming connections, --prune |
| Logs · DB | logs --cred … · db --cred … (../pro-launch/references/server.md) |
Windows host: PowerShell or Python script (anything with quotes, pipes, $, Korean text, or more than one line) | {PYTHON} {SSH_SCRIPTS}/windows_script.py run --cred <server> --file check.py (or .ps1; inline: --lang python --code '…'). See below |
- Reading result codes:
remote_exit_nonzeromeans the connection worked and the remote command ended non-zero (no grep match, etc.; do not suspect the connection details).auth_failed,connect_failedandhost_key_*are connection failures. On Windows (cmd) servers, commands joined with&keep only the last exit code, so call each step separately or wrap them in PowerShell. - Windows scripts: do not hand-quote
powershell -Command "…"orpython -c "…". cmd and PowerShell 5.1 strip the inner quotes.windows_script.py run(#1189) sends the script as onepowershell -EncodedCommand <base64>command, which works whether the host's default shell is cmd or PowerShell, then callslaunch_cli.py sshand returns its JSON pluslanguage,mode,steps.- Python: found on the host automatically (PATH, then
C:\Users\*\AppData\Local\Programs\Python\Python3*, thenpy), output forced to UTF-8.--python <path>picks one;code: python_not_found(exit 127) means none was found. - PowerShell: progress output is off and errors come back as plain text in
stderr(no#< CLIXML); a script error makes the exit code 1. Error line numbers count a few wrapper lines. - Scripts too long for one command line (cmd limit 8191) are uploaded in pieces to
%TEMP%\projectops-ssh-<token>, run from there and deleted afterwards (mode: upload).--dry-runshows the commands without connecting. - Same connection flags as
ssh(--cred,--host,--port,--user,--password-env,--key-path,--timeout).{SSH_SCRIPTS}is this skill'sscripts/(fallback block withSKILL=pro-ssh,../references/script-invocation.md).
- Python: found on the host automatically (PATH, then
- Passwords that appear in the output are masked as
***. Password connections usesshpasswhen installed, otherwise OpenSSHSSH_ASKPASS(OpenSSH 8.4+, one password attempt so a wrong password cannot lock the account). - When connecting to a saved server,
memoryin the response carries facts learned about that server (OS, docker path, containers, log locations). Record new findings withlearn --area server --scope machine --key server.<server>.<topic> --how '…' --result ok(no accounts or secrets). Connections without saving are not remembered. - Full credential rules:
../pro-launch/references/credentials.md.
Phase 2: Report results
Summarize the results for the user. If there are errors, give the cause and the fix together (references/troubleshooting.md).
What remains in this skill
references/troubleshooting.md: Synology docker absolute path,wget, Windows PowerShell, common pitfalls (per-server-type knowledge).scripts/windows_script.py: runs a PowerShell or Python script on a Windows host throughlaunch_cli.py sshwithout hand-quoting (#1189).scripts/ssh_connect.py: paramiko-based compatibility path. Use it only wherelaunch_clicannot be used (ssh older than OpenSSH 8.4 with no sshpass). It also takes the password from theSSH_PASSWORDenvironment variable.
Shared references
| Document | Read when |
|---|---|
../references/common-rules.md | Always, at start: absolute rules, confirmation gates, issue state, push |
../references/sensitive-info.md | Right before saving an artifact or posting to GitHub: masking table, self-review |
../references/config-rules.md | When reading or writing ~/.projectops/config/config.json |
Customize
Your own language, tone and rules apply: see ../references/preferences.md. Read them once at the start: run the snippet in ../references/preferences.md with SKILL_ID=pro-ssh.
Keys for this skill: the common language, tone, rules only.
Preferences change presentation only; approval gates, secret protection and --dry-run stay in force.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |