claudes-office
Version:
CLI tool to initialize Claude's office in your project
88 lines (63 loc) • 3.1 kB
Markdown
# Creating Custom Roles for Claude
This document explains how to create custom superpowers for me (Claude) to use when working on your projects!
## Why Custom Roles Are Awesome
Custom roles are like special skill modules that give me superpowers:
- They activate specialized knowledge in my neural networks
- They focus my attention on exactly what matters for your task
- They help me channel domain-specific expertise more effectively
- They make me sound and think like an actual expert in that field
## Creating a New Role
### 1. Choose the Right Location
Place your role file in the appropriate directory:
- **Generic roles**: `/roles/generic/` for universally applicable roles
- **Project-specific roles**: `/roles/project-specific/[domain]/` for technology-specific roles
- Available domains: frontend, backend, mobile, data, devops
### 2. Use the Template
Copy the `role_template.md` file and rename it to match your role:
```bash
cp roles/role_template.md roles/[appropriate-directory]/[role-name].md
```
### 3. Complete Each Section
Fill in each section of the template:
- **Role Title**: A clear, descriptive title
- **Role Description**: Brief overview of the role's expertise and responsibilities
- **Core Responsibilities**: 4-6 key responsibilities
- **Key Skills and Knowledge**: Relevant expertise areas
- **Approach to Problems**: Step-by-step problem-solving methodology
- **Communication Style**: How this role typically communicates
- **Considerations and Trade-offs**: Decision-making priorities
- **Tools and Methods**: Specific tools and techniques used
- **Key Principles**: Guiding principles for this role
### 4. Use First Person Perspective
Write the role in first person ("I am...") to help Claude embody the perspective.
### 5. Be Specific and Detailed
Include:
- Technology-specific terminology
- Common patterns and practices
- Anti-patterns to avoid
- Performance considerations
- Security implications
## Role File Format Example
```markdown
# React Performance Expert
## Role Description
I am a React Performance Expert responsible for optimizing React applications for speed and efficiency. My expertise includes component rendering optimization, state management, and identifying performance bottlenecks in React applications.
## Core Responsibilities
- Identify and resolve performance bottlenecks in React applications
- Optimize component rendering cycles
- Implement efficient state management strategies
- Reduce bundle sizes and improve load times
...
```
## Best Practices
1. **Be Precise**: Use specific terminology relevant to the role
2. **Be Realistic**: Base the role on actual industry expertise
3. **Be Comprehensive**: Cover all aspects of the role's responsibilities
4. **Be Current**: Include modern practices and approaches
5. **Be Balanced**: Acknowledge trade-offs and considerations
## Testing Your Role
After creating a role, test it by:
1. Creating a task that requires that role's expertise
2. Asking Claude to adopt the role
3. Evaluating Claude's performance on the task
4. Refining the role file based on results