AGENT SKILL

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,b for 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_only and agent_tier per 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: data on success, error on failure. A "partial": true envelope (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, state restarting, or exited with a non-zero code in status. Investigate one with d9c-troubleshoot.
  • d9c compose ls --all-hosts / d9c_compose {action: "ls"}: projects that are partial or stopped.

4. Capacity

  • d9c stats --all-hosts / d9c_system {action: "stats"}: one CPU/memory sample per running container. Sum memory per host and compare with mem_total from info; compare CPU percentages with ncpu (100% = one core).
  • d9c system df --all-hosts / d9c_system {action: "df"}: image, container, volume and build-cache usage with the reclaimable part — point to d9c-cleanup for hosts with a lot to reclaim.
  • Keep output small on large fleets: --fields and --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 staging and 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

kirg0
kirg0/d9c

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.

★ 7
kirg0
kirg0/d9c

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.

★ 7
kirg0
kirg0/d9c

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.

★ 7
kirg0
kirg0/d9c

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.

★ 7
kirg0
kirg0/d9c

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.

★ 7
kirg0
kirg0/d9c

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.

★ 7