Feature Implementation with Tests
Cursor's Composer mode and Windsurf's Cascade both handle multi-file feature implementation. The reference feature instruction ensures consistency with your existing codebase. Ordering by dependency prevents import errors.
Implement the following feature: Feature: {{feature_description}} Acceptance criteria: {{acceptance_criteria}} Technical context: - Framework: {{framework}} - Relevant existing files: {{relevant_files}} - Similar existing feature to reference: {{reference_feature}} Implementation plan: 1. List all files that need to be created or modified 2. Implement the feature following the patterns in {{reference_feature}} 3. Write tests for every acceptance criterion 4. Update any shared types/interfaces affected by the change 5. Add/update API routes if the feature requires backend changes Rules: - Follow existing project conventions exactly (check the reference feature) - No new dependencies without explaining why existing ones can't work - Every user-facing string should be in the existing i18n pattern (if one exists) - Handle loading, error, and empty states for any new UI components Deliver as a list of files with their complete contents, ordered by dependency (types first, then backend, then frontend).
Variables to customize
Why this prompt works
Cursor's Composer mode and Windsurf's Cascade both handle multi-file feature implementation. The reference feature instruction ensures consistency with your existing codebase. Ordering by dependency prevents import errors.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Context-Aware Code CompletionProviding the surrounding code and project context lets the model match existing patterns exactly. The constraint against modifying existing code prevents unwanted side effects.
Inline Code SuggestionConstraining suggestions to match existing style and scope produces insertions that feel native to the codebase. The 'no explanation' rule mimics real inline completion behavior.
Code ExplanationThe audience level parameter adjusts complexity automatically. Requiring a usage example ensures the explanation is practical, not just theoretical.