production-validator — Claude Code subagent: what it does
production-validator — a subagent that hunts leftover mocks and stubs in your code, then runs the tests against a real database, cache and payment API before you deploy.
no license ★ 850 updated 2026-10-26
.claude/agents/production-validator.mdWhat production-validator does
It picks up where unit tests stop. The agent scans src/ for mock, fake, stub, TODO and FIXME, and exercises the code against live services rather than in-memory doubles.
Two hooks carry the work. The pre hook prints a banner and runs that grep; the post hook calls npm run test:production and npm run test:e2e when a package.json exists. Failure paths get checked too: a bad payment key should raise an error instead of slipping through.
Because the checks talk to real systems, working test credentials have to sit in the environment: TEST_DB_HOST, REDIS_HOST, STRIPE_TEST_KEY. Miss them and validation dies on connect. The post hook only fires in a Node project, so elsewhere you get the grep alone.
What it helps with
- catch leftover stubs and TODOs in
src/before a release - run CRUD against a real test database instead of an in-memory double
- confirm the payment integration answers and fails the way it should
- verify cache and email delivery on a live environment
- find a
not implementedthrow that survived to the release branch
Example prompts for the agent
- Validate production readiness: scan
src/for mocks and run the production test suite. - Check that the database, Redis and payment calls hit real services, then report what breaks.
- Walk the codebase before deploy and list every remaining
stub.
How to install production-validator
Manually: put the files in place
.claude/agents/production-validator.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/production-validator.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/production-validator.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about production-validator
How do I install production-validator in Claude Code?
Put the subagent file at .claude/agents/production-validator.md. The copy in ruvnet/agentic-flow is ready to use.
What does production-validator do?
It looks for mocks, stubs and unfinished TODO markers in the source, then tests the app against real databases, caches and third-party APIs. The point is to stop half-built code from reaching production.
What do I need before running it?
Live test credentials in the environment: the test database host and name, Redis and SMTP settings, a payment provider test key. Without them the checks fail at the connection step.