Character consistency toolkit: personality profile cards, appearance-weight stats, and behavioral-drift detection for long-form fiction.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:MlittleFriend/dsh-character-profiler
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DSH writing plugin: character personality profiling + appearance-weight statistics + behavioral-drift detection. Quantified consistency monitoring for long-form fiction — every character's personality stays grounded, verifiable, and drift-free.
Features
| Tool | What it does | Cost |
|---|---|---|
novel_profile |
Generate/refresh a personality profile card per character: five-dimension personality, motivations, fears, values, speech style (catchphrases/forms of address), behavioral habits, emotional triggers, weaknesses, current growth arc, and consistency red lines; also collects full names/aliases (including third-party forms of address like "old man") | LLM (deep model optional) |
novel_appearance |
Appearance weight and share per character: mention count, paragraph count, dialogue count, per-chapter distribution, weight score (mentions×1 + paragraphs×2 + dialogue×3), share ranking, and protagonist/supporting tier; also flags unregistered suspected characters found in the text | Local only, 0 API |
novel_deviation |
Detect how much in-text behavior deviates from the profile: deviation index 0–100, a list of deviation points (type/severity/quote/suggestion); distinguishes "unforeshadowed OOC flip" from "justified character growth with causal setup" (compared against evolution.json) | LLM |
novel_profiler_status |
Character consistency overview: character card ↔ profile card comparison, appearance weights, unregistered characters, suggested actions | Local only |
How it works
- Profile cards are written to
lore/profiles/<character-key>.mdunder the project. That directory lives underlore/, which the writing engine auto-injects into later drafting context — while drafting, the model keeps seeing each character's consistency red lines, reducing drift at the source. - Appearance stats auto-derive short names from character card titles ("玛丽安娜·霍斯顿" → 玛丽安娜 / 玛丽 / 霍斯顿); after a profile is generated, LLM-extracted aliases are merged in, getting more accurate with use.
- Drift detection compares against the profile card by default; it falls back to the character card when no profile exists and suggests running
novel_profilefirst.
Installation
Recommended: one-line install via the DSH plugin command
dsh plugin --profile web add github:MlittleFriend/dsh-character-profiler, then restartdsh web(equivalent to the local script below, without manually copying the directory).
- Put this directory (
dsh-character-profiler/) somewhere convenient (e.g. next to your project). - Run
install.ps1(right-click → Run with PowerShell; orpowershell -ExecutionPolicy Bypass -File install.ps1). - Restart dsh web (close the current window and re-run your launch command). After restart, a
tool:character-profilerprompt section should appear in the console. - In a new session you can call
novel_profile/novel_appearance/novel_deviation/novel_profiler_status.
The install script automatically: installs the package into
~/.dsh/profiles/web, adds the plugin to bundles, and registers the plugin row in the profile'scordis.patch.yml. API config (apiKey/baseURL/model) is inherited at runtime from thedsh-tool-writingrow — the key lives in one place only (the tool-writing patch config or an environment variable), no duplication.
Suggested workflow
Start of each volume: novel_profiler_status → see who lacks a profile, whose share looks off
New character: novel_profile → create a profile card
Routine check: novel_appearance → is any character's weight/share imbalanced?
After a few chapters: novel_deviation → check for behavioral drift
Arc shift: novel_profile → update the profile (old card is overwritten)
FAQ
- Character names not matching? Add a line like
- 别称:玛丽 / 老头子to the character card, or runnovel_profileonce to have the LLM extract aliases. - Drift detection always says "consistent"? Profiles are distilled from the text, so self-consistency is expected; detection is meaningful after new chapters change behavior. Use
perChapter/maxParagraphsto tune granularity. - Characters without a card (like "卡尔" in the text) are not counted or checked;
novel_appearancewill prompt you to add a card.
Development & verification
test-local.mjs drives the engine directly without restarting the GUI (needs DSH_WRITING_API_KEY or reads the key from the profile patch):
node test-local.mjs --stats --root "project-directory"
node test-local.mjs --profile <character-key> --root "project-directory"
node test-local.mjs --deviation <character-key> --root "project-directory"
License
MIT
Links
More in this category
superdesigndev/treg★ 452
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
zhaoolee/notes★ 146
Export DSH conversations as Smartisan Notes-style PNGs, or create and update Markdown notes in a configured account-scoped workspace.
taxueseek/argo★ 98
Search built for agents: multilingual coverage across web, academic, code, shopping, finance, news, and encyclopedias.
omdsh-dev/dsh-data-agent★ 51
Let the AI connect to databases and write SQL for you.
geml-spec/geml#integrations/dsh-plugin★ 24
Block-addressed document editing: an MCP server exposing geml_get / geml_set / geml_check and friends, so an agent reads or rewrites one addressed block of a Markdown or GEML document instead of the whole file. Ships the GEML authoring skill and a code-graph skill that builds and navigates a project call graph as GEML codemaps.
omdsh-dev/dsh-custom-tool★ 24
Create and manage sandboxed JavaScript tools with a Monaco editor and model-driven tool lifecycle.