infra-verification

A verification process for infrastructure files and scripts by actually running them, not only checking whether their text looks valid.

In plain words
What is it for?
It is for building Docker images, validating Docker Compose files, checking shell scripts, testing CI workflow files, and trying launcher options such as --help or --dry-run.
Why use it?
It reveals runtime problems in Docker builds, deployment workflows, shell scripts, and launch commands that ordinary code tests may miss.

Cursor rule for Cursor

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 rules/gosha70/code-copilot-team/infra-verification
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Cursor.

Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00023 $0.00552
Opus 5 $0.00012 $0.00276
Sonnet 5 $0.00005 $0.00110
Haiku 4.5 $0.00002 $0.00055

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

Security

Grade A, and why

infra-verification scanned grade A with 0 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/cursor/.cursor/rules/infra-verification.mdc · 57 lines

How it starts

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

Infrastructure Verification — "Build It, Run It"

Principle

Any artifact whose correctness cannot be verified by a language-level test runner MUST be executed before committing. This includes: Dockerfiles, docker-compose files, shell scripts, CI workflows, launcher scripts, and hook scripts.

Verification Commands by Artifact Type

Artifact Minimum Verification Full Verification
Dockerfile docker build -t verify . Build + run + healthcheck
docker-compose.yml docker compose config docker compose up --build -d + healthcheck + down
.sh script bash -n script.sh Run with --help or --dry-run if supported
.github/workflows/*.yml actionlint (if available) YAML schema validation
Launcher flags Run <launcher> --help Run with new flag and verify output

Environment Failure vs. Artifact Bug

When infrastructure verification fails, distinguish:

  • Artifact bug (Dockerfile syntax, wrong base image, missing COPY): Fix the artifact.
  • Environment issue (Docker daemon not running, network timeout): Report the environmental prerequisite. Do NOT suggest skipping the verification — help the user fix their environment.

Health Probes

Docker healthchecks MUST use dedicated health endpoints (/actuator/health, /healthz, /health), not business endpoints. Business endpoints may require auth, have side effects, or return errors unrelated to service health.

Demo Endpoints

Demo/example endpoints MUST return meaningful sample data, not empty stubs ([], null, {}). Verify each endpoint with a test request and confirm the response is non-empty and structurally correct.

Multiplexer-Aware Verification

When the project uses a terminal multiplexer (detected via claude-code, $TMUX, or $CMUX_WORKSPACE_ID):

  • UI-facing features (banners, status messages) must be verified inside the active multiplexer session
  • Environment variables must be passed directly to processes (not via multiplexer env injection for already-running processes)
  • Test launcher flags by actually running the launcher command

Read the full file on GitHub · 57 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. 2d ago First seen · 57 lines · 23 tokens per session scan A b4a180dfede7

Subscribe to this mod's changes

infra-verification is a cursor rule published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 552 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.