← Prompt Engineering Handbook

Prompt Patterns for Daily Engineering Work

This section is tuned for senior developers who want fast, reusable prompts for real project work.

Developer Library

Generate unit tests

Act as a senior test engineer.

Generate tests for the following method.

Requirements:
- include happy path
- include edge cases
- include failure cases
- explain what each test protects against

Code:
{method_here}

Review pull request risk

Act as a senior reviewer.

Analyse this code change for:
- correctness
- regression risk
- security issues
- performance impact
- missing tests

Then provide:
1. overall risk level
2. review comments
3. suggested improvements

API design prompt

Act as an API architect.

Design a REST API for the following use case.

Include:
- endpoints
- request and response examples
- validation rules
- error handling
- versioning notes
- security considerations