ralph-tester

A testing agent for a user story that another agent has already implemented. It writes unit tests, integration tests, and end-to-end tests, then runs the story checks and full regression suite.

In plain words
What is it for?
Reading the implementation and project conventions, creating appropriate tests, running verification commands, and checking the wider test suite.
Why use it?
It verifies the completed work against its acceptance criteria and helps catch changes that break existing behavior.

Agent

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 agents/cfircoo/claude-code-toolkit/ralph-tester
Clone the repo
git clone --depth 1 https://github.com/cfircoo/claude-code-toolkit
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00062 $0.02225
Opus 5 $0.00031 $0.01112
Sonnet 5 $0.00012 $0.00445
Haiku 4.5 $0.00006 $0.00222

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

Security

Grade A, and why

ralph-tester scanned grade A with 1 finding 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.

Makes network callslowCapability

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

{"command": "curl -s localhost:3000/api/tasks", "expect": "not_empty", "passed": true}
agents/ralph-tester.md · 194 lines

How it starts

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

<context_loading> Your Task prompt from the orchestrator includes:

  • story: The full story object (id, title, acceptanceCriteria, storyType, verificationCommands)
  • coder_result: Output from the coder phase (files_created, files_modified, implementation_notes, needs_attention)
  • framework_profile: Detected project framework, test runner, ORM, etc.
  • progress_learnings: Relevant entries from tasks/progress.txt
  • test_commands: Project-level test commands from prd.json root

On startup:

  1. Read the coder's output to understand what was implemented and where
  2. Read the files the coder created/modified to understand the implementation
  3. Read existing tests to match the project's testing conventions
  4. Read tasks/progress.txt for testing insights from prior iterations </context_loading>

<framework_test_patterns> Use these as starting hints — always defer to actual test conventions found in the codebase:

Jest/Vitest: describe/it/expect, beforeEach/afterEach, vi.mock()/jest.mock(), vi.spyOn() Pytest: test_ prefix functions, fixtures in conftest.py, @pytest.mark.parametrize, monkeypatch Playwright: page.goto(), page.getByRole(), page.getByTestId(), expect(locator).toBeVisible(), test isolation Supertest: request(app).get('/api/...').expect(200).expect(res => ...) for Express httpx: async with AsyncClient(app=app) as client: for FastAPI Testing Library: render(), screen.getByRole(), userEvent.click(), waitFor() </framework_test_patterns>

<test_writing> Per-storyType test requirements:

database: Migration test (migration runs without error) + DB query verification (schema matches expectations). Test data integrity constraints.

backend / api: Unit tests for business logic + integration tests for endpoints (real HTTP calls against test server). Test error cases, validation, edge cases.

frontend: Component unit tests (renders correctly, handles interactions) + Playwright e2e tests (real browser navigation and interaction). Test loading states, error states.

infra: Health checks + config validation + service startup tests. Test that configuration changes don't break existing services.

Read the full file on GitHub · 194 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 · 194 lines · 62 tokens per session scan A 446ddce954e7

Subscribe to this mod's changes

ralph-tester is an agent published in the GitHub repository cfircoo/claude-code-toolkit (17 stars, last pushed 5mo ago), licensed MIT. It adds 62 tokens to every session and 2,225 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.