title: "Feature Addition Prompt Template" tested_with: claude-code: "1.0.x" codex-cli: "0.2.x" last_updated: 2026-03-21 status: proven difficulty: beginner prerequisites: []

Feature Addition Prompt Template

When to Use This Prompt

When adding a new feature or capability to an existing codebase.

The Prompt

Add [feature description] to [component/area].

Requirements:
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]

Follow the pattern used in [existing similar feature] for consistency.

# Adapt this by:
# - Be specific about requirements — vague features get vague implementations
# - Reference an existing feature for the agent to follow as a pattern
# - If the feature is complex, consider using plan mode first

Why It Works

  • Clear scope: Names the feature and where it goes
  • Explicit requirements: Prevents the agent from guessing what you want
  • Pattern reference: Points to existing code as a template, ensuring consistency with your codebase

Variations

For complex features (use with plan mode):

I need to add [feature]. Before implementing, create a plan:
1. What files need to change?
2. What's the approach?
3. Are there any edge cases to handle?

Show me the plan before making changes.

For features with UI:

Add [feature] to [page/component]. It should:
- [Visual behavior]
- [User interaction]
- [Data flow]

Match the style of [existing similar component].

Example Output

The agent should: identify relevant files, implement the feature following the referenced pattern, and add tests. If it creates a wildly different structure from your existing code, your CLAUDE.md may need stronger convention guidance.