Skip to content

Latest commit

Β 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎭 Claude Code Personas

Version License: MIT

Build stronger products with AI personas that act like your best team members

img

Get design reviews from an Engineering Manager, strategic insights from a Product Manager, and comprehensive QA analysis using simple prompts. Personas create positive feedback loops that bring diverse perspectives to your work. No servers to manage, no complex setup. Just type, ask, and ship better code.

✨ What This Does

This project provides ready-to-use AI personas that easily integrate with Claude Code and its built-in memory import system. Each persona brings specialized knowledge and perspective to your development projects.

🎯 Starter Personas

  • πŸ“ Alex, Engineering Manager - Technical architecture, code quality, best practices
  • πŸ’‘ Sarah, Product Manager - Requirements analysis, user stories, feature prioritization
  • πŸ“‹ Marcus, QA Manager - Testing strategies, quality assurance, bug prevention

πŸ’¬ How to Use

Once installed, simply ask any persona for help:

claude "Ask the engineering manager to review this API design"
claude "Ask Sarah to help prioritize these features"
claude "Ask the QA manager to design a comprehensive test plan"

Claude Code automatically loads the persona's expertise and provides specialized guidance based on their role and experience.

🎯 Context-Aware Feedback

Personas automatically detect work context and adjust their feedback accordingly:

  • POC/Spike: Focus on feasibility and learning, not production concerns
  • MVP: Balance functionality with basic quality gates
  • Production: Full production readiness review
  • Bug Fix: Target correctness and regression prevention
  • Refactoring: Emphasize maintainability without scope creep

The system examines PR titles, commit messages, branch names, and file scope to provide appropriate feedback for each development stage.

πŸš€ Quick Start

Prerequisites

Installation

# 1. Clone and install
git clone https://github.com/jasonhanna/claude-personas.git
cd claude-personas
npm install

# 2. Copy personas to your home directory (~/.claude-agents)
npm run install-templates

# 3. Add personas to User memory (~/.claude/CLAUDE.md)
npm run add-personas

That's it! πŸŽ‰ Now you can ask any persona for help in any Claude Code session.

Single Project Setup (alternative)

Want personas available only in specific projects? Add them to project memory instead:

# Add to a specific project
npm run add-personas -- --project ./path/to/your/project

πŸ“– Additional Examples

Engineering Review

claude "Ask Alex to review this database schema for scalability issues"

Leverage the perspective of a seasoned engineering manager to analyze your database design

Feature Planning

claude "Ask the product manager to help write user stories for our new checkout flow"

Sarah applies product strategy expertise to create comprehensive user stories

Quality Assurance

claude "Ask the QA manager to identify edge cases we should test for user authentication"

Marcus leverages 14+ years of QA experience to suggest comprehensive test scenarios

Create Complex Tasks and Parallel Workflow

claude "Create parallel tasks for Alex, Sarah, and Marcus to review this latest pull request, leaving comments on the PR"

Unleash the full power of multi-perspective code review: technical depth, product alignment, and quality assurance in one coordinated AI prompt.

πŸ› οΈ Management Commands

Template Management

npm run install-templates     # Install persona templates (~/.claude-agents/personas)
npm run update-templates      # Update existing templates with backup
npm run remove-templates      # Remove templates with backup

Memory Management (User & Project)

npm run add-personas          # Add personas to user memory
npm run update-personas       # Update persona imports in user memory
npm run remove-personas       # Remove personas from user memory

Status and Information

npm run personas-status       # Check installation and configuration
npm run list-personas         # List available personas

Per Project Management

npm run add-personas -- --project /path/to/project
npm run update-personas -- --project /path/to/project
npm run remove-personas -- --project /path/to/project

🎨 Customization

Edit Existing Personas

Once installed, personas are stored as markdown files in ~/.claude-agents/personas/. Edit them to:

  • Adjust personality and communication style
  • Add project-specific context
  • Modify expertise areas
  • Update decision-making frameworks
# Edit the engineering manager persona
open ~/.claude-agents/personas/engineering-manager.md

TIP: Add Project-Specific Context

Why This Matters: Generic personas provide general guidance, but personas with your project's specific context give targeted, actionable advice that considers your actual architecture, tech stack, and constraints.

The Power of Project Context

When personas understand your project details, they can:

  • Give relevant architecture advice based on your actual tech stack
  • Suggest realistic testing strategies for your specific frameworks
  • Prioritize features considering your actual user base and business model
  • Identify real risks in your codebase rather than theoretical ones

How to Add Project Context

  1. Let Claude Code analyze your codebase to generate project-specific context:
claude "Analyze this codebase and generate a project context section for an Engineering Manager persona. Include: tech stack, architecture patterns, testing approach, key challenges, performance requirements, and security considerations. Format it as markdown that I can add to the persona file."
  1. For Product Manager context, try:
claude "Analyze this project and create a Product Manager context section including: user personas, business model, key pain points, competitive advantages, success metrics, and release process. Make it specific to this codebase."
  1. For QA Manager context:
claude "Review this codebase and generate a QA context section covering: current test coverage, testing frameworks used, test environments, key areas to test, performance requirements, and what's missing from our quality strategy."

Where to Add Context

Add the generated context to your persona files under the "My Current Context" section:

## My Current Context

### All Projects
- [General standards that apply to all your work]

### Your Project Name
- **Tech Stack**: [Your specific technologies]
- **Architecture**: [Your specific patterns]
- **Testing**: [Your specific approach]
- **Key Challenges**: [Your actual challenges]
- **Performance**: [Your actual requirements]
- **Security**: [Your specific considerations]

Example in Action

Before: "Review this API design for best practices" After: "Review this Express.js API design considering our MongoDB Atlas setup, Auth0 integration, and requirement to handle 1000 concurrent users"

The persona now knows your specific context and gives targeted advice!

Create New Personas

You can create your own personas for any role you need! Simply add new .md files to ~/.claude-agents/personas/ and they'll be automatically discovered.

Step-by-Step Process

  1. Create the persona file
# Create a new persona file
touch ~/.claude-agents/personas/security-engineer.md
  1. Follow the persona format (see template below)

  2. Update your memory imports

npm run update-personas  # Adds new persona to your User memory
  1. Start using your new persona
claude "Ask the security engineer to review this authentication flow"

Persona Template

Create personas following this proven format:

# Security Engineer - Jordan Kim

## About Me
Cybersecurity specialist with 12+ years protecting enterprise applications. I believe security should be built in, not bolted on, with a focus on practical, developer-friendly security practices.

## My Core Responsibilities
- Security architecture design and review
- Threat modeling and risk assessment
- Security code review and vulnerability analysis
- Compliance and regulatory guidance (SOC2, GDPR, etc.)
- Developer security training and best practices
- Incident response and forensics

## My Technical Context
- Focus on OWASP Top 10 and modern attack vectors
- Zero-trust architecture principles
- DevSecOps integration with CI/CD pipelines
- Cloud security (AWS, Azure, GCP) best practices
- Experience with security tools: SAST, DAST, dependency scanning
- Minimum security standards: MFA required, encryption at rest/transit
- Threat modeling using STRIDE methodology

## How I Communicate
- **Tone**: Security-focused, practical, educational
- **Focus**: Risk mitigation, compliance, developer enablement
- **Style**: Clear threat explanations with actionable remediation steps

## My Decision Framework
When evaluating security concerns, I consider:
1. **Risk Assessment**: What's the potential impact and likelihood?
2. **Defense in Depth**: How can we layer multiple protections?
3. **Developer Experience**: How can we make security easy to do right?
4. **Compliance**: What regulatory requirements apply?
5. **Cost vs Risk**: What's the appropriate level of protection?

New Persona Ideas

Here are some additional personas you might consider creating:

πŸ‘¨β€πŸ’» DevOps Engineer - Infrastructure, deployment, monitoring

# Create with: touch ~/.claude-agents/personas/devops-engineer.md
claude "Ask the DevOps engineer to design a CI/CD pipeline for this microservice"

🎨 UX Designer - User experience, interface design, usability

# Create with: touch ~/.claude-agents/personas/ux-designer.md  
claude "Ask the UX designer to improve the user flow for our onboarding"

πŸ“Š Data Scientist - Analytics, ML/AI, data insights

# Create with: touch ~/.claude-agents/personas/data-scientist.md
claude "Ask the data scientist to recommend metrics for this feature"

πŸ—οΈ Solutions Architect - System design, scalability, integrations

# Create with: touch ~/.claude-agents/personas/solutions-architect.md
claude "Ask the solutions architect to design a scalable event processing system"

πŸ”’ Compliance Officer - Regulatory requirements, audit preparation

# Create with: touch ~/.claude-agents/personas/compliance-officer.md
claude "Ask the compliance officer to review our data retention policies"

Best Practices for Customizing Personas

βœ… Do:

  • Give personas specific expertise areas and years of experience
  • Include their decision-making frameworks and methodologies
  • Add relevant technical context for your industry/domain
  • Define clear communication style and tone
  • Include project memories section for context building

❌ Avoid:

  • Generic or overly broad expertise claims
  • Conflicting responsibilities between personas
  • Too many personas (start with 3-5 core roles)
  • Copying existing persona content without customization

πŸ”§ How It Works

Simple Architecture

Your Claude Code Session
    ↓ "Ask the engineering manager..."
Claude Memory System
    ↓ Loads: @~/.claude-agents/personas/engineering-manager.md
Persona Context + Your Project
    ↓ 
Expert Response with Role-Specific Guidance

Memory Import System

  • Uses Claude Code's native @path/to/file memory imports
  • No servers, no complex infrastructure
  • Personas load automatically when referenced
  • Works with all existing Claude Code features

Context-Aware Feedback Protocol

When personas are added to your memory, they include a comprehensive framework that:

  • Detects work context from PR titles, commit messages, branch names, and issue labels
  • Calibrates feedback appropriately (e.g., no production concerns for POCs)
  • Provides stage-specific guidance for different development phases
  • Asks for clarification when context is unclear ("What stage is this work in?")

File Structure

~/.claude-agents/personas/     # Persona definitions
β”œβ”€β”€ engineering-manager.md     # Alex's expertise and context
β”œβ”€β”€ product-manager.md         # Sarah's expertise and context
└── qa-manager.md             # Marcus's expertise and context

~/.claude/CLAUDE.md           # User memory (global)
OR
./CLAUDE.md                   # Project memory (local)

templates/                    # Template files
└── persona-section.md       # Context-aware feedback framework

πŸ§ͺ Testing

This project includes comprehensive tests to ensure reliability:

npm test                      # Run all tests
npm run test:coverage        # Run with coverage report
npm test -- persona-scripts  # Run persona-specific tests

🀝 Contributing

Adding New Personas

  1. Create persona markdown file following existing format
  2. Add appropriate emoji icon in scripts
  3. Test with npm run install-templates && npm run update-personas
  4. Submit PR with new persona

Improving Existing Personas

  1. Edit persona files in personas/ directory
  2. Test changes with npm run update-templates
  3. Submit PR with improvements

Development Setup

git clone https://github.com/jasonhanna/claude-personas.git
cd claude-personas
npm install
npm test                      # Ensure tests pass

πŸ“š Documentation

πŸ’‘ Use Cases

Code Reviews

  • Architecture analysis and recommendations
  • Security vulnerability identification
  • Performance optimization suggestions
  • Code quality and maintainability feedback

Project Planning

  • Feature prioritization and roadmap planning
  • User story creation and refinement
  • Technical feasibility assessment
  • Risk analysis and mitigation strategies

Quality Assurance

  • Test strategy development
  • Edge case identification
  • Quality metrics definition
  • Bug prevention strategies

Team Collaboration

  • Cross-functional perspective gathering
  • Decision-making support
  • Knowledge sharing and mentoring
  • Best practice enforcement

🌟 Why Use Personas?

Instant Expertise

Get specialized guidance without hiring consultants or waiting for team members.

Consistent Quality

Each persona maintains consistent standards and approaches across all interactions.

Comprehensive Coverage

Technical, product, and quality perspectives ensure well-rounded solutions.

Learning Opportunity

Learn best practices and decision-making frameworks from experienced professionals.

Always Available

24/7 access to expert guidance for any development challenge.

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • Built for Claude Code memory import system
  • Inspired by the need for specialized AI assistance in software development
  • Designed for simplicity and immediate productivity gains

Ready to enhance your development workflow with AI expertise?

πŸš€ Run npm run install-templates && npm run add-personas to get started!

Questions? Problems? Feedback? Open an issue

About

Build stronger products with AI personas that act like your best team members

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages