Custom Prompt Templates

Write your own analysis prompts. Reuse them across projects.

Built-in Templates

TemplateDescription
quick-reviewFast review, critical issues only
pr-reviewReview formatted for pull request comments
security-owaspOWASP Top 10 (2021) audit
api-docsREST API documentation from route handlers
performancePerformance 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