/harness:bug-reproducerfrom Harness (обвязка)
Discovers likely bugs in a codebase, ranks candidates by confidence, and proves or rejects them with minimal regression tests. Handles bug reports, stack traces, and regressions.
Ships in Harness (обвязка). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn a codebase or bug report into evidence. When no bug is supplied, discover concrete candidates from the code and its contracts, then try to prove the strongest candidates with focused tests. Never present a suspicion as a confirmed bug.
Invocation alone to hunt for unknown bugs is inspection-only. A direct request to fix or implement a reported bug, or to find and fix bugs in a named repository, authorizes the normal reversible reproduction tests and causal production edits inside that stated task. A direct request to reproduce a reported bug or create its regression test likewise authorizes the normal reversible reproduction files and commands, but not a production repair. Record the matching task scope and proceed without stopping for duplicate confirmation, even when the exact responsible file is learned during diagnosis. Do not ask the user to approve the same scope twice.
If the user asked only to inspect, audit, find, or isolate, do not infer permission to create reproduction files or change production code. A direct reproduction or regression-test request authorizes only the normal reversible reproduction work described above; it does not authorize a production repair. Before a gate that has not been satisfied, do not create or edit project files, install dependencies, run formatters or migrations, modify configuration, generate reports, create worktrees, or execute commands likely to mutate project state. Read source, configuration, documentation, existing tests, user-supplied logs, and Git history. Run an existing targeted test only when it is clearly safe and does not require project changes.
When the current request has not explicitly authorized creating and running a reproducer, present and stop at:
## Bug candidates
| # | Candidate | Contract evidence | Trigger | Location | Confidence |
|---|---|---|---|---|---|
| 1 | ... | ... | ... | file:line | high/medium |
## Proposed bug test
- Candidate(s) to test:
- Why each could be a real bug:
- Exact files to create or edit:
- Minimal fixture/input:
- Test or harness command:
- Signal that will confirm each bug:
- Main risk or uncertainty:
No project files have been modified. Do you want me to create and run these tests?
List only candidates backed by a reachable code path, a defensible expected behavior, and a specific triggering input or state. Approval covers only the displayed reproduction files and commands. A direct request to reproduce a supplied symptom or write its regression test already satisfies this gate: record that scope and continue without requiring file names that diagnosis has not yet established. Test one strong candidate by default; batch at most three only when their files and commands are all explicit.
When the current request has not already authorized a causal production repair, present and stop at:
## Proposed fix
- Reproduction status: REPRODUCED
- Proven bug:
- Root cause:
- Exact production files to change:
- Proposed transformation:
- Behavior that must remain identical:
- Regression and broader test plan:
- Main risk:
The bug is proven by a failing test, but no production fix has been applied. Do you want me to apply this exact fix?
Continue when the current request already covers the causal repair or after explicit approval. If the file list, dependencies, public behavior, risk tier, or approach materially changes beyond that authority, request fresh approval. Never bundle unrelated cleanup or another fix into the approved patch.
hunt-and-prove — Default when no specific bug is supplied. Discover, rank, and test likely correctness bugs.reproduce-only — Stop after a minimal failing case is proven. Use when the user asks only to find, reproduce, isolate, or write regression tests.prove-fix — Use for a reported bug or after a discovered candidate is proven and the user wants it fixed. Apply only gates not already satisfied by the current request, then prove red to green.flaky — Reproduce timing, ordering, seed, isolation, or concurrency-dependent failures across repeated controlled runs. Do not label one intermittent failure as reproduced.references/bug-discovery-playbook.md before ranking candidates.Rank candidates using:
Show no more than five candidates and label confidence high, medium, or low. Do not propose testing low-confidence candidates while a stronger one exists. If no candidate survives this filter, return NO_BUG_PROVEN and identify the next useful evidence instead of inventing a bug.
scripts/capture_command.py when appropriate:python3 "${CLAUDE_SKILL_DIR}/scripts/capture_command.py" --label reproduced --output reproduced.json -- npm test -- path/to/regression.test.ts
REPRODUCED, NOT_REPRODUCED, or INCONCLUSIVE for each tested candidate. Clearly separate rejected speculative tests by default. Delete them only with explicit user authority.python3 "${CLAUDE_SKILL_DIR}/scripts/capture_command.py" --label fixed --output fixed.json -- npm test -- path/to/regression.test.ts
python3 "${CLAUDE_SKILL_DIR}/scripts/capture_command.py" --label relevant-check --output relevant-check.json -- npm test -- path/to/affected-area
python3 "${CLAUDE_SKILL_DIR}/scripts/compare_evidence.py" reproduced.json fixed.json result.json --reproduction confirmed --relevant-evidence relevant-check.json
When the exact targeted reproducer is genuinely the only proportionate relevant check, do not reuse fixed.json as --relevant-evidence or pretend an additional command ran. Record that boundary explicitly instead:
python3 "${CLAUDE_SKILL_DIR}/scripts/compare_evidence.py" reproduced.json fixed.json result.json --reproduction confirmed --targeted-scope-sufficient --scope-rationale "Pure function; no additional integration boundary exists."
FIX_REGRESSION.FIX_UNVERIFIED.FIX_UNVERIFIED, unless the project genuinely has no additional meaningful check and --targeted-scope-sufficient records the explicit rationale.When the user supplies a symptom, error, screenshot, stack trace, or failing behavior:
references/reproduction-playbook.md when selecting the smallest credible layer.REPRODUCED — A focused case fails deterministically for the predicted or reported reason.NOT_REPRODUCED — The approved case does not produce the predicted failure.NO_BUG_PROVEN — Read-only discovery or approved candidate tests did not prove a correctness defect.INCONCLUSIVE — Environment, nondeterminism, missing access, or ambiguous signals prevent a conclusion.STILL_FAILING — The same reproducer continues to fail after an attempted fix.FIX_UNVERIFIED — The reproducer passes, but proportionate correctness evidence or an explicit targeted-only scope rationale is missing.FIX_REGRESSION — The reproducer passes or changes, but a captured relevant correctness check fails.FIX_PROVEN — The same reproducer goes red to green and either a captured additional proportionate relevant check passes or targeted-only scope is explicitly justified.Never claim a bug from code inspection alone. Never claim a fix without red-to-green evidence.
Create a native report only when the user requests one or the repository requires one. Use the existing project evidence or audit location specified by the user or repository; do not create a generic outputs/ directory. Prepare context JSON following references/report-schema.md, including discovery scope and ranked candidates when using hunt-and-prove, then run:
python3 "${CLAUDE_SKILL_DIR}/scripts/generate_report.py" result.json context.json path/to/existing-evidence-location/bug-reproducer-report.md
Include discovery evidence, tested candidates, minimal reproduction, root cause, approvals and scope, changed files, red/green commands, broader checks, limitations, and residual risks. Link the Markdown report in the final response.
Lead with the strongest evidence label, then report:
If no bug is proven, preserve the project and say so plainly. A clean hunt is evidence about the inspected scope, not proof that the entire codebase has no bugs.
python launcher is slow or resolves to a store shim. Record the
runtime in the evidence JSON.--reproduction confirmed as operator input, not independent proof.
compare_evidence.py accepts an additional passing check only through a
captured --relevant-evidence receipt that is distinct from the targeted
reproducer. If the targeted reproducer is sufficient, declare that scope and
rationale explicitly. The agent or a fresh verifier must inspect the captured
commands, exit codes, output, and relevant-check scope before accepting the
status.NOT_REPRODUCED, even if the code
looks suspicious.compare_evidence.py classifies recorded receipts and declared scope; it does
not prove causal root cause, independently run the relevant check, or decide
whether targeted-only scope is actually sufficient.ATTRIBUTION.md (opens in a new tab)LICENSE-upstream (opens in a new tab)agents/openai.yaml (opens in a new tab)references/bug-discovery-playbook.md (opens in a new tab)references/report-schema.md (opens in a new tab)references/reproduction-playbook.md (opens in a new tab)scripts/capture_command.py (opens in a new tab)scripts/compare_evidence.py (opens in a new tab)scripts/generate_report.py (opens in a new tab)scripts/test_compare_evidence.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anastasiyaw/codex-claude-code-config --plugin harness60 skills in this plugin
/agent-harness-designDesigning agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool results, agent budgets (10 types), context trust labels against prompt injection, plan-artifact, approval records, observability and traces, evals (13 categories), event model, streaming buffering, 3rd-party skill install checklist, agentic RAG, self-improving SOP loops, model policy, reasoning effort, and Programmatic Tool Calling adoption gates. Use when building a new Agent SDK app, custom orchestrator, MCP server, Cloudflare Worker with tool calls, agentic RAG pipeline, model router, or model-tier policy; when designing tools and permissions; when writing an agent loop; or when you need trust labels for external content. Do NOT use for improving or auditing an already-built harness (use harness-audit / harness-design instead), nor for ordinary Claude Code sessions where the harness is already given./agents-best-practicesUse when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion. Covers provider-neutral loops, tools, permissions, environment adaptation, planning, durable workflow state, context, skills, observability, evals, and safety for OpenAI, Anthropic, and compatible APIs. Not for implementing an ordinary app feature or reviewing one concrete diff.Other plugins' skills for the same job