Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)48k · #6302

sshepherd

Ce qu’il fait

Permet à un agent IA de contrôler un serveur distant via SSH sans voir ses mots de passe ni ses détails de connexion. Vous pouvez vérifier la santé du serveur, gérer des services (comme Docker), modifier des fichiers et interroger des bases de données.

Quand l’utiliser

  • ✓Vérifier si un serveur fonctionne correctement (disque, mémoire, processeur).
  • ✓Redémarrer un service Docker ou consulter ses journaux.
  • ✓Lire ou modifier un fichier de configuration sur un serveur.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sshepherd/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sshepherd/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Vérifie l'état de santé du serveur « my-prod-server » et redémarre le service « web-app ».”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Vous configurez une fois pour toutes les détails de connexion du serveur (sous forme d'alias) en dehors du chat. Ensuite, vous demandez à l'IA d'utiliser cet alias pour exécuter des commandes précises, comme vérifier l'état de santé ou gérer des services.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

sshepherd

Overview

sshepherd is a compiled Bun/TypeScript CLI that lets an agent operate a real remote server over SSH — health checks, docker/systemd service control, log tailing, config file edits, read-only Postgres introspection, and declarative deploys — without ever seeing a password, private key, hostname, username, or port. Every operation shells out to the system ssh binary through a single transport path and returns the same typed Envelope<T> (ok, alias, data, error), never a raw terminal dump. The agent passes only a name — an ssh alias, a Postgres target, or a deploy recipe — that resolves entirely outside the process.

When to Use This Skill

  • Use when you need to check a remote server's health (disk, memory, CPU, ports, OOM history) without handing the agent SSH credentials.
  • Use when working with remote docker or systemd services — listing, inspecting, or restarting them — or tailing their logs.
  • Use when the user asks to read or edit a remote config file, run a declarative deploy from a named recipe, introspect a remote Postgres database read-only, or audit SSH/security posture on a box.

How It Works

Step 1: Declare targets once, outside any prompt

Every connection detail is declared ahead of time and never appears on the command line: ssh aliases in ~/.ssh/config, Postgres targets in ~/.config/sshepherd/targets.toml, deploy recipes in recipe TOML files. OpenSSH resolves the real HostName/User/Port/IdentityFile internally.

Step 2: Invoke a group + action by name

This repository does not ship the sshepherd executable. The user must install or build a reviewed upstream release outside the current workspace and provide its explicit absolute path. Verify it is an executable regular file, not a symlink, before use. Never auto-discover or execute ./dist/sshepherd from the repository being operated on.

sshepherd <group> <action> [positionals...] [--flag value]

Nine command groups — hosts, check, logs, services, deploy, config, db, files, security — 52 ops total. Output is JSON to stdout by default; add --pretty for a human-readable table/key-value view. The response only ever echoes back the alias it was given — there is no host/user/port/ip field anywhere in the response type, structurally.

Step 3: Discover the command surface

"/absolute/path/to/sshepherd" --help                 # list groups
"/absolute/path/to/sshepherd" check --help           # list actions + flags for one group

Examples

Example 1: Server health overview

"/absolute/path/to/sshepherd" check overview lms-server

Returns a JSON envelope with disk, memory, CPU, listening ports, and OOM history for the host behind the lms-server alias — the agent never learns the host's address.

Example 2: Restart a docker service and tail its logs

"/absolute/path/to/sshepherd" services restart lms-server --name api
"/absolute/path/to/sshepherd" logs tail lms-server --name api --lines 100

Example 3: Read-only Postgres introspection

"/absolute/path/to/sshepherd" db tables prod

prod is a pg-target name that resolves to how to reach psql on a host — never a database password. psql runs inside the target container, authenticated by peer/trust/.pgpass already on the remote.

Best Practices

  • ✅ Declare every alias/target/recipe ahead of time in ~/.ssh/config / targets.toml / recipe TOML — never inline connection details.
  • ✅ Pass only names (alias, pg-target, recipe) to the CLI; let OpenSSH own authentication.
  • ✅ Use --pretty for human review and default JSON output for machine parsing.
  • ❌ Don't try to inject a hostname, user, port, or password into a command — the CLI has no field for them.
  • ❌ Don't reach for the ssh2 npm library or hand-rolled SSH; the whole point is delegating to the trusted system ssh binary.

Limitations

  • This skill does not replace environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, or safety boundaries are missing.
  • Requires the system OpenSSH client and pre-declared aliases/targets/recipes; it cannot connect to a host that has not been configured outside the agent.
  • Postgres access is read-only introspection by design.

Security & Safety Notes

…

Questions fréquentes

L'IA verra-t-elle mon mot de passe ou ma clé SSH ?

Non. L'IA utilise uniquement un « alias » que vous configurez à l'avance. Les détails de connexion réels sont gérés de manière sécurisée par votre système.

Comment l'IA sait-elle à quel serveur accéder ?

Vous définissez à l'avance des « alias » pour vos serveurs dans un fichier de configuration. L'IA utilise ces alias pour savoir à quel serveur se connecter.

Puis-je faire n'importe quelle action sur le serveur ?

Vous pouvez gérer des services, consulter des journaux, modifier des fichiers et interroger des bases de données. Les actions qui modifient le serveur (comme un redémarrage) demandent une confirmation supplémentaire.

Détails

Description originale de l’auteur

Zero-knowledge SSH ops CLI — server health checks, docker/systemd control, log tailing, Postgres introspection, and declarative deploys, without ever exposing credentials to the agent.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#6302
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires