d9c-fleet
Survey all hosts d9c knows at once — reachability, engine versions, running and stopped containers, unhealthy services, CPU/memory capacity and disk usage per host — and compare environments such as staging and production. Use when someone asks for an overview, health report or capacity check across several hosts, or how two environments differ.
- License 许可
- MIT
- 所属仓库
- kirg0/d9c
- 最近更新
- 2026-10-28
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- d9c-fleet
- description
- Survey all hosts d9c knows at once — reachability, engine versions, running and stopped containers, unhealthy services, CPU/memory capacity and disk usage per host — and compare environments such as staging and production. Use when someone asks for an overview, health report or capacity check across several hosts, or how two environments differ.
03 SKILL.md 正文
Fleet overview with d9c
Follow the base d9c skill. Everything here is read only.
Which channel
- The CLI fans a read command out to several saved hosts in one call:
--all-hosts, or--host a,bfor a subset (up to 8 hosts are queried in parallel). - An MCP session serves one host. With MCP alone, list the hosts with
d9c_hosts, report the session's own host with the tools below, and say which hosts need their own session (d9c mcp --host <name>) or the CLI.
1. The hosts
d9c hosts ls/d9c_hosts: name, URL,read_onlyandagent_tierper host.
2. One summary per host
d9c info --all-hosts/d9c_system{action: "info"}: engine version, container counts (running, paused, stopped), images, CPUs and total memory.- The result is a list with one entry per host:
dataon success,erroron failure. A"partial": trueenvelope (exit 8) means some hosts did not answer — report them as unreachable with their error code and hint (connection,auth_required…); never retry with a different host key or credentials.
3. Health
d9c ps -a --all-hosts --fields name,state,status,health,image/d9c_containers{action: "ps", all: true}.- Flag per host: containers with health
unhealthy, staterestarting, orexitedwith a non-zero code instatus. Investigate one withd9c-troubleshoot. d9c compose ls --all-hosts/d9c_compose{action: "ls"}: projects that arepartialorstopped.
4. Capacity
d9c stats --all-hosts/d9c_system{action: "stats"}: one CPU/memory sample per running container. Sum memory per host and compare withmem_totalfrominfo; compare CPU percentages withncpu(100% = one core).d9c system df --all-hosts/d9c_system{action: "df"}: image, container, volume and build-cache usage with the reclaimable part — point tod9c-cleanupfor hosts with a lot to reclaim.- Keep output small on large fleets:
--fieldsand--limit, or one host at a time.
5. Compare environments
- Run the same read on both:
d9c ps --host staging,prod --fields name,image,state. - Compare by container or compose service name: image tags that differ, services missing on one
side, different health. For compose projects,
d9c compose config <project> --host stagingand the same for prod show configuration drift (secrets stay masked).
Report
A table per host — reachable, engine, running/total, unhealthy, CPU and memory headroom, disk reclaimable — then the problems ordered by severity, each with the command that shows it.
04 同仓库更多 Skills
d9c
Base guide for managing Docker, Podman, nerdctl or CRI-O hosts through d9c — installing it, saved hosts, the JSON output contract and exit codes, the write policy and the untrusted-data rule. Use when a task involves containers, images or compose projects on a host d9c manages and no more specific d9c skill fits — read it before the first d9c command or d9c_* MCP tool call; the other d9c skills build on it.
d9c-troubleshoot
Diagnose a container that crashed, keeps restarting, is unhealthy or is slow, using d9c — exit codes, OOM kills, restart counts, health checks, logs and CPU/memory. Use when someone asks why a container is down, flapping or sluggish.
d9c-security-audit
Read-only security review of the containers on a d9c host — privileged mode, root users, the engine socket mounted into containers, sensitive host paths, ports published on all interfaces, mutable latest tags, missing resource limits and secrets in environment variables. Use when someone asks whether a host or stack is configured safely or wants a container hardening report.
d9c-net-storage
Networks and volumes on a d9c host — which containers share a network, why two containers cannot reach each other, which containers use a volume, and creating a network or volume. Use when someone reports connection refused or name resolution failures between containers, asks where data is stored, or needs a new network or volume.
d9c-logs
Investigate container and compose project logs with d9c within a token budget — time windows, regex filters, per-project merged logs and correlation with engine events. Use when the answer is somewhere in the logs, such as an error spike, a request trace or what happened at a given time.
d9c-lifecycle
Start, stop, restart, kill or remove containers with d9c — by name, ID prefix or a filter such as label or image, with a dry-run plan, the user's approval for destructive steps, and a wait until the result is running or healthy. Use when someone asks to bring containers up or down, bounce a service, or delete containers.