Turn anime characters into runnable agent behavior packs. Not a character card, not a setting compendium, but an executable behavior program.
Core Philosophy
What CSP does is not copy a character's lines, butdistill the character's behavioral operating system。
A good character Skill should answer:
- How does shereact?
- How are her wordsspoken?
- How does sheunderstandothers' intentions?
- When she faces a value conflict,what does she protect first, what does she sacrifice?
- What will sheabsolutely neverdo?
- Up to what date does her material coverage extend, and how are later new plot developments updated?
Key distinction: what is captured is HOW she behaves, not WHAT she said. Labels are for people to read; behavior rules are for the AI to execute.
Product philosophy: A character is not a profile page, but a runnable reaction system
CSP's goal is not to rewrite the Wiki, nor to organize a character's lines into a prompt. The Wiki tells users "what happened"; CSP must tell the agent "in a new situation, how this character would live".
A high-quality character Skill contains at least six runnable layers:
| Layer | Question | What it looks like when it fails |
|---|---|---|
| Behavioral lens | What does she notice first, what does she ignore? | Can only restate settings |
| Reaction rules | In what situations does she approach, flee, attack, stay silent? | The same tone for every question |
| Expression DNA | How are sentence length, pauses, honorifics, self-reference, and emotional leakage combined? | Just pasting catchphrases |
| Relationship algorithm | How does she judge goodwill, betrayal, closeness, exploitation? | Equally warm to all users |
| Decision bottom line | In a value conflict, what does she protect first, what does she sacrifice? | The character is easily persuaded by the user |
| Honesty boundaries | What is unknown, what is outdated, what is merely speculation? | Hardcoding new plot developments |
Key principle: what can be written in is the behavior program; only what cannot be written in is kept as a boundary. A character's sense of mystery is not created by vagueness, but by acknowledging the limits of material, perspective, and inferential ability.
Future use scenarios
CSP provides anime creators with a shareable character behavior infrastructure, making character Skills a behavior layer that chat, fan creation, and interactive systems can all call upon together.
The most direct current use scenarios:
- Chat: Let users converse continuously with a character, keeping tone, relationship distance, and knowledge boundaries stable.
- Fan creation: Assists with writing dialogue, inner monologue, fragments, and short pieces, so characters don't just "sound right" but also "act right."
- Plot trial writing: Places characters into new situations not written in the original work, inferring reactions using behavioral patterns.
- Character study: Compares how different characters handle closeness, pressure, betrayal, choice, and silence.
Future expansions may include:
- AI interactive fiction: Characters react consistently based on player actions, rather than drawing sentences from a fixed dialogue library.
- AI visual novel / Galgame prototype: Uses character Skills to drive branching dialogue, relationship changes, and escalating conflict.
- Multi-character narrative experiments: Multiple character Skills collide within the same event, forming ensemble drama.
- Creator workbench: Authors use CSP to trial-write scenes, rewrite dialogue, check for OOC, and maintain character consistency in long-form fanfiction.
- Updatable character profiles: As the work continues to update, the Skill can also grow along with source dates and source chains.
What CSP aims to build is a path from "material" to "behavior" to "interactive narrative." Today it can chat with users and help create fanworks; in the future it can become part of AI interactive fiction games and a character-driven creative toolchain.
Default mode: highest-quality generation
By default, CSP only uses Highest Fidelity Mode。
Fast, token-saving, lightweight modes are not currently offered. During generation, it should retrieve public materials as completely as possible, cross-validate key conclusions, record sources and material dates, and write limitations into the Skill. Better to consume more tokens and get a high-fidelity character than to save context and generate a weak character card.
If a lightweight mode is implemented in the future, it must be an explicit option and must not change the default quality standard.
Prerequisite dependencies and the principle of prioritizing local retrieval
CSP depends on Python. Local scripts handle core site retrieval, source normalization, quality checks, and metadata generation; web search skill / MCP / WebFetch serve only as optional enhancements.
Retrieval priority:
- Official materials provided by the user: art books, interviews, BD bonuses, subtitles, screenshots, game story text.
- CSP local scripts retrieve core sites.
- Web search skill / MCP / WebFetch fill gaps.
- User manually supplements materials.
Search skills must not be treated as the first step. Unless the local scripts do not cover that site, or the local scripts fail and the reason is recorded.
Information source priority
| Priority | Source | Example |
|---|---|---|
| Highest | Official materials provided by the user | Art books, original interview texts, BD bonuses, official subtitles, screenshots |
| High | Official websites, official character introductions, official story text | franchise official sites, game story text |
| High | Moegirlpedia, Wikipedia, work Fandom Wiki | zh.moegirl.org.cn, wikipedia.org, fandom.com |
| Medium | Bangumi, AniDB, game databases, high-quality Bilibili columns, Anime News Network | bgm.tv, anidb.net, Bestdori, BWIKI |
| Low | Fan discussions, community interpretations | Must be marked as speculation |
| Excluded | Zhihu, WeChat public accounts, Baidu Baike | Cannot be used as sources |
Important conclusions require at least two independent sources. When sources conflict, preserve the conflict; do not force reconciliation.
Core local retrieval entry point
Prefer the unified entry point:
python scripts/source_search.py "角色名" --work "作品名" --mode discover
python scripts/source_search.py "角色名" --work "作品名" --sources moegirl,mediawiki
Moegirlpedia can directly use the dedicated script:
python scripts/moegirl_api.py "角色名" --intro
python scripts/moegirl_api.py "角色名" --full
python scripts/moegirl_api.py "角色名" --search
python scripts/moegirl_api.py "角色名" --wikitext
On Windows local use python; Linux/macOS users can try python3。
Retrieval failure rules
A key website must not be marked "insufficient information" just because of one failure. Must record:
- the command attempted;
- the query term and resolved title;
- URL;
- the error message;
- alternative sources;
- the impact on credibility.
If it still ultimately fails, in references/sources.json and the corresponding research file, record the failed items.
Generate directory structure
After confirming the character, first create the directory, then begin research:
<character-slug>/
├── SKILL.md
├── manifest.json
└── references/
├── sources.json
├── distillation.md
├── quality-report.json
└── research/
├── 01-setting.md
├── 02-personality.md
├── 03-expression.md
├── 04-relationships.md
├── 05-key-scenes.md
└── 06-media-coverage.md
The Skill must be self-contained. Copying the entire directory should make it usable independently. If the research files are incomplete, you must not claim generation is complete.
Required metadata and material time boundary
Every generated Skill must record the material search date, to avoid mismatch after the work gets a sequel, a game version update, or a new event.
manifest.json Required fields
{
"schema_version": "1.0",
"name": "character-slug",
"character": "角色名",
"work": "作品名",
"aliases": [],
"generated_at": "YYYY-MM-DD",
"research_started_at": "YYYY-MM-DD",
"research_completed_at": "YYYY-MM-DD",
"latest_source_checked_at": "YYYY-MM-DD",
"covered_until": {
"date": "YYYY-MM-DD",
"description": "截至该日期可检索到的公开资料和用户提供材料"
},
"covered_media": [],
"not_covered": ["YYYY-MM-DD 后发布的新剧情、新活动、新访谈、新设定修订"],
"source_count": 0,
"source_tiers": {},
"quality_score": null,
"honesty_boundary": "",
"csp_version": "unknown"
}
references/sources.json Requirements
Each source must record:
idsourcetitleurlsource_tierofficialitymedia_typeretrieved_atcontent_hash, calculate if possiblestatuswarnings
Failed sources must also be recorded,status write as failed。
Finally SKILL.md must include the material time boundary
The character Skill must state:
本 Skill 的资料检索完成于:YYYY-MM-DD。
行为蒸馏基于截至该日期可检索到的公开资料和用户提供材料。
如果作品在此日期后发布新剧情、新活动、新台词、访谈或设定修订,本 Skill 可能无法反映最新内容。
When the user points out "the latest plot is not like this", the character Skill must not stubbornly insist; it must respond:
我的资料更新至 YYYY-MM-DD,可能没有覆盖之后发布的内容。如果你有最新版 CSP,或可以提供新剧情 / 新资料链接,我可以帮你更新这个 Skill;这可能会消耗一些 Token。
Execution flow
Phase 0: Requirement confirmation
Confirm:
- Character name: Chinese/Japanese/English are all acceptable.
- Work name: the full series name, specifying which installment or which timeline.
- Generation scope: full profile by default; do not make a lightweight version.
- Whether the user has official materials: if so, highest priority.
- Whether it is a cross-media character: BanG Dream!, Love Live!, Project Sekai, Revue Starlight, etc. trigger cross-media rules by default.
When the user only says "just do XX", default to a full profile and proceed; when there is ambiguity from the same name, you must ask.
Phase 1:Source Discovery
First run local retrieval:
python scripts/source_search.py "<角色名>" --work "<作品名>" --mode discover
Goal:
- Find candidate entries;
- Collect aliases;
- Determine whether it is cross-media;
- Preliminarily generate
references/sources.json; - Record failed sources.
When the candidate is clear, proceed automatically; when there are multiple candidates, let the user choose.
Phase 2: Create directory and source index
Create the target structure, write empty:
references/sources.jsonreferences/distillation.mdreferences/research/06-media-coverage.md
and record research_started_at。
Phase 3: Multi-source information collection (5 Agents in parallel)
Launch 5 parallel sub-agents, but they no longer search blindly. Each agent must first read references/sources.json and the local retrieval results, and only search externally to fill gaps when the dimension gap is clear.
| Agent | Focus | Output file |
|---|---|---|
| 1 Setting | Basic information, worldview, identity, timeline, media coverage | 01-setting.md |
| 2 Personality | Behavior patterns, stress responses, inner conflicts, growth arc | 02-personality.md |
| 3 Expression | Sentence patterns, vocabulary, self-reference, honorifics, verbal tics, dialogue context | 03-expression.md |
| 4 Relationships | Important relationships, social cognition, cross-work interactions | 04-relationships.md |
| 5 Iconic Scenes | At least 8 key scenes, decision logic, behavior under pressure | 05-key-scenes.md |
Each research file must include:
- Source id or URL used;
- Credibility;
- Distinction between official settings / Wiki summaries / user materials / fan speculation;
- Conflict points;
- Retrieval failures and degradation situations.
Phase 4: Cross-media Coverage Record
For cross-media characters, must include 06-media-coverage.md:
- Covered media;
- Uncovered media;
- Weight of mainline and derivative materials;
- Conflicts between different media;
- Timeline adopted by this Skill;
- As of which date.
Game events, card stories, and regional dialogue can serve as supplements for daily behavior and relationships, but cannot override mainline settings unless officially and explicitly updated.
Phase 5: Research Quality Checkpoint
Run:
python scripts/merge_research.py <skill_directory>
Check:
- Number of sources per dimension;
- Total number of sources;
- Blacklisted sources;
- Failed sources;
- Whether important conclusions are cross-verified;
- Cross-media coverage;
- Whether material dates are recorded.
Show a summary to the user for confirmation. Research quality determines the final Skill ceiling; when gaps are obvious, supplement research before distillation.
Phase 6: Behavior Distillation
Read references/distillation-framework.md, write references/distillation.md。
Core behavior patterns must answer:
在什么情况下 → 做什么 → 为什么这样
Screening criteria:
- Cross-scenario recurrence: at least two different scenarios;
- Actionability: can infer reactions in new situations;
- Evidence chain: can be traced back to research files or sources;
- Preserve contradictions: developmental contradictions and situational contradictions are not smoothed over.
Aim to distill 3-7 core behavior patterns. Behaviors that pass only one layer of verification are downgraded to low confidence and are not written as core.
Phase 7: Distillation Confirmation Checkpoint
Show the user:
- Core behavior patterns;
- Expression texture;
- Core motivations;
- Internal contradictions;
- Knowledge boundaries;
- Material coverage dates;
- Uncovered media.
Assemble the final Skill only after user confirmation.
Phase 8: Build Skill and manifest
Read references/skill-template.md assemble SKILL.md。
Also generate:
python scripts/generate_manifest.py <skill_directory>
The final Skill must include:
- Role-playing rules;
- Operational core;
- Material time boundaries;
- Behavior dynamics;
- Expression texture;
- Social cognition;
- Decision logic;
- Knowledge boundaries;
- Rules for handling material updates or user corrections;
- Honesty boundaries;
- Research sources.
Phase 9: Quality Validation
Run:
python scripts/quality_check.py <skill_directory>
Must check:
- Number of behavior patterns;
- Expression texture;
- Preservation of contradictions;
- Role-playing rules;
- Behavior examples;
- Honesty boundaries;
- Source attribution;
manifest.json;sources.json;latest_source_checked_at;- Each source
retrieved_at; SKILL.mdmaterial time boundary;- Update response rules when the user points out the latest plot.
Verification results are written to references/quality-report.json. Only after the verification results are shown to the user is it considered complete.
Update existing Skill
Trigger phrases:
- "update this skill"
- "the latest plot is not like this"
- "XX has a new work out"
- "update her with the new version's plot"
- "this setting is outdated"
Update process:
- Read the old
manifest.json, confirmlatest_source_checked_at。 - Inform the user of the old material's date and possible token consumption.
- Ask the user whether there is new official material.
- Re-run local source discovery.
- Compare the old
sources.jsonwith the new retrieval results. - Only re-distill the affected dimensions.
- Update
references/distillation.md。 - Update
SKILL.md。 - Update
manifest.jsonthe material date of - Re-run
quality_check.py。
When updating, must not:
- directly overwrite old behavior patterns;
- treat user impressions as official settings;
- delete old conflict records;
- assume new plot necessarily overturns old plot;
- confuse different timelines.
Competitor capabilities that can be absorbed dialectically
Product expression: adopt
The README and delivery notes can more intuitively show before/after generation, character replay, and the differences between CSP and character cards. But do not copy the "body possession" route. CSP's positioning is high-fidelity behavior distillation.
Toolchain: adopt
Prioritize adding:
source_search.pysource_registry.pygenerate_manifest.pyfile_manager.py(for backup and updates)
batch_distill.py deferred, because the current default pursues the highest quality for a single character, not low-cost batch production.
Prompt refinement: adjust and adopt
Can provide:
python scripts/distill_prompt.py <skill_dir>
Output suitable for ordinary ChatGPT / Claude / SillyTavern / OpenClaw prompt.md. But this is only a portable export, does not replace the native Agent Skill, and does not include the complete research chain.
Memory protocol: adopt cautiously
In the near term, only absorb "revision records" and "user correction records"; do not do automatic long-term memory for now. CSP's core is character behavior distillation, not a companionship bot runtime.
Taste guidelines
| Principle | One sentence |
|---|---|
| Behavior > adjectives | Describe "what to do" rather than "what it is" |
| Evidence > impressions | Important conclusions must be traceable |
| Contradiction > consistency | Preserve contradictions; this is the source of depth |
| Context > lines | Every classic line must explain the scene |
| Time boundaries > forcing it | When material is outdated, acknowledge the boundary and enter update |
| Colloquial > essay | What Skill outputs is the character speaking, not a paper |
| Humanity > perfection | Characters can be uncertain, contradictory, silent |
Never do:
- replace behavior descriptions with moe attribute tags;
- Fabricating lines the character never said in the original work;
- Writing the character as a flawless persona;
- Forcing generation when information is insufficient;
- Using Zhihu, WeChat Official Accounts, and Baidu Baike as sources;
- Ignoring the date of source retrieval;
- Rigidly forcing old settings when the user points out new plot developments.
Deployment and Synchronization
After generation is complete, you can copy the entire character directory to .claude/skills/<name>/. When modifying the root directory CSP, you must synchronize the following in examples/csp/ :
SKILL.mdreferences/scripts/
Avoid divergence between the source-code version and the installable version.
Acknowledgments
CSP's multi-Agent research, stage checkpoints, and quality verification draw on nuwa-skill. CSP adapts this distillation approach to an anime-character behavior system: not replicating settings, but letting the character live believably in new situations.