Tools
Tools: Developer-focused prompting tricks to use Cursor
2026-03-02
0 views
admin
Core Mindset Shifts for Saving Money ## Prompting Tricks & Patterns That Actually Save Credits ## Quick Copy-Paste Starter Templates developer-focused prompting tricks to use Cursor (especially Composer / Agent / Chat) more effectively while burning fewer credits/tokens in 2026. The goal is to get better results in fewer turns, with smaller context, and by preferring cheaper models when possible. Start new chats aggressively (biggest single saver)
Long chat histories re-send massive context every turn → explodes costs. Use ultra-specific @references instead of @codebase
@codebase pulls huge context → very expensive and often noisy.
Good: Bad: @codebase fix auth bug → Avoids 3–10 wasteful "oops, wrong approach" iterations. → You run tests → paste failing output → AI fixes → fewer full re-runs. Reuse .cursorrules + custom .mdc files heavily
Put permanent context there (style, architecture rules, "never use X", "prefer Y pattern", Tailwind rules, etc.).
→ Saves pasting the same 300–800 tokens in every prompt.
Keep rules <500 lines total, focused & composable. "YOLO small" + incremental asks
Instead of: "Implement full user dashboard with charts, auth, dark mode"
Do: Chain of verification / pros-cons when unsure
For decisions (lib choice, architecture): → One prompt often replaces 5–6 back-and-forths. Model switching cheat sheet (2026 reality) Pre-refine prompts outside Cursor
Craft complex prompts in free Claude.ai / ChatGPT → copy-paste into Cursor when ready.
→ You burn expensive Cursor credits only on final execution. Apply these → many heavy Cursor users report cutting their effective monthly spend 40–70% while getting better code faster. Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse CODE_BLOCK:
Fix the auth flow bug here: @src/auth/login.ts @src/middleware/auth.ts The token refresh fails with 401 when refresh_token is expired but access_token is still valid. Add proper handling + tests. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Fix the auth flow bug here: @src/auth/login.ts @src/middleware/auth.ts The token refresh fails with 401 when refresh_token is expired but access_token is still valid. Add proper handling + tests. CODE_BLOCK:
Fix the auth flow bug here: @src/auth/login.ts @src/middleware/auth.ts The token refresh fails with 401 when refresh_token is expired but access_token is still valid. Add proper handling + tests. CODE_BLOCK:
Before writing any code: 1. Think step-by-step and output a clear, numbered plan of changes (files affected, approach, potential risks). 2. Ask me 1-3 clarifying questions if anything is ambiguous. 3. Only proceed to code after I approve the plan. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Before writing any code: 1. Think step-by-step and output a clear, numbered plan of changes (files affected, approach, potential risks). 2. Ask me 1-3 clarifying questions if anything is ambiguous. 3. Only proceed to code after I approve the plan. CODE_BLOCK:
Before writing any code: 1. Think step-by-step and output a clear, numbered plan of changes (files affected, approach, potential risks). 2. Ask me 1-3 clarifying questions if anything is ambiguous. 3. Only proceed to code after I approve the plan. CODE_BLOCK:
Respond only with: - Brief explanation (max 4 sentences) - Code changes as SEARCH/REPLACE blocks - No chit-chat, no markdown fluff, no repeating the prompt Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Respond only with: - Brief explanation (max 4 sentences) - Code changes as SEARCH/REPLACE blocks - No chit-chat, no markdown fluff, no repeating the prompt CODE_BLOCK:
Respond only with: - Brief explanation (max 4 sentences) - Code changes as SEARCH/REPLACE blocks - No chit-chat, no markdown fluff, no repeating the prompt CODE_BLOCK:
Make minimal diff. Only change what's necessary. Keep existing style & comments. Output clean SEARCH/REPLACE. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Make minimal diff. Only change what's necessary. Keep existing style & comments. Output clean SEARCH/REPLACE. CODE_BLOCK:
Make minimal diff. Only change what's necessary. Keep existing style & comments. Output clean SEARCH/REPLACE. CODE_BLOCK:
1. First, write Jest/Vitest unit tests that would pass if the feature works correctly. 2. Then implement the minimal code to make those tests pass. 3. Output tests + code separately. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
1. First, write Jest/Vitest unit tests that would pass if the feature works correctly. 2. Then implement the minimal code to make those tests pass. 3. Output tests + code separately. CODE_BLOCK:
1. First, write Jest/Vitest unit tests that would pass if the feature works correctly. 2. Then implement the minimal code to make those tests pass. 3. Output tests + code separately. CODE_BLOCK:
Evaluate adding Zustand vs Redux Toolkit for state: - List pros/cons of each in this project (Next.js App Router, server components heavy) - Recommend one + justify - Show minimal code example if I choose your recommendation Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Evaluate adding Zustand vs Redux Toolkit for state: - List pros/cons of each in this project (Next.js App Router, server components heavy) - Recommend one + justify - Show minimal code example if I choose your recommendation CODE_BLOCK:
Evaluate adding Zustand vs Redux Toolkit for state: - List pros/cons of each in this project (Next.js App Router, server components heavy) - Recommend one + justify - Show minimal code example if I choose your recommendation CODE_BLOCK:
@buggy-file.ts
This throws "Cannot read property 'name' of undefined" on line 42 when user is null.
Fix it safely + add guard + unit test snippet.
Be concise. Only SEARCH/REPLACE blocks + 1–2 sentence explanation. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
@buggy-file.ts
This throws "Cannot read property 'name' of undefined" on line 42 when user is null.
Fix it safely + add guard + unit test snippet.
Be concise. Only SEARCH/REPLACE blocks + 1–2 sentence explanation. CODE_BLOCK:
@buggy-file.ts
This throws "Cannot read property 'name' of undefined" on line 42 when user is null.
Fix it safely + add guard + unit test snippet.
Be concise. Only SEARCH/REPLACE blocks + 1–2 sentence explanation. CODE_BLOCK:
Refactor @src/services/api.ts to use TanStack Query instead of raw fetch.
Keep the same public API.
Plan first:
1. List files to change
2. Migration steps
Then implement minimal changes. Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
Refactor @src/services/api.ts to use TanStack Query instead of raw fetch.
Keep the same public API.
Plan first:
1. List files to change
2. Migration steps
Then implement minimal changes. CODE_BLOCK:
Refactor @src/services/api.ts to use TanStack Query instead of raw fetch.
Keep the same public API.
Plan first:
1. List files to change
2. Migration steps
Then implement minimal changes. - One good prompt > many mediocre ones — Invest time crafting a strong first prompt (even outside Cursor in plain ChatGPT/Claude.ai first).
- Context is expensive — Every file/reference sent repeatedly costs tokens. Minimize it.
- Cheap models first, frontier models last — Use them for 70-80% of tasks. - Start new chats aggressively (biggest single saver)
Long chat histories re-send massive context every turn → explodes costs. Rule: New feature / bug / refactor = new chat. Paste only the relevant snippet + 1-3 @file references. Pro users: This alone can cut monthly usage 30-50%.
- Rule: New feature / bug / refactor = new chat.
- Paste only the relevant snippet + 1-3 @file references.
- Pro users: This alone can cut monthly usage 30-50%.
- Use ultra-specific @references instead of @codebase
@codebase pulls huge context → very expensive and often noisy.
Good: - Rule: New feature / bug / refactor = new chat.
- Paste only the relevant snippet + 1-3 @file references.
- Pro users: This alone can cut monthly usage 30-50%. - Demand a plan first (Plan Mode or explicit)
Shift+Tab → Plan Mode (or write it).
Example starter prompt: - "Be concise" + output format constraints
LLMs love to ramble → force short, usable output. - Test-first or verify loop (reduces blind edits)
For complex changes: - Reuse .cursorrules + custom .mdc files heavily
Put permanent context there (style, architecture rules, "never use X", "prefer Y pattern", Tailwind rules, etc.).
→ Saves pasting the same 300–800 tokens in every prompt.
Keep rules <500 lines total, focused & composable.
- "YOLO small" + incremental asks
Instead of: "Implement full user dashboard with charts, auth, dark mode"
Do: Prompt 1: "Plan the component tree for user dashboard" Prompt 2: "Create skeleton + layout @dashboard/page.tsx" Prompt 3: "Add auth guard + loading state"
→ Cheaper per step, easier to correct early.
- Prompt 1: "Plan the component tree for user dashboard"
- Prompt 2: "Create skeleton + layout @dashboard/page.tsx"
- Prompt 3: "Add auth guard + loading state"
→ Cheaper per step, easier to correct early.
- Chain of verification / pros-cons when unsure
For decisions (lib choice, architecture): - Prompt 1: "Plan the component tree for user dashboard"
- Prompt 2: "Create skeleton + layout @dashboard/page.tsx"
- Prompt 3: "Add auth guard + loading state"
→ Cheaper per step, easier to correct early. - Model switching cheat sheet (2026 reality) Daily work (80%): Composer 1.5 (50%+ cheaper than newest, fast) or Claude 4.x Sonnet / Gemini 2.5 Flash / GPT-5 mini equivalents. Hard problems only: Claude Opus 4.6 no-thinking (cheaper than with thinking) or newest frontier. Reactivate Composer 1 if available — often ~3× cheaper + faster for many tasks.
Settings → Models → add / prioritize cheaper variants.
- Daily work (80%): Composer 1.5 (50%+ cheaper than newest, fast) or Claude 4.x Sonnet / Gemini 2.5 Flash / GPT-5 mini equivalents.
- Hard problems only: Claude Opus 4.6 no-thinking (cheaper than with thinking) or newest frontier.
- Reactivate Composer 1 if available — often ~3× cheaper + faster for many tasks.
Settings → Models → add / prioritize cheaper variants.
- Pre-refine prompts outside Cursor
Craft complex prompts in free Claude.ai / ChatGPT → copy-paste into Cursor when ready.
→ You burn expensive Cursor credits only on final execution. - Daily work (80%): Composer 1.5 (50%+ cheaper than newest, fast) or Claude 4.x Sonnet / Gemini 2.5 Flash / GPT-5 mini equivalents.
- Hard problems only: Claude Opus 4.6 no-thinking (cheaper than with thinking) or newest frontier.
- Reactivate Composer 1 if available — often ~3× cheaper + faster for many tasks.
Settings → Models → add / prioritize cheaper variants.
how-totutorialguidedev.toaillmgptchatgptserverrouterswitch