Prompt templates let you define reusable instructions that are automatically injected into Claude’s system prompt when executing tasks. Use them to enforce coding standards, framework patterns, and quality guidelines.
How It Works
Create a template
Go to Project > Templates and create a new prompt template.
Set the task type
Assign the template to a task type (feature, bugfix, refactor, etc.). All tasks of that type will automatically use this template.
Write instructions
Write your template content with optional {{variable}} placeholders for dynamic values.
Automatic injection
When a matching task runs, the template is injected into Claude’s prompt — no manual action needed.
Template Matching
Templates are matched by task_type:
| Template Type | Applies To |
|---|
feature | All feature tasks in the project |
bugfix | All bugfix tasks |
refactor | All refactor tasks |
test | All test tasks |
docs | All documentation tasks |
chore | All chore tasks |
If no matching template exists, the default prompt is used without additional instructions.
Template Variables
Use {{variable_name}} syntax for dynamic placeholders:
Review the {{component}} module for {{issue_type}} issues.
Focus on {{specific_area}} and ensure {{quality_criteria}}.
Variables are filled in when creating a task from the template selector in the task creation modal.
Prompt Injection Order
Templates are injected with high priority in Claude’s attention:
1. Role instructions (if a role is assigned)
2. Prompt Template content ← your template goes here
3. Context snippets
4. Task title & description
5. File attachments
Templates appear before the task details, so Claude treats them as high-priority instructions that shape how the task is executed.
Example Templates
Code Standards
Framework
Testing
Security Review
You are working on a TypeScript project using strict mode.
- Always use `const` over `let` unless reassignment is needed
- Prefer named exports over default exports
- Use Zod for runtime validation at API boundaries
- Write JSDoc comments for public functions
This is a Next.js 14 application using the App Router.
- Use Server Components by default, Client Components only when needed
- Data fetching should use server actions or route handlers
- Styles use Tailwind CSS with the project's design tokens in tailwind.config.ts
Write tests using Vitest with React Testing Library.
- Test behavior, not implementation details
- Use `screen.getByRole` over `getByTestId` when possible
- Mock external APIs with MSW (Mock Service Worker)
- Aim for >80% coverage on new code
Review this code with a security focus. Check for:
- SQL injection (use parameterized queries)
- XSS (sanitize user input, escape output)
- Missing authentication/authorization checks
- Hardcoded secrets or credentials
- Insecure deserialization
Report findings as inline code comments.