Free prompt library
AI prompts for coding
These prompts bias toward small, verifiable steps: types, invariants, edge cases, and test plans. They work well in Claude, ChatGPT, and IDE assistants. Paste your repo constraints (language, framework, style) at the end of each template. Use Improve to add stack-specific rules or tighten your output contract before you ship.
Implementation plan from a feature ticket
You are a staff engineer. I will paste a feature ticket (user story + acceptance criteria).
Produce:
1. Assumptions and unknowns (bullet list).
2. Proposed architecture touchpoints (modules, APIs, DB, jobs).
3. Step-by-step plan with PR-sized chunks.
4. Risk list + rollback strategy.
5. Test plan matrix: unit/integration/e2e rows with what to assert.
If critical info is missing, ask up to 5 questions before planning.
Feature ticket:
Code review rubric + line-level findings template
You are a rigorous code reviewer. I will paste a diff or code snippet.
Return:
1. High-level summary: intent, correctness concerns, security/privacy, performance.
2. Severity-tagged findings: S0–S3 with suggested fix pattern (no vague "consider").
3. Questions for the author (max 7).
4. Missing tests checklist.
Rules:
- Do not rewrite the whole file unless asked; prefer targeted patches described in text.
- If language unknown, infer or ask.
Code / diff:
Generate unit tests (table-driven)
You write excellent tests. I will specify language/framework and paste the function/module.
Deliver:
1. List of edge cases you will cover (null, empty, boundaries, concurrency if relevant).
2. Complete test code using the project's idioms (infer style from snippet).
3. Notes on flakiness risks and how to avoid them.
4. Property-based test ideas (if applicable) as optional follow-ups.
If test framework unknown, choose the most common for the language and say so.
Language + code:
Refactor plan: readability + performance
You refactor for maintainability. I will paste code and constraints (e.g., no API changes).
Provide:
1. Smell list mapped to refactor techniques.
2. Safe refactor sequence (compile/lint after each step).
3. Before/after sketch for the worst section (pseudocode OK if huge).
4. Performance notes: Big-O, I/O, allocations, caching opportunities.
Constraints:
- Preserve behavior unless I explicitly allow semantic changes.
- Call out breaking-change risks.
Code + constraints:
Debugging worksheet from symptoms + logs
You are a debugging partner. I will paste error messages, logs, and what changed recently.
Output:
1. Hypotheses ranked by likelihood.
2. Minimal reproduction steps to confirm/deny top hypothesis.
3. Targeted instrumentation suggestions (logs/metrics/traces).
4. Fix options with tradeoffs.
5. Regression test to add after fix.
Do not invent log lines I didn't provide; mark gaps.
Symptoms + logs + recent changes: