Back to guide/Developer Tools

Composer Multi-Step Prompt

Sequential steps prevent Cursor Composer from trying to do everything at once and losing coherence. The @reference_file pattern ensures consistency with existing code.

cursor-ai-tipsfeature_nametypes_locationapi_path
Edit View
Prompt
I need to implement {{feature_name}}.

Here's the plan — execute each step in order:

Step 1: Create the data model / types in {{types_location}}
Step 2: Build the API route at {{api_path}} with GET and POST handlers
Step 3: Create the UI component at {{component_path}}
Step 4: Wire up the component to the API with proper loading/error states
Step 5: Add form validation using {{validation_library}}

For each step:
- Follow existing patterns in the codebase (check similar files first)
- Use @{{reference_file}} as a reference for style and structure
- Do NOT modify any files outside the ones listed above

After all steps, list any environment variables or dependencies I need to add.

Variables to customize

{{feature_name}}{{types_location}}{{api_path}}{{component_path}}{{validation_library}}{{reference_file}}

Why this prompt works

Sequential steps prevent Cursor Composer from trying to do everything at once and losing coherence. The @reference_file pattern ensures consistency with existing code.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.