Skip to content
Intermediate

Best Cursor Prompt for Write Features

Why Cursor?

Cursor operates directly inside your IDE with full codebase awareness — it reads open files, understands imports, and completes code in context. Best for greenfield features where you want real-time tab completion and in-editor iteration rather than copy-pasting from a chat window.

Prompt Template
Open Cursor
Implement {{feature_description}} in {{target_file}}.

Context:
- This {{language}} project uses {{framework}} with {{architecture_pattern}}
- The feature should follow the same structure as {{reference_file}}
- Entry point for this feature: {{entry_point}}

Acceptance criteria:
{{acceptance_criteria}}

Do not modify files outside of {{target_file}} unless a change is strictly required. If you need to create a new file, name it {{suggested_filename}}.
Example Output
```python @router.get("/orders", response_model=PaginatedOrdersResponse) async def list_orders(
Show full example
page: int = Query(1, ge=1), page_size: int = Query(20, ge=1, le=100), current_user: User = Depends(get_current_user), order_service: OrderService = Depends(get_order_service), ): result = await order_service.list_for_user( user_id=current_user.id, page=page, page_size=page_size ) return PaginatedOrdersResponse(**result) ``` Cursor tab-completes the remaining service and model definitions inline.

Make it yours

Got your AI output? Make it better.

Paste what Cursor generated into Coda One — free, no signup.

Tips for Better Results
Open the reference file alongside the target file in Cursor before prompting — Cursor's @codebase context reads open tabs first. Use Cmd+K for inline edits and Cmd+L for chat. Tag files explicitly with @filename for precision.
Example (filled in)
Implement a paginated list endpoint for orders in src/orders/router.py. Context: - This Python project uses FastAPI with repository + service layer pattern - The feature should follow the same structure as src/users/router.py - Entry point: GET /orders?page=1&page_size=20 Acceptance criteria: - Returns orders for the authenticated user only - Supports page and page_size query params (max page_size: 100) - Returns total_count, page, page_size, and items in response - 401 if not authenticated Do not modify files outside of src/orders/router.py unless strictly required.