Agent skill
dockerize-http-api
Add docker-compose for HTTP APIs (required before implementing/changing use cases). Provide .env.example + Make targets: up/down/test/lint/build.
Install this agent skill to your Project
npx add-skill https://github.com/frostaura/ai.toolkit.gaia/tree/main/.github/skills/dockerize-http-api
SKILL.md
Dockerize HTTP API (Compose-First)
When to use
Use when:
- The repo exposes an HTTP API and docker-compose is missing or incomplete
- Use-case work is planned (new/change/remove use cases)
- QA Gatekeeper enforces docker-first for HTTP APIs
This is blocking for use-case work.
Inputs
- Detected API stack (.NET / Node / Python / etc.)
- Existing Dockerfile(s) or containerization
- Runtime dependencies (DB, cache, queues)
- Environment variables and secrets requirements
Outputs
docker-compose.ymlat repo root.env.exampleat repo root- Make targets:
make up/make downmake build(if applicable)make test(runs tests appropriate to repo; at least unit)make lint
- Docs updated:
/docs/testing/how-to-run.mdreflects compose + Make usage
Rules
- Prefer repo conventions if present; otherwise standardize.
- Compose must be runnable by default with minimal setup.
- Do not hardcode secrets; use
.env.example. - Keep services minimal; add only what the API needs to run and be tested.
Step 1 — Define the runtime stack
Identify:
- App service (the HTTP API)
- Required dependencies (DB/cache/etc.)
- Ports, health endpoints, migrations/seed steps (if needed)
Step 2 — Add container build/run for the API
Prefer:
- A Dockerfile for the API service (if missing, add one)
- Deterministic builds (pin base images when appropriate)
Ensure:
- container starts the API reliably
- logs go to stdout/stderr
- healthcheck exists if feasible
Step 3 — Create docker-compose.yml (root)
Include:
apiservice- dependency services as needed
- volumes only when necessary
- exposed ports for local dev/testing
- network defaults (keep simple)
Step 4 — Create .env.example (root)
Include:
- non-secret defaults where safe
- placeholders for secrets (
CHANGE_ME) - ports and connection strings with compose service names
Step 5 — Add Make targets (required UX)
Create/extend Makefile:
up: start composedown: stop compose + cleanup as appropriatelint: run canonical lintbuild: build the project (if applicable)test: run canonical tests (at least unit) Optional:logs: follow logssmoke: quick curl check if repo supports it
Step 6 — Validate compose stack
make upbrings system up- API responds on expected port
- Dependency services reachable If credentials/secrets required:
- add MCP blockers/questions via “needs input”
- do parallelizable work, but keep completion blocked
Step 7 — Align docs + skills (blocking if drift)
- Update
/docs/testing/how-to-run.mdwith:make up/down- env setup
- where API is reachable
- If this changes any baseline conventions, update affected skills (skill drift is blocking).
Suggested required_gates[]
- Always include:
build,ci - Usually includes:
lint - If compose is used for integration tests: include
integration
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
stack-default-dotnet-api
Opinionated baseline for .NET HTTP APIs: analyzers/formatting, unit+integration strategy, docker-compose, Makefile targets, and CI wiring.
tasking-and-proof
How the orchestrator must create/manage MCP tasks (todo/doing/done), set required_gates, handle blockers/questions, and record low-context proof for completion.
integration-testing-http
Run curl-style integration checks against the docker-compose stack for HTTP APIs. Required for use-case changes.
spec-consistency
Prevent and repair drift between `/docs` (source of truth), code, tests, CI, and runtime artifacts. Use before marking work done.
gaia-process
End-to-end Gaia SDLC workflow (Repo Explorer → drift/CI fixes → task graph → gated delivery → QA veto → MCP proof). Use for any work in a repo.
stack-default-web-ts
Opinionated baseline for JS/TS web repos: lint/format, tests, Playwright, docker (if HTTP API), Makefile targets, and CI wiring.
Didn't find tool you were looking for?