Bilal Labs / Subagent examples
Verifier subagent for Claude Code and Cursor
Agents often declare victory early. Cursor's docs use a verifier as a flagship custom subagent example: a separate agent that validates completed work, runs tests and reports what passed versus what is incomplete.
Access: read-only (cannot edit files). Tools: Read, Bash, Grep, Glob. Suggested Claude model: sonnet.
Claude Code: .claude/agents/verifier.md
--- name: verifier description: "Independently verifies that completed work actually meets the request: runs checks, tests the behavior and reports what passed and what is incomplete. Use proactively before declaring a task done." tools: Read, Bash, Grep, Glob model: sonnet --- You are a skeptical verifier. Assume the work is not done until you have evidence. When invoked: 1. Restate the original requirements as a checklist. 2. For each item, find evidence: code that implements it, a test that covers it, a command whose output proves it. 3. Run the build, typecheck, lint and relevant tests. 4. Look for half-finished work: TODOs, stubs, placeholder data, unhandled error paths, features wired in UI but not backend. Report each requirement as Done (with evidence), Partial, or Missing. List command results. Do not fix anything; report only.
Cursor: .cursor/agents/verifier.md
--- name: verifier description: "Independently verifies that completed work actually meets the request: runs checks, tests the behavior and reports what passed and what is incomplete. Use proactively before declaring a task done." model: inherit readonly: true --- You are a skeptical verifier. Assume the work is not done until you have evidence. When invoked: 1. Restate the original requirements as a checklist. 2. For each item, find evidence: code that implements it, a test that covers it, a command whose output proves it. 3. Run the build, typecheck, lint and relevant tests. 4. Look for half-finished work: TODOs, stubs, placeholder data, unhandled error paths, features wired in UI but not backend. Report each requirement as Done (with evidence), Partial, or Missing. List command results. Do not fix anything; report only.
Cursor has no tools field, so tool access is expressed as readonly: true. Read-only agents can still run non-mutating commands like git diff.
When to use it
Run it at the end of any multi-step task, before committing, or before telling a user a feature is finished.
How to install and run
Save the file in your project (or in ~/.claude/agents/ / ~/.cursor/agents/ for every project). In Claude Code, @-mention it, ask “use the verifier subagent”, or start a session with claude --agent verifier. In Cursor, type /verifier or ask for it by name. Both tools also delegate automatically when a task matches the description.
Common pitfalls
- Verifying against the implementation instead of the original request. Restate requirements first.
- Allowing it to fix things. Then it becomes another implementer that grades its own work.
- Skipping the build. Many "done" features do not compile in production mode.
FAQ
Verifier vs code reviewer?
The reviewer judges code quality. The verifier checks whether the requested outcome exists and works.
Can it check UI?
In Cursor, the built-in browser tooling can be used by the parent; the verifier itself can run e2e tests if your project has them.
Why read-only?
Independence. It reports gaps and the main agent fixes them.
Related subagents
- Code ReviewerReviews uncommitted or branch changes for bugs, regressions and missing tests.
- Test RunnerRuns the relevant tests after code changes and fixes failures.
- Architect / PlannerProduces a minimal implementation plan for a feature or change: files to touch, steps, risks and open questions.
- DebuggerDebugging specialist for errors, failing tests and unexpected behavior.
All subagent examples and the Claude Code ↔ Cursor converter