Coding prompts · Prompt
Build a feature with guided phases (prompt)
build-feature-with-guided-phases-prompt
A prompt that builds a feature in an existing codebase in seven gated phases - restate the goal, explore similar code, ask every open question, compare two or three architecture designs, build only after you pick one, then review the diff. Use when an AI agent jumps straight into code, guesses at requirements, or ignores how the codebase already works.
Works with: Any AI Not yet model-tested; testing Jan 2027
Paste it into ChatGPT, Claude, Gemini or any AI chat, then tell it about your project. How it works
Install in Claude Code, Cursor or Codex (optional)
Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.
Claude Code (all your projects)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/raw' -o ~/'.claude/skills/build-feature-with-guided-phases-prompt/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/LICENSE.txt' -o ~/'.claude/skills/build-feature-with-guided-phases-prompt/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/NOTICE.txt' -o ~/'.claude/skills/build-feature-with-guided-phases-prompt/NOTICE.txt'Cursor (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/raw' -o '.cursor/skills/build-feature-with-guided-phases-prompt/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/LICENSE.txt' -o '.cursor/skills/build-feature-with-guided-phases-prompt/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/NOTICE.txt' -o '.cursor/skills/build-feature-with-guided-phases-prompt/NOTICE.txt'Codex and other Agent Skills tools (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/raw' -o '.agents/skills/build-feature-with-guided-phases-prompt/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/LICENSE.txt' -o '.agents/skills/build-feature-with-guided-phases-prompt/LICENSE.txt' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/build-feature-with-guided-phases-prompt/files/NOTICE.txt' -o '.agents/skills/build-feature-with-guided-phases-prompt/NOTICE.txt'
Or connect the whole library over MCP
Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):
{
"mcpServers": {
"theskillvault": {
"url": "https://theskillvault.ai/mcp"
}
}
}Agents often start typing before they know the codebase or the goal. This prompt makes the work happen in order: explore, ask, design, then build and review. It stops for your answer at each gate.
When to use
- You want a new feature in a codebase the AI has not seen before.
- Past attempts guessed at requirements or ignored the patterns already in the repo.
- The feature touches several files and you want a design choice before any code.
When not to use
- You only have a rough idea and need it shaped first. Use brainstorm-idea-into-design-prompt.
- You already have an approved plan. Use execute-plan-step-by-step-prompt.
- The task is a one-line fix. Just ask for it.
Steps
- Commit or stash your work so the agent starts from a clean tree.
- Paste the prompt below with a one-line feature description.
- Answer the questions in phase 3 in full. "You decide" is fine, but ask for its pick first.
- Choose one design in phase 4. Only then does the agent write code.
- Decide which review findings to fix now in phase 6, then read the summary.
Prompt
Feature: <ONE-LINE DESCRIPTION>
Work in phases. At every STOP, wait for my reply before you go on.
Phase 1 - Goal. Restate the problem, what the feature should do and any limits. Ask if anything is unclear. STOP.
Phase 2 - Explore. Study the codebase from 2-3 angles: similar features, the architecture around this area, and the tests and extension points. Use parallel subagents if your tool has them and my settings allow it. Trace entry points, data flow and dependencies with file:line references. Then read the 5-10 most important files yourself. Summarise the patterns to follow.
Phase 3 - Questions. List every open point: edge cases, errors, integrations, scope, backward compatibility, performance. Ask them as one numbered list. STOP. Do not design yet.
Phase 4 - Design. Give 2-3 options: smallest change, cleanest structure, and a pragmatic middle. For each: files to create or change, components, data flow, build order and trade-offs. Recommend one with reasons. STOP until I pick.
Phase 5 - Build. Implement the chosen design only. Follow the codebase's conventions. Keep the change small and run the tests as you go.
Phase 6 - Review. Read the real diff (git diff) and check it three ways: simplicity and duplication, bugs and correctness, project rules and conventions. Report only issues you are 80% sure of, with file and line. STOP and ask which to fix now.
Phase 7 - Summary. What was built, key decisions, files changed, tests run with results, and next steps.
How to adapt
- Small feature? Tell it to merge phases 2 and 3 and give one design, but keep the stops.
- Have a rules file such as AGENTS.md or CLAUDE.md? Name it in phase 2 and phase 6.
- No subagents? It still works. Each angle in phase 2 runs one after another.
- Want a written plan? Ask for the phase 4 choice to be saved as docs/plans/<feature>.md.
Gotchas
- Skipping phase 3 is the most common failure. Answer every question, even with "no preference".
- Exploration costs tokens. On a huge repo, name the folders to explore.
- The reviewer must read the actual diff. A review of what the agent remembers writing misses bugs.
- Keep secrets out of the chat. Point to an example env file instead of pasting real keys.
Portability
Works with Claude Code, Cursor, Codex, Copilot and other agents that can read and edit a repo. In a plain chat, paste the relevant files during phase 2 and apply the changes yourself.
Done when
- You picked a design before any code was written.
- The diff follows that design, and the tests pass.
- Review findings are fixed or consciously deferred, and you have the phase 7 summary.
Example prompt
"Add OAuth login to this app. Explore how auth works now, ask me your questions, give me 2-3 designs to choose from, and only build after I pick one."
---
Modified from the "feature-dev" plugin in anthropics/claude-plugins-official (commands/feature-dev.md and agents/code-explorer.md, code-architect.md, code-reviewer.md), by Anthropic. Licensed Apache-2.0 per the plugin LICENSE file at commit a7ba5b9. Original: https://github.com/anthropics/claude-plugins-official/tree/a7ba5b93db0c7c8d17f3f1d25853adca79598a1a/plugins/feature-dev. Changes by TheSkillVault are listed in the metadata above and in NOTICE.txt. See LICENSE.txt.
Bundled files
Licence
Adapted from Anthropic (anthropics/claude-plugins-official, feature-dev plugin: commands/feature-dev.md and agents/code-explorer, code-architect, code-reviewer; the plugin README credits Sid Bidasaria, sbidasaria@anthropic.com; first commit by noahzweben) (Anthropic (the upstream LICENSE keeps the blank Apache template line 'Copyright [yyyy] [name of copyright owner]'; no other copyright notice at this commit). Apache License 2.0 text in LICENSE.txt, attributions in NOTICE.txt), Apache License 2.0. Modified by TheSkillVault on 2026-11-04: the slash-command arguments, the TodoWrite tool and the model pins on the agents were removed; the command and the three agent files were merged into one copy-paste prompt with explicit stop points; the review phase reads the real git diff (upstream issue #4235 found the reviewer agent had no shell access) and the subagent counts defer to the user's own limits (#383); added steps, adapt notes, gotchas and done-when. Not the original file.
Licence: Apache License 2.0. Attribution when you reuse it: Based on work by Anthropic (anthropics/claude-plugins-official, feature-dev plugin: commands/feature-dev.md and agents/code-explorer, code-architect, code-reviewer; the plugin README credits Sid Bidasaria, sbidasaria@anthropic.com; first commit by noahzweben) (Anthropic (the upstream LICENSE keeps the blank Apache template line 'Copyright [yyyy] [name of copyright owner]'; no other copyright notice at this commit). Apache License 2.0 text in LICENSE.txt, attributions in NOTICE.txt, Apache License 2.0), https://github.com/anthropics/claude-plugins-official/tree/a7ba5b93db0c7c8d17f3f1d25853adca79598a1a/plugins/feature-dev; adapted by TheSkillVault, https://theskillvault.ai