Agent skill · Addy Osmani's Agent Skills
/doubt-driven-development Have a fresh reviewer try to break each risky decision
Doubt-driven development makes the agent state each non-trivial decision as a short claim, pull out the smallest piece of code or reasoning that supports it, and hand only that piece plus its contract to a fresh-context reviewer told to find faults. The agent then sorts every finding itself, and the loop ends after trivial findings, three rounds or your go-ahead.
Works with
- Claude Code
- Any agent via the skills CLI
- Codex
- Gemini CLI
- Antigravity CLI
- Command Code
When to use it
- A change touches production auth, a data migration, a public API or anything hard to undo.
- You are working in unfamiliar code and the agent sounds more certain than it should.
- The agent is about to assert that something is thread-safe, idempotent or matches the spec.
How it works
- 1Claim
The agent writes the decision in two or three lines along with why getting it wrong would hurt.
- 2Extract
It isolates the diff or proposal and its contract, removing its own reasoning but keeping any caller, guard or test that contradicts it.
- 3Doubt
It sends that unit, without the claim, to a fresh-context reviewer using an adversarial prompt, and in interactive sessions always offers a second opinion from Gemini CLI, Codex CLI or a manual review.
- 4Reconcile
It re-reads the artifact and files each finding as a contract misread, a real fix, an accepted trade-off or noise.
- 5Stop
It ends when findings turn trivial, after three cycles, or when you say ship it, and escalates to you instead of looping further.
What it steers the agent away from
- Asking a reviewer whether the work is good, which invites agreement
- Treating a reviewer's objection as automatically correct without checking the artifact
- Running an external model CLI without your explicit approval for that exact command
Install this skill
It installs with the Addy Osmani's Agent Skills pack.
Claude CodeAdds the skills plus nine lifecycle slash commands; use /agent-skills:review where a built-in command shares the name.
/plugin marketplace add addyosmani/agent-skills
/plugin install agent-skills@addy-agent-skillsAny agent via the skills CLIInstalls all skills into Claude Code, Cursor, Codex, Copilot, Cline and many other agents.
npx skills add addyosmani/agent-skillsCodexNeeds Codex CLI v0.122 or later; skills are then called with @ in chat.
codex plugin marketplace add addyosmani/agent-skills
codex plugin add agent-skills@agent-skillsGemini CLIInstalls the skills for auto-discovery.
gemini skills install https://github.com/addyosmani/agent-skills.git --path skillsAntigravity CLIInstalls as a native plugin; some releases need the namespaced skills invoked directly.
agy plugin install https://github.com/addyosmani/agent-skills.gitCommand CodeThe first form installs per project, the second for all projects.
cmd skills add addyosmani/agent-skills
cmd skills add addyosmani/agent-skills --globalCommands come from the author’s README; check it for changes before you run them.
Questions
Does it run on every change?
No. It applies to decisions that add branching, cross a module boundary, rely on properties a compiler cannot check, or are hard to reverse, and skips renames, formatting and simple instructions.
How is it different from a code review?
A review judges finished work before merge; this skill questions individual decisions while the work is still in progress and cheap to change.
More guides from Addy Osmani's Agent Skills
/browser-testing-with-devtoolsLet the agent check a real browser instead of guessingInspects a live page through Chrome DevTools MCP: DOM, console, network, performance traces and the accessibility tree.Read the guide →/code-review-and-qualityFive-axis code review with clear severity labelsReviews a change for correctness, readability, architecture, security and performance, labelling each finding by severity.Read the guide →/constraint-driven-developmentWrite down your quality bar and stop agents quietly lowering itSets a written quality bar in CONSTRAINTS.md with default thresholds and flags diffs that skip tests or silence checks.Read the guide →/interview-meFind out what you actually want before anything is builtAsks you single questions, offering its own guessed answer for each, until it can state your real goal and you confirm it.Read the guide →
Also in this pack
/api-and-interface-designDesigns the contract before the code, applying Hyrum's Law, a one-version rule and clear error semantics to interfaces.↗/ci-cd-and-automationSets up a pipeline where lint, types, tests, build, audit and bundle checks must all pass before review.↗/code-simplificationCuts complexity in working code while keeping every input, output, side effect and error exactly the same.↗/context-engineeringSets up rules files and decides which specs, source files and error output the agent should load for each task.↗/debugging-and-error-recoveryHalts feature work on any failure and walks a reproduce, localize, reduce, fix and guard checklist to the root cause.↗/deprecation-and-migrationDecides whether old code should go, then plans compulsory or advisory deprecation and migrates consumers off it.↗/documentation-and-adrsRecords significant decisions as ADRs in the project's existing format and spots docs that no longer match the code.↗/frontend-ui-engineeringBuilds accessible, responsive components with composition-first patterns and checks them with the project's own tooling.↗/git-workflow-and-versioningKeeps main deployable with short-lived branches and small atomic commits that act as save points.↗/idea-refineExpands a rough idea into variations, stress-tests them and saves a one-page proposal with MVP scope and a not-doing list.↗/incremental-implementationBuilds a change in thin vertical slices, testing, verifying and committing each one before starting the next.↗/observability-and-instrumentationLists the questions on-call will ask, then adds structured logs, metrics, traces and symptom-based alerts to answer them.↗
Summary by trendhub. The skill itself lives in addyosmani/agent-skills/skills/doubt-driven-development by Addy Osmani (MIT); read the full, current text there.