The <Persona> component defines a role or persona for Claude to adopt. Personas are rendered as part of the system message and help guide Claude’s behavior and expertise.
Current Implementation: Persona content is serialized into the prompt as a <persona> element but is not yet automatically extracted into the Claude system message. The persona text is included in the prompt children and will be visible to Claude, but dedicated system message integration is planned for a future release.
import { Persona } from "smithers-orchestrator";<Claude> <Persona role="security expert"> You specialize in application security, penetration testing, and secure code review. Focus on OWASP Top 10 vulnerabilities and security best practices. </Persona> Review this authentication code for security issues.</Claude>
<Claude> <Persona role="security expert"> You are a security researcher with expertise in: - Web application security - OWASP Top 10 vulnerabilities - Secure coding practices - Penetration testing methodology Always prioritize security over convenience. </Persona> Audit this API endpoint for security vulnerabilities.</Claude>
<Claude> <Persona role="senior code reviewer"> You are a senior engineer performing thorough code reviews. Focus on: - Code correctness and logic errors - Performance implications - Maintainability and readability - Test coverage gaps Be constructive but thorough in feedback. </Persona> Review this pull request.</Claude>
<Claude> <Persona role="database optimization specialist"> You specialize in database performance optimization with deep expertise in: - Query optimization and indexing strategies - Database schema design - N+1 query detection and resolution - Connection pooling and caching </Persona> Analyze these slow queries and suggest optimizations.</Claude>
Personas work well with the <Constraints> component:
Copy
Ask AI
<Claude> <Persona role="technical writer"> You write clear, concise technical documentation. </Persona> <Constraints> - Use simple language - Include code examples - Keep explanations under 200 words </Constraints> Document this API endpoint.</Claude>
Instead of “You are an expert”, specify what kind of expert:
Copy
Ask AI
// Good<Persona role="React performance specialist"> You specialize in React performance optimization, including: - Virtual DOM optimization - Memoization strategies - Bundle size reduction</Persona>// Less effective<Persona role="expert"> You are an expert developer.</Persona>
Include behavioral guidance
Tell Claude how to behave, not just what it knows:
Copy
Ask AI
<Persona role="patient mentor"> You are a patient teacher who explains concepts step by step. Always check for understanding before moving on. Use analogies when explaining complex topics.</Persona>
Match persona to task
Choose personas that align with the task at hand:
Copy
Ask AI
// For code review<Persona role="meticulous code reviewer" />// For creative tasks<Persona role="innovative architect" />// For debugging<Persona role="systematic debugger" />