/corgi:corgifrom corgi
Writes and explains corgi-compose.yml files and the corgi CLI for multi-service projects. Handles db drivers, healthchecks, tunnels, commands, and flags. Not for starting or debugging stacks.
Ships in corgi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read ../_shared/conventions.md first.
Done when: the yml passes corgi doctor, or the question is answered with the exact command or field.
Corgi (https://github.com/Andriiklymiuk/corgi) runs multi-service projects from a single corgi-compose.yml. It handles: cloning service repos, starting databases in Docker, seeding from dumps, generating .env files with cross-service URLs, and running all services concurrently.
Don't fall back to generic docker-compose / npm advice if a corgi-compose.yml is present - corgi is the authoritative entry point for that project.
corgi run is long-runningcorgi run blocks indefinitely and streams logs. Never run it synchronously - it will hang your shell. For agents, prefer corgi run --detach (returns immediately; see the lifecycle line below). See references/long-running.md before invoking it foreground.
Safe synchronous probes:
corgi doctor (alias check) - preflight: tools installed, Docker up, ports freecorgi status (aliases health, healthcheck) - post-run: TCP/HTTP probe each portBoth exit 0 on success, 1 on failure. Add global --json for machine-readable output. Driving corgi from an agent: see https://github.com/Andriiklymiuk/corgi/blob/main/docs/agents.md.
Corgi auto-detects non-interactive mode (CI/agent env vars like CLAUDECODE, or no TTY) and errors with exit code 2 instead of prompting; --interactive forces prompts back. Global --json emits pure JSON on stdout (doctor, status, list, config, ps, docs --json-schema; run --json prints a startup summary then streams logs to stderr). Exit codes: 0 success, 1 failure, 2 usage/missing input. Every JSON error carries a fix (the next step) - act on it before reading docs. To learn one thing, ask the binary: corgi vocab <E_CODE|compose key|command|--flag> (MCP: corgi_vocab) instead of loading the schema or a guide. When corgi made you take several tries or a doc was wrong, record it: corgi feedback note "<what happened>". Full guide + recipes: https://github.com/Andriiklymiuk/corgi/blob/main/docs/agents.md.
Detached lifecycle (preferred for agents): corgi run --detach (starts services that outlive corgi, returns immediately, errors E_ALREADY_RUNNING if already running - use --force), then corgi ps/status for real running/crashed status, corgi stop [--service x] to tear down, corgi restart for full-stack restart. See the "Lifecycle (detached)" section in https://github.com/Andriiklymiuk/corgi/blob/main/docs/agents.md.
corgi tunnel is also long-running (one tunnel subprocess per service, blocks until Ctrl+C). Background it the same way you background corgi run. See references/long-running.md if invoking from an agent.
| Task | Read |
|---|---|
| One key, flag, command or error code | corgi vocab <name> (--json; MCP corgi_vocab) - before any reference |
A command failed under --json | its fix field, then corgi vocab <code> |
Writing a new corgi-compose.yml | references/yml-schema.md then references/db-drivers.md |
Service repo has a Dockerfile / own docker-compose (run without start: scripts, --docker flag, runner options) | references/yml-schema.md#dockerfile-services-when-start-is-optional |
| Picking a db driver (port, image, env prefix) | references/db-drivers.md |
Adding healthCheck: to a service or db | references/healthchecks.md |
corgi doctor or corgi run failed | references/debugging.md |
| Explaining / choosing a CLI flag | corgi vocab <command> or corgi vocab --<flag>; the tour in references/commands.md |
| Setting up webhook tunnels (Stripe/GitHub/e-sign/etc.) | https://github.com/Andriiklymiuk/corgi/blob/main/docs/tunnel.md (full) or references/commands.md#corgi-tunnel-services |
| Producing a service map / relation diagram for the project | run /corgi-describe (see references/describe-output.md) |
Running corgi run inside an agent loop | references/long-running.md |
Driving corgi non-interactively (--json, exit codes, scaffolding flags) | https://github.com/Andriiklymiuk/corgi/blob/main/docs/agents.md |
| Driving corgi from an MCP client (Claude Code / Desktop / the phone connector) | references/mcp-tools.md; transport, auth and tunnels in https://github.com/Andriiklymiuk/corgi/blob/main/docs/mcp.md |
| Persisting / re-reading service logs after a crash | references/commands.md#corgi-logs (corgi run --logs + corgi logs) |
| Opening a DB shell (psql / redis-cli / mongosh / …) | references/commands.md#corgi-db-shell-service-name |
| Running corgi in CI / disabling spinners and color | references/commands.md#corgi-run-flags (--ci, auto-detected from CI env) |
| Booting the whole stack in a CI job / cross-repo e2e on PR branches | the ci skill |
| Desktop notifications on service crash | references/commands.md#corgi-notifications (corgi notifications on|off|test) |
Load only what the task needs. Do not read every reference every time.
Fresh project from scratch: use the /corgi-new slash command, or: write corgi-compose.yml → corgi doctor → start corgi run in background → corgi status.
Document an existing project: /corgi-describe parses corgi-compose.yml and writes a detailed Markdown doc (services, dbs, env wiring, tunnels, scripts) plus a Mermaid relationship diagram to docs/corgi-services.md. Read-only - does not touch services. Built-in corgi --describe only prints per-service JSON during parse (and does not short-circuit - the underlying command, e.g. run, still executes); the slash command is the richer, side-effect-free alternative.
Existing repo with corgi-compose.yml: this file is the single source of truth for how services start. Do not invent npm run dev, docker compose up, or per-service shell commands - use corgi run. Look at db_services: to know what databases exist and at services: to know what service repos are expected.
User says "start the project" / "run the backend": check for corgi-compose.yml first (preflight in ../_shared/conventions.md). If present, corgi is the answer.
corgi run # start everything (long-running, background it); persists stdout/stderr to .corgi/corgi_services/.logs/
corgi run --logs=false # opt out of log capture for this run
corgi run --docker # run docker-capable services (Dockerfile / repo compose) in containers instead of start scripts
corgi run --dry-run # plan only; prints each service's resolved mode (native | docker (Dockerfile) | docker (repo compose) | docker (image))
corgi build # pre-build all docker-capable service images in parallel, start nothing (CI cache warmer)
corgi run --ci # CI-friendly: suppress spinners, banners, colors (auto-on when CI=true)
corgi run --service-branch api=feat/x # run a service on a branch in an isolated reused worktree (non-destructive)
corgi run --service-dir api=/path # run a service from an existing dir (e.g. a git worktree); repeatable, mix freely
corgi run --feature ABC-123 # every repo that has this branch runs from a worktree for it; the rest stay put
corgi worktree list|prune # list / remove worktrees corgi made for --service-branch
corgi init --depth 1 # shallow-clone every service repo (CI)
corgi logs --dump ./ci-logs # copy each service's newest run into a dir (CI artifacts)
corgi logs # interactive picker: browse + tail persisted logs (needs a prior corgi run)
corgi logs --service api # skip service picker, jump to run picker for "api"
corgi logs --all # merge newest run of every service into one timestamp-sorted stream
corgi logs --idle 0 # tail forever (default exits after 30s of dead-air)
corgi logs --prune # delete all captured logs
corgi doctor # preflight checks (tools, docker, ports)
corgi validate # statically validate corgi-compose.yml
corgi test --service api # run a service's `test` script in its resolved env (--ensure-deps waits on deps)
corgi exec api -- <cmd> # one-off command in a service's resolved env (migrate/seed/etc); --ensure-deps to wait on deps
corgi env api # print a service's fully-resolved environment (read-only)
corgi config # show current user settings (~/.corgi/config.yml)
corgi notifications on|off|test # toggle/test desktop crash notifications
corgi status # health check (one-shot)
corgi status --ready # block until all healthy / timeout (CI-friendly)
corgi status --watch # BLOCKS until Ctrl+C - interactive only; agents use --ready --timeout
corgi tunnel # public HTTPS tunnels (long-running) - default cloudflared
corgi db shell [name] # interactive DB shell inside running container (psql/redis-cli/mongosh/…)
corgi db shell [name] -e "SELECT 1" # one-shot query, exit; CI-friendly
corgi db snapshot [name] [svc] # fast physical Postgres snapshot (built indexes+matviews); postgres family only
corgi db restore [name|path] [svc] # restore pgdata from a snapshot → up on built data, zero recompute
corgi init # scaffold db_services/ + cloned repos
corgi create # interactive yml editor
corgi clean -i db # stop+remove db containers (also: services, corgi_services, all)
corgi pull # git pull in every service dir
corgi checkout main # every repo → main (or its own default branch), then pull
corgi context --json # one-call orientation: topology + health + every repo's branch/dirty
corgi why api --json # why one service is down: deps, port owner, exit code, env, log tail
corgi logs --service api --wait-for "Listening on" --timeout 90s # block, don't poll
corgi checkpoint before-x # mark every repo · corgi restore before-x puts it all back
corgi test --changed # only the repos that differ from --base
corgi env api --explain DATABASE_URL # which source won
corgi events --follow --json # lifecycle stream instead of polling status
corgi run --isolate agent-a --detach # own ports/db/containers; corgi leases lists them
corgi version # show installed version
corgi --describe # built-in: per-service JSON during parse; does NOT short-circuit. Use /corgi-describe for a rendered doc + Mermaid diagram
Full surface in references/commands.md.
references/commands.md (opens in a new tab)references/db-drivers.md (opens in a new tab)references/debugging.md (opens in a new tab)references/describe-output.md (opens in a new tab)references/healthchecks.md (opens in a new tab)references/long-running.md (opens in a new tab)references/mcp-tools.md (opens in a new tab)references/yml-schema.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub andriiklymiuk/corgi --plugin corgi33 skills in this plugin
/agentUse for corgi agent mode: Remote Control from a phone, the session board ("who is waiting on me"), watching trackers and PRs ("tell me when someone comments"), why a watch fired, and handoffs ("leave a handoff for ABC-7"). NOT compose authoring (corgi), starting a stack (run), debugging (debug)./alignUse when the user says "align", "let's agree first", or a request can be read two ways before any code. Reaches a shared understanding cheaply, then codes. NOT a plan gate or a long interview./autopilotUse for a SUPERVISED loop that drains the ticket queue into draft PRs: "autopilot", "keep shipping the queue", "drain the backlog overnight". One spec gate per batch, never merges. NOT a single batch (/corgi-queue).Other plugins' skills for the same job