infra

infra is a command for Claude Code from dinhnguyenngoc/spec-driven-claude-code. It costs 8 tokens per session (5,731 once invoked), scanned B, original, MIT.

A command that creates Docker files and configuration for running an application locally and deploying it with Docker Desktop. Docker packages an application and its dependencies into repeatable containers.

In plain words
What is it for?
Use it to create the Dockerfile and Docker Compose setup needed to build, run, health-check, and support the project's declared technology stack locally.
Why use it?
It gives the project a consistent development and deployment environment. This avoids requiring every developer or server to configure the same runtime by hand.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dinhnguyenngoc/spec-driven-claude-code/infra
Clone the repo
git clone --depth 1 https://github.com/dinhnguyenngoc/spec-driven-claude-code

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for infra

README.md
[![agentmods](https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/infra.svg)](https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/infra)
Your own site
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/infra"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/infra.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,731 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.05731
Opus 5 $0.00004 $0.02865
Sonnet 5 $0.00002 $0.01146
Haiku 4.5 $0.00001 $0.00573

Measured 5d ago against content hash 9fc92ce01dfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

infra scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- [ ] `docker compose build` succeeds without warnings

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# SqlClient/Npgsql CRASH on connect. Required for any DB driver. (wget: needed by the HEALTHCHECK below.)
.claude/commands/infra.md · 401 lines

How it starts

The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/infra — Docker Infrastructure

"Containerize everything."

Purpose

Create Docker infrastructure for local development and deployment on Docker Desktop.

Workspace Mode: if the session root declares Mode: workspace → resolve the target repo per CLAUDE.md §Workspace Mode before anything else; every path, probe, and gate below is relative to the target repo, and the workspace disk-check applies at the gate.

Stack Profile note: read Project Profile first. Core = Node.js → the Dockerfile swaps the dotnet images for a node:20-alpine multi-stage (npm ci && npm run build → pruned runtime via npm ci --omit=dev; same §4 must-haves apply: non-root, HEALTHCHECK, pinned tags — the icu-libs/invariant-mode block in the template is .NET-only, do not copy it into a node image), and the EF-migration notes map to the declared ORM's equivalent (prisma migrate deploy via a startup flag or migrator container). Core = PHP → pick ONE of the two sanctioned container shapes in rules/overrides/framework-php-laravel.md §J and keep it for the whole repo: php-fpm + nginx sidecar (two compose services — the nginx container carries the /health HEALTHCHECK, fpm uses a FastCGI ping) or FrankenPHP / Octane single container (HEALTHCHECK hits /health directly). .dockerignore additionally excludes vendor/, .env, storage/logs; the EF-migration notes map to php artisan migrate --force (startup command or a one-shot migrator service); same §4 must-haves apply — non-root, pinned tags, HEALTHCHECK — and the icu-libs/invariant-mode block is .NET-only, never copied into a PHP image. Database → the DB service follows the Profile: SQL Server default (arm64: Azure SQL Edge) · Oracle / MySQL / PostgreSQL / MongoDB → corresponding image + healthcheck per rules/overrides/database-*.md (MongoDB: mind the replica-set requirement for transactions — override §F). Observability ELK → Elasticsearch/Kibana instead of Grafana/Prometheus (rules/overrides/monitoring-elk.md).

Read the full file on GitHub · 401 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 401 lines · 8 tokens per session scan B 9fc92ce01dfe

Subscribe to this mod's changes

infra is a command published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (20 stars, last pushed 6d ago), licensed MIT. It adds 8 tokens to every session and 5,731 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 2 findings (strips warnings and disclaimers, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.