← Back

AI coding prompt templates

Starting points for tasks CodeLazr measures well on - copy one, swap the brackets, paste into the editor. The same list is one click away from the composer itself.

How to use these templates

Replace every [bracket] with something specific: the exact function, file, error message, or rule. Specific prompts matter more than clever wording - in our tests a detailed, task-specific request finished up to 2x faster than a vague one, while a generic "plan first" step made results worse. Keep each request to one clear goal; single-goal tasks like fixing a bug or writing tests succeed 90-100% of the time across nearly every model we test.

Which model to use

For everyday tasks, free OpenRouter models are often enough: in our 10-task benchmark, Laguna M.1 (free) got 7 of 10 right on the first try and North Mini Code (free) was the fastest, with automatic retries taking every free model to 10/10. See the full results in the top 10 tasks case study.

Templates

Blog post, humanized

Research, write, and /humanize a 500-word blog post about [topic].

Marketing page, planned first

/makealist Build a single-page marketing site for [product] with a hero, features, pricing, and FAQ section.

Write unit tests

Write unit tests for the [functionName] function in [file].

Refactor a function

Refactor [functionName] in [file] to be cleaner and more readable, keeping behavior identical.

Add a small feature

Add [feature] to [file] - keep it minimal and consistent with the existing style.

Write docs/comments

Write clear docs/comments for [functionName] in [file].

Add input validation

Add input validation to [form or function] - [list the specific rules].

Fix a bug

Fix the bug in [functionName] - [describe what's wrong].

Debug from an error

I'm getting this error: [paste error]. Find and fix the root cause.

Ambiguous ask, clarify first

/besure Add [feature] - ask me clarifying questions first if anything is ambiguous.

Not sure which model to run these on? See the best free OpenRouter models for coding.