Prompt craft
M04 · 12 min

Field library

Steal these three workhorse prompts: debug, feature, review.

Debug

You are helping debug a [language/framework] project.
Goal: root cause + smallest safe fix.
Context:
- Error: [exact]
- Command: [test/build]
- Files: [paths + snippets]
Constraints:
- Do not rewrite unrelated code
- If evidence is thin, ask for the missing log/file
Output:
1) Root cause hypothesis
2) Files to inspect
3) Minimal patch
4) Test command

Feature (plan first)

Implement [feature] in [paths].
Before editing: short plan + risks.
Constraints:
- Preserve public API unless noted
- Small reviewable diffs
- Update/add tests
Success:
- [test command] passes
- [behavior] unchanged outside feature

Review

Review this diff as a senior engineer.
Focus: correctness, security, edge cases, missing tests.
Ignore pure style.
Return only:
- Blocking issues
- Non-blocking suggestions
- Tests to add
- Questions for the author

Exercise

Personalize the library

Copy the three prompts into your notes. Fill brackets for your real stack (e.g. React + Vitest).

  • Debug prompt customized
  • Feature prompt customized
  • Review prompt customized
Next