agentleFS
evolplusevolplus/talos/skills/ssh-remote-operations/SKILL.md

ssh-remote-operations

Skill9 starsChanged 6 months agoApache-2.0View on GitHub

Run DevOps remote operations through project-root SSH configuration. Use when DevOps must execute commands, install software or packages, inspect a remote host, stage release artifacts, or prepare a non-local server through `.ssh/config` without exposing private keys, SSH config contents, passwords, or environment secrets to the model.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Resolve the target host alias: Use only a named host alias from project-root .ssh/config.

    line 23
  2. Very specific:

    Run a safe preflight: Verify connectivity with a non-secret command such as ssh -F .ssh/config <alias> 'printf "%s\n" ok.

    line 25
  3. Very specific:

    Stage artifacts without copying secrets: Use scp -F .ssh/config or rsync -e 'ssh -F .ssh/config' only for build artifacts, compose files, …

    line 28
  4. Very specific:

    Make commands reproducible: Prefer checked-in scripts or task-scoped scripts under docs/devops/<task-id>/ for multi-step remote work.

    line 29
  5. Very specific:

    Never read or print project-root .ssh/ files, private keys, ~/.ssh/, passwords, agent sockets, or known-host material.

    line 34
  6. Very specific:

    Never run remote secret-dumping commands (env, printenv, set, cat ~/.ssh/*, cat .env*, kubectl config view --raw) through SSH.

    line 35
  7. Distinctive:

    Never install packages on staging or production without explicit task approval and rollback notes.

    line 36
  8. Distinctive:

    Never pipe unaudited network downloads into a shell on the remote host.

    line 37
  9. Distinctive:

    Never put credentials, SSH config contents, private hostnames, or secret environment values into deploy reports.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SSH Remote Operations

When to use

Use this skill when a DevOps task targets a remote VM or bare server and the project provides SSH connection configuration under project-root .ssh/. The SSH files are operator-owned credential material: DevOps may reference them in commands, but must not read, summarize, copy, or print their contents.

Inputs and outputs

  • Inputs: task ID, target environment, approved SSH host alias, project-root .ssh/config, architecture/deploy docs, package/software requirements, and any human approval required for non-dev environments.
  • Outputs: remote preflight evidence, command/package-change summary, health-check evidence, rollback notes, and docs/deploy-reports/<task-id>.md or docs/devops/<task-id>/ artifacts with secrets redacted.

Procedure

  1. Resolve the target host alias. Use only a named host alias from project-root .ssh/config. Do not read .ssh/config; ask the operator for the alias if the task does not name it. Use ssh -F .ssh/config <alias> <command> for remote execution.
  2. Gate the target environment. Local/dev/test servers may proceed when the task explicitly names the target. Staging requires task approval evidence. Production requires a human-approved change record, a dry-run or written execution plan, and rollback instructions before any mutation.
  3. Run a safe preflight. Verify connectivity with a non-secret command such as ssh -F .ssh/config <alias> 'printf "%s\n" ok; uname -s; uname -m; id -un'. Do not run env, printenv, set, cat ~/.ssh/*, or commands that dump service credentials.
  4. Detect the remote OS before installing packages. Read non-secret OS metadata (/etc/os-release, uname) and choose the native package manager. Use non-interactive flags and exact package names from the task or architecture docs. If sudo prompts for a password, stop with NEEDS_CONTEXT; never ask the model to handle passwords.
  5. Install only declared software. Package installation is allowed only when the task explicitly requires it. Record package names and versions in the report. Do not run broad upgrades (apt upgrade, yum update, brew upgrade) unless the task is specifically an OS maintenance task with approval.
  6. Stage artifacts without copying secrets. Use scp -F .ssh/config or rsync -e 'ssh -F .ssh/config' only for build artifacts, compose files, manifests, or generated release bundles. Never copy .env*, .ssh/, .k8s/ kubeconfigs, private keys, registry credentials, or raw secret manifests.
  7. Make commands reproducible. Prefer checked-in scripts or task-scoped scripts under docs/devops/<task-id>/ for multi-step remote work. Remote one-liners should use set -euo pipefail when run through bash -lc.
  8. Capture redacted evidence. Store command summaries, package changes, remote host alias, target environment, health-check URLs, and rollback commands. Do not store host private IPs, usernames, tokens, key paths beyond the alias/config path, or raw command output that contains secrets.

Hard rules

  • Never read or print project-root .ssh/ files, private keys, ~/.ssh/, passwords, agent sockets, or known-host material.
  • Never run remote secret-dumping commands (env, printenv, set, cat ~/.ssh/*, cat .env*, kubectl config view --raw) through SSH.
  • Never install packages on staging or production without explicit task approval and rollback notes.
  • Never pipe unaudited network downloads into a shell on the remote host.
  • Never put credentials, SSH config contents, private hostnames, or secret environment values into deploy reports.

References

  • ../docker-deployment/SKILL.md - combine with SSH for remote Docker or Compose deployment.
  • ../kubernetes-deployment/SKILL.md - use kubeconfig by reference only; do not read credentials.
  • ../../hooks/privacy-check.cjs - runtime credential-path guard.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.