FormingPromptclaude-codepublished fresh until

Agent Skills: my agent's tests copy the code's bug, how do I fix that?

Summary As of November 2026, Agent Skills says to reproduce a bug with a failing test before changing the implementation. Claude Code documents review against the spec in a fresh context; its terminal command for an independent diff review is /code-review.

Not for configuring pytest fixture scopes.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
APrompt · v1.0.0Spec first card
How you use itYou paste it when you need it
What it can dowrites files · runs shell
What's inside
APrompt · v1.0.0Spec first card
How you use it
You paste it when you need it
What it can do
writes files · runs shell
What's inside

What this thread does

Do first: Write a regression that fails on the reported behavior before editing the implementation; use /code-review for a separate terminal diff review.

Short answer

The Agent Skills TDD procedure starts a bug fix with a failing reproduction, then changes the implementation and runs the full suite. Claude Code separately documents checking a diff against the specification with a fresh reviewer.

What to do

1. Discover the repository’s test runner and focused-test command from its configuration, neighboring tests and documented commands. The TDD skill explicitly says not to assume a universal test command. 2. Write the reproduction before the fix and run the focused test to observe its failure. Change the implementation until that test passes, then run the full suite. 3. For an independent review in Claude Code’s terminal interface, run /code-review; the documented reviewer uses a fresh subagent that has not seen the conversation. 4. For a specification-focused review, give the reviewer the diff and SPEC.md, asking it to check every requirement and whether the listed edge cases have tests. The official example asks the reviewer to report correctness gaps and skip style.

Limits and open questions

The TDD source distinguishes behavioral changes from pure configuration and static documentation edits. The review documentation does not claim that a passing suite proves the specification is correct. These sources do not establish a mutation score threshold for detecting shared assumptions.

Not for: pytest fixture scope configuration.

Sources

Checked

2026-11-17: read Agent Skills test-driven-development source, Claude Code checks and specification review; no command was run.

Started from a post by @elidanipipe, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Agent Skills: my agent's tests copy the code's bug, how do I fix that?
Summary: As of November 2026, Agent Skills says to reproduce a bug with a failing test before changing the implementation. Claude Code documents review against the spec in a fresh context; its terminal command for an independent diff review is `/code-review`.

## Options
- A · Spec first card · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread agent-tests-copy-the-bug-spec-first-independent-example and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread agent-tests-copy-the-bug-spec-first-independent-example

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Spec first card

Provides an implementation-blind test brief with a fixed hand-checkable example and a counterfactual review checklist.

Format
Prompt
Source
—
Pinned
v1.0.0 · sha256:651dd
Content hash
651ddd302e33180c
Audit
scan passed
Can do
writes files · runs shell
Works with
claude-code
Check
Card integrity and boundary example pass; no agent-behavior guarantee.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-spec-first-card before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp