# production-validator

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.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/testing/production-validator.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/production-validator

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/production-validator.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/production-validator.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/production-validator.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/testing/production-validator.md

## When to use it
- 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 implemented` throw that survived to the release branch

## Example prompts
- 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`.

## Similar
- [meticulous-use-session-data](https://affpapa.org/en/nevibecode/skills/meticulous-use-session-data.md) — skill · 9000 installs
- [dart-generate-test-mocks](https://affpapa.org/en/nevibecode/skills/dart-generate-test-mocks.md) — skill · 20300 installs
- [testing-in-production](https://affpapa.org/en/nevibecode/skills/testing-in-production.md) — skill · 1300 installs
- [testing](https://affpapa.org/en/nevibecode/skills/mindrally-testing.md) — skill · 888 installs
- [gjalla-test-audit](https://affpapa.org/en/nevibecode/skills/gjalla-test-audit.md) — skill · 888 installs
- [702-technologies-wiremock](https://affpapa.org/en/nevibecode/skills/702-technologies-wiremock.md) — skill · 318 installs

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
