by sohaibt
The most expensive bug in AI-assisted building is shipping the wrong thing, well. A drop-in CLAUDE.md / AGENTS.md for PM + eng teams using Claude Code, Cursor, or Codex: 7 principles for problem framing, scope, tradeoffs, and outcome measurement. Built on @karpathy's observations.
# Add to your Claude Code skills
git clone https://github.com/sohaibt/product-modeproduct-mode is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by sohaibt. The most expensive bug in AI-assisted building is shipping the wrong thing, well. A drop-in CLAUDE.md / AGENTS.md for PM + eng teams using Claude Code, Cursor, or Codex: 7 principles for problem framing, scope, tradeoffs, and outcome measurement. Built on @karpathy's observations. It has 163 GitHub stars.
product-mode's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/sohaibt/product-mode" and add it to your Claude Code skills directory (see the Installation section above).
product-mode is primarily written in TypeScript. It is open-source under sohaibt on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh product-mode against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

Give your coding agent product judgment before it starts building.
Free, MIT-licensed instructions for framing the problem, cutting scope, naming tradeoffs, and defining success. A drop-in CLAUDE.md / AGENTS.md for Claude Code, Cursor, Codex, and any coding agent that reads one. The CLI is optional.
The PM-team counterpart to andrej-karpathy-skills. Credit to @karpathy for naming the failure modes that inspired this work.
/product-review now checks products and repositories for stage-appropriate readiness, source traceability, cross-artifact consistency, outcome validation, and measurable success. Existing installations can update only that skill with product-mode init --upgrade-skill product-review.product-mode init installs /preflight and /decision, so the agent drafts the checklist or decision record from the conversation and saves it to .product-mode/. Works in Claude Code, Codex ($preflight), and Cursor. See Usage.The updated instruction files are available through the quick start below. The CLI fixes ship in [email protected] on npm.
No npm install is needed for the instruction files.
If you already have a CLAUDE.md or AGENTS.md: open CLAUDE.md or AGENTS.md, copy the guidelines you need into your existing file, and resolve any conflicting instructions. Keep your project context and coding conventions. Commit or back up your current file before editing.
For a project without CLAUDE.md: run this from the project root. It refuses to overwrite an existing file.
if [ -e CLAUDE.md ]; then
echo "CLAUDE.md already exists. Merge the guidelines into it instead."
else
curl -fL https://raw.githubusercontent.com/sohaibt/product-mode/main/CLAUDE.md -o CLAUDE.md
fi
For an agent that reads AGENTS.md, use the same command with both occurrences of CLAUDE.md changed to AGENTS.md. Check your agent's instructions for supported file names and locations.
Start a fresh agent session and try:
Add a dashboard to our SaaS app. Before coding, help me frame the problem, surface unknowns, choose the smallest useful scope, and define how we'll know it worked.
Look for an explicit user and problem, visible assumptions, a limited first step, a success measure, and a reversibility check. Supply missing evidence; the file cannot know your users or business on its own.
Already have project instructions? Follow the step-by-step merge guide to preserve conventions, resolve conflicts, and test the result.
These are illustrative worked examples, not model transcripts or measured performance claims.
| Request | What the example works through |
|---|---|
| “Add a dashboard” | Clarify whose decision the dashboard supports before choosing charts. |
| “Build a complete referral system” | Separate testing referral demand from building rewards infrastructure. |
| “Add an onboarding checklist” | Define activation and measurement before treating checklist completion as success. |
Run your own comparison using the same request in fresh sessions with and without the guidelines.
Product-mode checks existing context before asking questions. It asks about decisions that change the work, groups independent questions, and waits for prerequisite answers before discussing dependent choices.
Different unknowns need different next steps: missing facts need evidence, product choices need a decision, UX questions may need a prototype, and outcome hypotheses need an experiment. Once the next useful step is clear, proceed with authorized, reversible work and record how remaining assumptions will be tested.
Use the evaluation cases to check whether your agent makes those distinctions, avoids invented evidence, and keeps routine work moving. These are authored cases, not measured results. Deeper product challenge sessions should be requested explicitly.
Karpathy named the problem for engineers working with LLMs:
"The models make wrong assumptions on your behalf and just run along with them... They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should."
His CLAUDE.md fixes this for solo engineers. It's excellent.
But there's a failure mode it doesn't touch, the one that kills product teams:
Shipping the wrong thing, well.
A beautifully implemented feature for a problem that doesn't matter is still waste. And in mixed PM + engineering teams working with Claude Code, that's the more expensive mistake.
product-mode adds the missing layer: problem framing, scope discipline, tradeoff articulation, outcome measurement, and decision logging, applied before the code gets written.
| # | Principle | What it prevents |
|---|---|---|
| 1 | Frame the Problem Before the Solution | Building for the wrong user |
| 2 | Make Assumptions & Unknowns Visible | Silent guessing |
| 3 | Ship the Minimum Viable Change | Scope creep, gold-plating |
| 4 | Name the Tradeoffs | Invisible costs, political decisions |
| 5 | Define Done by Outcome, Not Output | "Merged" mistaken for "done" |
| 6 | Instrument Before You Ship | Shipping blind |
| 7 | Log the Decision, Flag Reversibility | Repeating mistakes, calcifying defaults |
Plus a pre-flight checklist (5 questions before any non-trivial change) and a when-to-skip-this-rigor table: because not every typo needs a decision log.
Full file: CLAUDE.md. Same file, other name: AGENTS.md.
The instruction files work on their own. The CLI provides interactive commands that save checklists and decision logs in your project.
# Run without installing
npx product-mode init
# Or install it globally
npm install -g product-mode
Requires Node.js 20.19 or newer.
product-mode init
Creates .product-mode/checklist/ and .product-mode/decisions/, and appends a "Prior Decisions & Checklists" section to your CLAUDE.md / AGENTS.md (if present) so agents read existing decisions before starting non-trivial work. Safe to re-run.
init sets up artifact storage and references. Add the product guidelines separately using the quick start above.
init also installs three slash commands for your agent chat. By default, it never overwrites a command that already exists.
To replace an installed /product-review with the packaged version, run:
product-mode init --upgrade-skill product-review
This replaces local edits to product-review in both .claude/skills/ and .agents/skills/; other skills and instruction files remain unchanged.
| Command | What the agent does |
|---|---|
/preflight [work] |
Drafts the pre-flight checklist from the conversation, asks only about missing answers, and saves it to .product-mode/checklist/ |
/decision [title] |
Drafts a decision record from the conversation and saves it to .product-mode/decisions/ |
/product-review [plan, file, PR, or product] |
Checks a plan, code change, or product/repository against the seven principles and reports each gap with its evidence and smallest fix. Read-only |
The commands are installed in .claude/skills/ (Claude Code) and .agents/skills/ (Codex and Cursor). In Codex, type $ instead of / (for example, $preflight). Commit them so your team gets them too.
Run before starting any non-trivial work:
product-mode checklist
# Or with work description
product-mode checklist "Add user profile feature"
This will prompt you through the 5-question pre-flight checklist and save your answers to .product-mode/checklist/.
Log important decisions following Principle #7:
product-mode decision
# Or with title
product-mode decision "Choose database technology"
Creates a structured decision log in .product-mode/decisions/.
Check if your changes are trivial (can skip full rigor):
product-mode trivial
# Or check specific files
product-mode trivial src/app.js src/utils.js
Only small edits to existing ordinary documentation (.md, .txt, .rst, .adoc; at most 10 added/deleted lines across the diff) can qualify for lighter rigor. Code, executable Markdown (.mdx), agent instructions, sensitive files, new/deleted files, renames, mode chan