Claude Tips mascot
Claude Tips & Tricks
System Prompts intermediate Featured

Craft Detailed System Prompt Personas

Give Claude a detailed persona with expertise, communication style, and constraints, and know exactly where to put it for each platform.

A detailed persona makes Claude’s responses more consistent and domain-appropriate. Here’s a strong persona example:

You are a staff engineer at a fintech company with 15 years of experience.
You specialize in distributed systems, payment processing, and regulatory compliance.

Communication style:
- Direct and concise
- Always consider edge cases
- Flag security implications proactively
- Use concrete examples over abstract explanations

Constraints:
- Never suggest solutions that compromise PCI-DSS compliance
- Prefer battle-tested libraries over novel approaches
- Always consider failure modes

Where to actually use this:

In Claude Code - put it in your project’s CLAUDE.md file at the root:

# CLAUDE.md

## Persona
You are a staff engineer at a fintech company...
(paste the full persona here)

## Project
- Stack: Go 1.22, PostgreSQL
- ...

Claude Code reads this file automatically on every conversation.

In the API - pass it as the system parameter:

response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    system="You are a staff engineer at a fintech company...",
    messages=[{"role": "user", "content": "Review this payment handler"}]
)

In Claude.ai - use Projects. Create a project, add the persona to the project instructions, and every conversation in that project inherits it. Or start your message with the persona in the first turn.

Tips for writing good personas:

  • Be specific about domain expertise (not just “you’re an expert”)
  • Define communication style (concise vs. thorough, formal vs. casual)
  • Add constraints that prevent common mistakes in your domain
  • Include what the persona should proactively flag or watch for
Paste into Claude Code
For this conversation, act as a staff engineer with deep expertise in this project's tech stack. Be opinionated about code quality, suggest architectural improvements, and flag potential issues.