Help us improve
Share bugs, ideas, or general feedback.
From claude-persona
Generates diverse AI persona panels, runs simulated interviews, and analyzes results with synthesis and charts for product concept testing and customer research.
npx claudepluginhub takechanman1228/claude-persona --plugin claude-personaHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-persona:persona concept-test | generate | ask [free text]concept-test | generate | ask [free text]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build reusable persona panels, ask open-ended customer questions,
Simulates focus groups with AI-generated personas from CRM data to test messaging, pricing, positioning, and creative concepts before real research spend.
Generates 3 refined user personas from research data (CSV, Excel, surveys, interviews), including JTBD, pain points, benefits, unexpected insights. Use for user segmentation and product decisions.
Generates 2-4 user personas from research data with demographics, goals, frustrations, behaviors, scenarios, and design implications for UX design teams.
Share bugs, ideas, or general feedback.
Build reusable persona panels, ask open-ended customer questions, and run concept tests on messages, offers, and product ideas.
Inspired by TinyTroupe (Generate Personas → Simulate Interactions → Extract & Analyze):
| Step | What happens | Component |
|---|---|---|
| 1. Build Panel | Define your market, generate diverse personas | Panel Builder |
| 2. Run Ask / Concept Test | Each persona responds independently in its own subprocess | Simulation Engine |
| 3. Review Findings | Structured report with themes, cross-tabs, charts, and verbatims | Analysis Pipeline |
Recommended workflow:
/persona generate — build a reusable panel/persona ask — explore motivations, barriers, language, and decision criteria/persona concept-test — compare explicit options when ready for a structured choice task| Command | What it does |
|---|---|
/persona generate Running shoe shoppers in the US | Build a reusable panel (default 5 personas) |
/persona generate --count 10 Gen Z skincare shoppers in the US | Panel with custom size |
/persona generate --segments Canned coffee drinkers in Japan | Segment-driven panel (default 15) |
/persona ask What frustrates you most about choosing skincare products? | Explore motivations and barriers |
/persona ask Why would you ignore an ad for a new running shoe? | Qualitative reaction before concept test |
/persona concept-test Compare 3 running shoe concepts | Concept test — concepts provided interactively |
/persona concept-test --market japan Evaluate 3 canned coffee concepts | Concept test with Japanese panel |
ask explores open-ended motivations, barriers, and language.
concept-test covers any comparison research: product concepts, messaging A/B,
packaging, competitive comparisons, feature bundles, and value framing with
price context.
For detailed input requirements and output descriptions per command,
see references/command-details.md.
The text after the command is parsed as follows:
concept-test, generate, ask--count N — Panel size (default: 5; not applicable for ask)--market MARKET — Target market/country (default: us). Accepts country codes (us, japan/jp, uk, de, fr, cn, kr) or freeform descriptors ("Southeast Asia", "urban Brazil"). Shorthand codes are expanded: us → United States, japan/jp → Japan, uk → United Kingdom, etc.--segments — Activate segment-driven flow; default panel size becomes 15 (not applicable for ask)--panel PANEL — (ask only) Specify the panel survey-id to use (e.g., running-footwear-us-15p-2026-04). Skips auto-detection.ask, the free text is the question itself.Parsing examples:
/persona concept-test Evaluate 3 new canned coffee concepts
→ type: concept-test, count: 5, intent: "Evaluate 3 new canned coffee concepts"
/persona concept-test --count 8 Compare ad headlines for EV launch
→ type: concept-test, count: 8, intent: "Compare ad headlines for EV launch"
/persona concept-test --segments Canned coffee
→ type: concept-test, count: 15, mode: segment-driven, intent: "Canned coffee"
/persona generate --count 15 Running shoes
→ type: generate, count: 15, market: "United States", intent: "Running shoes"
/persona generate --market japan --count 10 Canned coffee
→ type: generate, count: 10, market: "Japan", intent: "Canned coffee"
/persona concept-test --market japan Evaluate 3 new canned coffee concepts
→ type: concept-test, count: 5, market: "Japan", intent: "Evaluate 3 new canned coffee concepts"
/persona ask What frustrates you most about buying running shoes online?
→ type: ask, question: "What frustrates you most about buying running shoes online?", panel: auto-detect
/persona ask --panel running-footwear-us-15p-2026-04 Why would you ignore this ad?
→ type: ask, question: "Why would you ignore this ad?", panel: "running-footwear-us-15p-2026-04"
/persona ask --market japan What makes this product feel overpriced?
→ type: ask, question: "What makes this product feel overpriced?", market: "Japan", panel: auto-detect
When free text is provided:
concept-test: concept/option details (names + descriptions) — ask only if not in intentask: the question is the free text; no additional info requiredWhen no free text is provided:
Parse the user's request to determine:
--segments)jp → Japan)--segments)Collect missing info:
Persona Panel Decision:
a) User explicit instruction:
personas/{survey-id}/ directoryb) Auto-decision (default is NEW generation):
personas/ for subdirectories containing manifest.json (ignore _archive/)category closely matches the current topic AND market matches (or is absent, treated as "United States") → propose reuse, ask userc) New generation flow — two modes:
Topic-only mode (default):
references/topic-only-generation-flow.md for the 4-step flow
(dimension inference, target assignment, generation, manifest creation)Segment-driven mode (--segments):
references/segment-inference-prompt.md)
to generate 3-4 segments → present to user for approvalInspired by TinyTroupe's TinyPersonFactory plan-based approach: instead of letting the LLM freely generate N personas per segment, first build a deterministic sampling plan, then generate each persona from its slot specification.
Step 1a: Deterministic Count Allocation
Compute per-segment counts deterministically — do NOT delegate count management to the LLM. This is the orchestrator's responsibility:
base = floor(count / num_segments)remainder = count mod num_segmentsremainder segments get base + 1; remaining get basesum(segment_counts) == count before proceedingExamples:
Record each segment's allocated count. If the sum does not equal the requested count, fix the allocation before generating.
Step 1b: Sampling Plan Generation
Generate a sampling plan that assigns diversity attributes to each
persona slot. See references/sampling-plan-prompt.md for the prompt.
The plan is a JSON array with exactly N rows (one per persona). Each row specifies: segment, age_bucket, gender, occupation_tier, geography_type, region_hint, category_stance, ethnicity_hint.
After the LLM returns the plan, verify:
len(plan) == countStep 1c: Persona Generation from Slot Specifications
Generate personas sequentially by segment. For each segment batch:
persona-generation-prompt.md
as {{slot_spec}} — the LLM fleshes out each slot into a full persona{{exclusion_list}}This ensures cross-segment duplicate suppression is built into the generation flow, not left to chance.
Step 1d: Panel Validation
After all personas are generated, run scripts/validate_panel.py
programmatically:
python scripts/validate_panel.py --panel-dir personas/{survey-id} --requested-count {count} --json
Interpret the results:
d) Panel confirmation with QA summary:
| # | Name | Age | Gender | Occupation | Segment |
|---|------|-----|--------|------------|---------|
| 1 | Marcus Chen | 34 | M | Software Engineer | Serious Runners |
| 2 | Diana Okafor | 52 | F | School Principal | Casual Joggers |
| 3 | Jake Morales | 23 | M | Barista / Student | Fashion-Conscious |
### Panel QA
- Count: 30/30 ✓
- Segment balance: Serious (10), Casual (10), Fashion (10) ✓
- Names: all unique ✓
- Occupation duplicates: none ✓
- Age spread: OK ✓
- Gender balance: OK ✓
- Big Five near-duplicates: 1 pair (0.985) ⚠
e) Save personas:
personas/{survey-id}/{Name_Underscored}.jsonmanifest.json with:
"generation_mode": "topic-only" or "segment-driven""market": "{resolved market name}""requested_count": {count}"sampling_plan": [...] (the slot specifications from Step 1b)"validation_report": {...} (from validate_panel output)"description" fieldLoad survey template from templates/concept_test.md.
Read references/simulation-prompt.md for the core simulation prompt.
Before simulation, extract simulation profiles from the full persona JSONs
using extract_simulation_profile() in scripts/simulate_survey.py. Pass the compact
profiles (~40-50 lines/persona) as {PERSONAS_JSON} instead of the full personas
(~300 lines/persona). This saves context window while preserving all response-driving fields.
Use simulate_survey.py for production-quality results. This wrapper must force
--backend claude-cli, which runs each persona in a fully independent
claude -p subprocess — zero inter-persona bias.
python scripts/simulate_survey.py --config {config-path} --backend claude-cli
How it works:
claude -p processes (controlled by --concurrency, default 5)--output-format json --tools "" --no-session-persistenceresults.json + run_metadata.json to config.output_dir when provided, otherwise to outputs/{YYYY-MM-DD}/{HHMMSS}/{survey_type}/failure_stage: "preflight"Options: --dry-run, --analyze, --report-llm, --no-adherence-check, --model, --concurrency, --report-backend
Why agent-separated: Shared-context simulation suffers from anchoring bias, consensus bias, and style contamination. Agent separation eliminates all three.
Error handling: If simulate_survey.py exits non-zero, read run_metadata.json
for failure_stage, preflight.error, per_persona[].error, and
per_persona[].validation_issues. Common stages: preflight (backend unreachable),
simulation (persona subprocess failed), validation (response parsing failed).
Report the failure stage and the most relevant error payload before suggesting remediation.
The canonical persisted output format is:
[
{
"name": "Persona Name",
"segment": "Profile Label or Segment Name",
"age": 35,
"gender": "Female",
"occupation": "Nurse",
"responses": {
"question_key": "answer"
}
}
]
results.json + run_metadata.jsonscripts/analyze_results.py immediately with --analyzereport.md plus results.csv / summary.json and optional chartsconfig.output_dir when provided, otherwise to outputs/{YYYY-MM-DD}/{HHMMSS}/{survey_type}/--report-backend same so report generation also stays on claude-cliReport generation defaults:
ask and concept-test default to LLM-generated report.md when --analyze runs on a
claude-cli backend. Each survey type uses a dedicated synthesis prompt
(ASK_REPORT_SYSTEM_PROMPT / CONCEPT_TEST_REPORT_SYSTEM_PROMPT in
scripts/analyze_results.py).--no-report-llm to force the rule-based template report (faster / cheaper, but less rich).brand-map, price-test, usage-habits, survey) still default to the
rule-based template; add --report-llm to opt into LLM synthesis.Report format: See references/report-template.md for the baseline one-pager structure.
The survey-type-specific LLM prompts embed their own richer structures (Direct Answer, Where
They Agreed/Differed, Top Signals with clustering for ask; Preference Verdict, Segment Splits,
Per-Concept Strengths/Weaknesses, Improvement Theme Clusters for concept-test).
/persona ask command)/persona ask is a focused v1 addition that sits between generate and concept-test.
It lets users pose open-ended qualitative questions to an existing panel — no new panel
generation required. Each persona responds independently (agent-separated), and the
answers are synthesized into a usable research summary.
Extract:
/persona ask [options] is the research question--panel <survey-id> — skip auto-detection--market <market> — used during auto-detection as a filterIf the user provides no question text, ask: "What would you like to ask the panel?"
/persona ask always requires an existing panel. It never generates new personas.
If --panel is given:
personas/{PANEL}/manifest.jsonIf no --panel given (auto-detect):
personas/ for subdirectories containing manifest.json (exclude _archive/)--market is given, filter candidates to those whose manifest.market
matches (or whose market is absent, treated as "United States"). Drop non-matching panels."No persona panel found. Run
/persona generate {topic}first, then re-run your ask." Do NOT silently generate a new panel.
Display the matched panel to the user before running:
Using panel: running-footwear-us-15p-2026-04 (15 personas, US)
Construct a config JSON and save it to outputs/{YYYY-MM-DD}/{HHMMSS}/ask/ask-config.json:
{
"survey_type": "ask",
"panel_dir": "personas/{matched-panel-id}",
"topic": "{manifest.category}",
"variables": {
"category": "{manifest.category}",
"user_question": "{user's question verbatim}"
},
"backend": "claude-cli",
"model": "sonnet",
"max_concurrency": 5
}
python scripts/simulate_survey.py --config {config-path} --analyze
The --analyze flag automatically runs analyze_results.py --survey-type ask,
which produces summary.json with pre-computed top_signals, emotion_distribution,
plus report.md with ask-specific sections.
Each persona receives the question via templates/ask.md and returns:
short_answer — direct 2-3 sentence answerreasoning — concrete personal reasoningthemes — 1-4 short theme phrasesemotion — one-word dominant toneAfter the run completes, an LLM-generated report.md already exists in the output
directory (produced by analyze_results.py using ASK_REPORT_SYSTEM_PROMPT). Your job
is to read that report plus results.json / summary.json, then:
Direct Answer → Key Findings → Where They Agreed → Where They Differed →
Notable Verbatims → Top Signals → Emotion Distribution → Caveats.
If any section is missing or weak, overwrite report.md with your own synthesis
using the template below.report.md so they can read the full document.Use the pre-computed theme counts and emotion distribution from summary.json — do
not recompute them manually. When presenting the summary to the user, follow this structure:
## "{question}" — Panel Response Summary
**Panel**: {manifest_topic} ({N} personas, {market})
**Date**: {date}
### Direct Answer
[2-3 sentence synthesis of what the panel said overall, without attributing to
any single persona. Focus on the dominant response pattern.]
### Key Findings
1. [Primary theme or point of agreement]
2. [Secondary finding or notable split]
3. [Surprise, tension, or segment difference]
### Where They Agreed
[What most or all personas said in common]
### Where They Differed
[Notable splits — by age, segment, personality type, or circumstance]
### Notable Verbatims
> "[direct quote from reasoning field]" — Name, Age, Occupation
> "[direct quote]" — Name, Age, Occupation
### Top Signals
[comma-separated theme phrases with frequency counts, e.g.: "sizing uncertainty (8)", "brand trust (5)"]
---
Artifacts: outputs/{date}/{time}/ask/
*Virtual panel of {N} synthetic personas — directional signal only.*
Important: This is a qualitative synthesis, not a concept test. Do NOT frame findings as preference shares or percentages unless emotion counts or theme counts are clearly labeled as such.
/persona concept-test)Concept-test runs produce a structured choice (A/B/C) plus reasoning, purchase-likelihood
scores, and improvement suggestions. After --analyze finishes, an LLM-generated report.md
already exists in the output directory (produced via CONCEPT_TEST_REPORT_SYSTEM_PROMPT).
Your job as the orchestrator is to:
Preference Verdict → Key Findings → Segment / Profile Splits →
Purchase-Intent Drivers → Per-Concept Strengths and Weaknesses →
Improvement Theme Clusters → Notable Verbatims → Caveats.
If any section is missing or weak, overwrite report.md with your own synthesis
using the template below.report.md.Synthesis template to use when overwriting report.md:
# Concept Test: {topic} — Virtual Research Report
**Date**: {date} | **Panel**: {N} personas
## Panel Overview
| # | Name | Age | Occupation | Profile | Preferred | Purchase Likelihood |
|---|------|-----|------------|---------|-----------|---------------------|
| 1 | ... | ... | ... | ... | ... | ... |
## Preference Verdict
[2-3 sentences. Leader + margin + confidence. Use "Clear winner" (>60%), "Narrow lead" (40-60%),
"No winner; tied" (ties), or "Fragmented" (every concept <40%). Include raw counts.]
## Key Findings
1. [Cross-persona insight]
2. [Second insight]
3. [Third insight]
## Segment / Profile Splits
[Who picked what. Organize by segment → preference → shared reason. 3-6 lines.]
## Purchase-Intent Drivers
[What moved `purchase_likelihood` up or down across the panel. Cite factors personas credited.]
## Per-Concept Strengths and Weaknesses
### Concept A — N/total chose this
**Strengths (cross-persona):** [synthesis, not per-chooser dump]
**Weaknesses (cross-persona):** [what passers flagged]
### Concept B — N/total chose this
[...]
## Improvement Theme Clusters
- **Cluster label** (N mentions across Concepts X, Y) — one-line gloss with 1-2 persona attributions
[3-6 clusters]
## Notable Verbatims
> "full sentence from reasoning field" — Name, Age, Occupation
> "another full sentence" — Name, Age, Occupation
## Caveats
- Virtual panel of {N} personas; directional only
- Not statistically representative; use for hypothesis generation
- AI-generated responses may exhibit positivity bias
Important: Synthesis over summary. Never write a "Profile Analysis" section with one paragraph per persona — that is the old rule-based format. Never dump per-chooser verbatim reasoning under a "Support reasons" list; always cluster across personas.
See references/persona-schema.md for the complete JSON schema.
Key principle: Personas must be detailed enough to produce differentiated, realistic survey responses. The Big Five personality traits, communication style, and lifestyle details are what drive response variation.
In topic-only mode, the segment field contains a persona-specific archetype label
(e.g., "Budget Pragmatist"). In segment-driven mode, it contains the shared segment
name (e.g., "Daily Ritual Drinker").
See references/simulation-prompt.md for the core prompt template.
Key principles:
The concept test template (templates/concept_test.md) handles A/B/C concept
evaluation with reasoning. It is flexible enough to cover product comparisons,
message A/B tests, packaging evaluations, competitive comparisons, and feature
bundle comparisons. For research that doesn't fit the template, the orchestrator
constructs custom questions from the user's brief.
The ask template (templates/ask.md) handles open-ended qualitative questions.
It elicits a direct answer, concrete reasoning, recurring signals, and emotional tone
— structured enough for synthesis without forcing a choice.
Default (topic-only): Claude reads results.json and generates report.md directly.
--analyze flag: Runs scripts/analyze_results.py for:
--report-only skips charts)| Problem | Cause | Solution |
|---|---|---|
claude -p subprocess hangs | Claude CLI not authenticated or rate-limited | Run claude interactively first to confirm auth; check rate limits |
failure_stage: "preflight" in metadata | Backend unreachable before persona fan-out | Verify claude CLI is installed and on PATH; check network |
| All personas give identical responses | Shared-context mode used instead of agent-separated | Always use simulate_survey.py --backend claude-cli |
ModuleNotFoundError: pandas | Python dependencies not installed | pip install pandas matplotlib seaborn (needed for analysis only) |
| Persona panel lacks diversity | Panel size too small or topic too narrow | Increase --count; broaden topic description; check generation prompt output |
validate_response failures / retries | LLM returned wrong JSON shape | Script retries up to 3 times automatically; if persistent, check survey template keys |
| Report missing charts | --report-only flag was used, or matplotlib not installed | Re-run without --report-only; install matplotlib |
| Panel validation hard fails | Count mismatch, duplicate names, missing metadata | Run python scripts/validate_panel.py --panel-dir {dir} to diagnose; fix specific issues and re-validate |
| Panel validation warnings | Occupation/surname duplicates, age clustering, Big Five similarity | Warnings don't block usage; consider regenerating specific personas for higher quality |
Skill directory (installed to ~/.claude/skills/persona/): references/, scripts/,
templates/, demo/ — read-only assets, never modified during execution.
User's project directory (CWD): personas/ (generated panels), outputs/ (results,
reports, charts). All generated data is saved to the user's current working directory,
not the skill installation directory.
Full annotated tree in references/directory-structure.md.