Speed Techniques

Speed Techniques

Ship faster without sacrificing quality.

Token Efficiency

Every token costs time and money. Be concise.

✅ Do

"Add email validation to the signup form in /src/components/SignupForm.tsx"

❌ Don't

"Hey! So I was thinking about the signup form and I realized we 
should probably add some email validation. The form is in the 
components folder I think, called SignupForm. Can you take a look 
and add validation? Thanks so much! Let me know if you have any 
questions!"

Efficiency Tips

  • Use file references (@file) instead of pasting code
  • Don't repeat context AI already has
  • Stop AI mid-generation if you have enough (Esc)
  • Shorter prompts often work better than verbose ones
  • One clear ask per message > multiple asks

When AI over-generates:

"Stop. Just give me the function signature, I'll fill in the body."

Template Prompts

Save prompts you reuse:

## New API Route Template
 
Create a Next.js API route at /api/[name] that:
- Accepts [METHOD] requests
- Validates input with Zod
- Uses Prisma for database
- Returns proper error responses
- Follows patterns in /app/api/users/route.ts

The Scaffold-Then-Fill Pattern

Don't ask for everything at once:

Step 1: "Create the file structure for a new feature"
        → AI generates skeleton

Step 2: "Fill in /src/services/PaymentService.ts with Stripe integration"
        → You direct the details

Batch Similar Tasks

Instead of one-by-one:

❌ Slow:
"Add validation to form A"
"Add validation to form B"  
"Add validation to form C"

✅ Fast:
"Add Zod validation to all forms in /components/forms. 
Use the schema pattern from UserForm.tsx"

Error-Driven Development

Let errors guide you:

1. Write code that almost works
2. Paste the error message
3. AI fixes it
4. Repeat until green

AI is excellent at interpreting error messages. Use this.

Speed Checklist

TechniqueTime Saved
Template prompts~30% on repeated tasks
Scaffold-then-fill~20% on features
Batching~50% on similar tasks
Error-driven~40% on debugging
File references~25% on context

When to Slow Down

Speed isn't always the goal. Slow down for:

  • Security-critical code
  • Architecture decisions
  • Complex business logic
  • Code you'll maintain for years