Custom Prompt Templates
Write your own analysis prompts. Reuse them across projects.
Built-in Templates
| Template | Description |
|---|---|
quick-review | Fast review, critical issues only |
pr-review | Review formatted for pull request comments |
security-owasp | OWASP Top 10 (2021) audit |
api-docs | REST API documentation from route handlers |
performance | Performance bottleneck analysis |
List Templates
Terminal
$ codesight templates list
Run a Template
Terminal
$ codesight templates run quick-review src/main.py
$ codesight templates run performance lib/db.py --provider anthropic
Create a Template
Interactive creation:
Terminal
$ codesight templates add my-review
Display name: My Code Review
Description: Custom review for our team standards
Enter system prompt (end with an empty line):
> Review this code for our team standards. Check for:
> 1. Missing error handling
> 2. Hardcoded config values
> 3. Functions longer than 30 lines
> For each issue: line number, category, and fix.
>
Or create the JSON file directly in ~/.codesight/templates/:
~/.codesight/templates/my-review.json
{
"name": "My Code Review",
"description": "Custom review for our team standards",
"system": "Review this code for our team standards..."
}
Delete a Template
Terminal
$ codesight templates delete my-review
Built-in templates can't be deleted. Only custom templates stored in
~/.codesight/templates/ can be removed.
Template Tips
- Be specific about output format - models follow structure better than vague instructions
- Include severity levels if the output needs them
- Reference the patterns you want caught (e.g. "check for N+1 queries in Django ORM calls")
- Keep prompts under ~500 words - longer prompts don't improve accuracy