sshepherd
Skill này làm gì
Cho phép agent AI điều khiển máy chủ từ xa qua SSH mà không nhìn thấy mật khẩu hay chi tiết kết nối. Bạn có thể kiểm tra tình trạng máy chủ, quản lý dịch vụ (như Docker), chỉnh sửa file và truy vấn cơ sở dữ liệu.
Khi nào nên dùng
- ✓Khi kiểm tra máy chủ có hoạt động tốt không (ổ đĩa, bộ nhớ, CPU).
- ✓Khi khởi động lại dịch vụ Docker hoặc xem nhật ký của nó.
- ✓Khi đọc hoặc chỉnh sửa file cấu hình trên máy chủ.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/sshepherd/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra tình trạng của “my-prod-server” và khởi động lại dịch vụ “web-app”.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn cấu hình thông tin kết nối máy chủ một lần (như một bí danh) ngoài cuộc trò chuyện. Sau đó, bạn yêu cầu AI dùng bí danh đó để chạy các lệnh cụ thể, như kiểm tra tình trạng hoặc quản lý dịch vụ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
--prettyfor 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
ssh2npm library or hand-rolled SSH; the whole point is delegating to the trusted systemsshbinary.
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
…
Câu hỏi thường gặp
AI có nhìn thấy mật khẩu hoặc khóa SSH của tôi không?
Không. AI chỉ dùng một “bí danh” mà bạn đã cấu hình trước. Thông tin kết nối thực sự được hệ thống của bạn quản lý an toàn.
Làm sao AI biết truy cập máy chủ nào?
Bạn định nghĩa các “bí danh” cho máy chủ trong một file cấu hình trước. AI dùng các bí danh này để biết kết nối đến máy chủ nào.
Tôi có thể làm gì trên máy chủ?
Bạn có thể quản lý dịch vụ, xem nhật ký, chỉnh sửa file và truy vấn cơ sở dữ liệu. Các hành động thay đổi máy chủ (như khởi động lại) cần xác nhận thêm.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6302
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.