persona-sim

persona-sim is a skill for Claude Code from Yrzhe/claude-skills. It costs 117 tokens per session (2,546 once invoked), scanned A, original, MIT.

A system for simulating feedback from virtual people sampled from census-based populations. It can model product opinions, voting behavior, social experiments, and semantic-gradient rankings.

In plain words
What is it for?
Use it to test product ideas or copy, compare alternatives, predict group voting, and run simulated social scenarios.
Why use it?
It helps explore how different groups may respond without relying on feedback from one person or an unstructured set of opinions. It requires separate setup for its data and language-model provider.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents.

Part of the persona-sim plugin — 4 skills shipped together

Good fit Use it to test product ideas or copy, compare alternatives, predict group voting, and run simulated social scenarios.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yrzhe/claude-skills/persona-sim
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Yrzhe/claude-skills --skill persona-sim
Clone the repo
git clone --depth 1 https://github.com/Yrzhe/claude-skills

Made for: Claude Code.

Or install persona-sim, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for persona-sim

README.md
[![agentmods](https://agentmods.dev/badge/skills/yrzhe/claude-skills/persona-sim/github.svg)](https://agentmods.dev/skills/yrzhe/claude-skills/persona-sim)
Your own site
<a href="https://agentmods.dev/skills/yrzhe/claude-skills/persona-sim"><img src="https://agentmods.dev/badge/skills/yrzhe/claude-skills/persona-sim/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for persona-sim

Your own site · 80×15
<a href="https://agentmods.dev/skills/yrzhe/claude-skills/persona-sim"><img src="https://agentmods.dev/badge/skills/yrzhe/claude-skills/persona-sim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.02546
Opus 5.5 $0.00047 $0.01018
Sonnet 5.5 $0.00023 $0.00509
Haiku 4.5 $0.00012 $0.00255

Measured 3mo ago against content hash 02dce59ea484, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

persona-sim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (eval/__init__.py, eval/run_eval.py, scripts/smoke_test.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/persona-sim/skills/persona-sim/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Persona Sim

Simulate feedback from census-grounded virtual populations. Five layers, each independently replaceable:

L5 Scenario adapters (product-feedback-sim / vote-predict / social-sandbox)   thin wrappers
L4 Simulation engine (sim_engine.py — SGO: panel -> score -> persuadable middle -> anchored gradient)
L3 LLM router        (llm_router.py — config-driven; default Haiku 4.5 + prompt cache; Sonnet for gradient)
L2 Persona sampler   (sampler.py    — unified sample_personas(n, filters, source, mode))
L1 Persona store     (~/.claude/data/personas/ + manifest.json)

First-time setup (not optional)

Dependencies and config live outside the skill under ~/.claude/data/personas/ so sharing the skill never leaks keys. See SETUP.md for the full walk-through. Short version:

mkdir -p ~/.claude/data/personas
cp ~/.claude/skills/persona-sim/data/config.example.json ~/.claude/data/personas/config.json
cp ~/.claude/skills/persona-sim/data/manifest.json ~/.claude/data/personas/manifest.json
# Edit config.json — set `provider` and fill api_key / base_url for your chosen block

python3 -m venv ~/.claude/data/personas/.venv
~/.claude/data/personas/.venv/bin/pip install -r ~/.claude/skills/persona-sim/requirements.txt

Always invoke with the venv interpreter:

~/.claude/data/personas/.venv/bin/python <script>

When to use

  • "Score this copy/feature with 100 virtual target users" → sim_engine.panel_score()
  • "Find the persuadable middle for this tweet" → sim_engine.sgo()
  • "Predict the US opinion distribution for this policy" → panel_score() + segment breakdown
  • "Which of these two pricing variants wins?" → sgo() with anchored counterfactual probes

In-code API

from persona_sim import sampler, sim_engine

# Sample 30 targeted personas (streaming — no local download needed)
panel = sampler.sample_personas(
    n=30,
    filters={"occupation_isco": "software", "age": (22, 55)},  # see filter semantics below
    source="nemotron_usa",
    mode="stream",
)

# Single-version scoring
result = sim_engine.panel_score(panel, target="Copy or product description here")
# -> {"n", "results", "aggregate": {"histogram", "median", "iqr", "entropy",
#    "multi_modal", "disagreement_flag", "by_gender", "by_age", "by_region"},
#    "warning": "Simulation only..."}

# SGO gradient — rank candidates by how much they shift the persuadable middle
ranked = sim_engine.sgo(
    panel,
    target="original version",
    candidates=["variant A", "variant B"],
    goal="maximize paid conversions",
)
# -> {"base", "persuadable_middle", "ranking": [{"candidate", "avg_score_lift", ...}]}

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 201 lines · 117 tokens per session scan A 02dce59ea484

Subscribe to this mod's changes

persona-sim is a skill published in the GitHub repository Yrzhe/claude-skills (66 stars, last pushed 1mo ago), licensed MIT. It adds 117 tokens to every session and 2,546 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

persona-sim compared with skills from other repositories

persona-sim next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
persona-simYrzhe/claude-skillsSkill661mo agoMITA117Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k5d agoMITA21Claude Code