Introduction¶
In DSH writing scenarios, a common issue with long novels is not single-sentence generation, but character consistency: while character cards contain motivations, catchphrases, and bottom lines, character behavior may still drift in later parts of the text; the frequency of appearances and determining who should exit often lack statistical basis.
Here is an introduction to a DSH writing plugin: dsh-character-profiler. It provides a set of checkable profiles and statistics for three main tasks: character profiling, appearance weight, and behavioral deviation. The DSH plugin ecosystem emphasizes “everything is a plugin”; the community directory is an independent site with no official affiliation with DeepSeek/Huafan, so it is still recommended to review third-party components when installing plugins.
What is This¶
dsh-character-profiler is a DSH writing plugin, positioned as a quantitative monitoring tool for character consistency in long novels. The repository is located at https://github.com/MlittleFriend/dsh-character-profiler, and the license is MIT.
It mainly solves three types of problems:
- Character traits lack continuously usable profiling profiles.
- Character appearance counts, paragraph distribution, and proportions lack statistics.
- Whether character behavior in the text deviates from settings lacks a checkable basis.
Core Features¶
| Tool | Function | Cost |
|---|---|---|
novel_profile |
Generate/update personality profiling profiles for characters, including five-dimensional traits, motivations, fears, values, speaking style, behavioral habits, emotional triggers, weaknesses, current character arc, consistency red lines, and collects full names/nicknames | LLM, deep models optional |
novel_appearance |
Statistics for each character’s appearance weight and proportion, including mention count, paragraph count, dialogue segment count, chapter distribution, weight score, proportion ranking, and protagonist/supporting role tiers, and prompts for suspected characters appearing in the text but not yet profiled | Pure local, 0 API |
novel_deviation |
Detect the degree of deviation between character behavior in the text and the profiling, including a deviation index of 0~100, a list of deviation points, and distinguishes between OOC mutations without铺垫 and reasonable personality development with causal铺垫 | LLM |
novel_profiler_status |
Provide an overview of character consistency, including character card vs. profiling profile comparison, appearance weight, unprofiled characters, and suggested actions | Pure local |
How It Works¶
Profiling profiles will be written to the project’s:
lore/profiles/<character_key>.md
This directory is located under lore/ and will be automatically injected into subsequent writing context by the writing engine. This means that when writing the main text, the model can continuously see the character profiling profiles, rather than relying only on one-time setting descriptions.
Appearance statistics will automatically derive aliases from the character card title; after generating the profile, it will also merge aliases extracted by the LLM.
Deviation detection defaults to comparing against the profiling profiles; if no profile exists, it falls back to comparing against the character card and suggests running novel_profile first.
Characters without a character card will not be statistically counted/detected, and novel_appearance will prompt to create a card.
Installation and Activation¶
Before installation, the following needs to be met:
node >=22.5.0
And declare the following peerDependencies:
@deepseek-ai/cordis ^4.0.1
@deepseek-ai/dsh-tools ^0.1.0-rc.6
@deepseek-ai/schemastery ^3.18.1
dsh-tool-writing >=0.5.1
Use the DSH plugin command to install to the web profile:
dsh plugin --profile web add github:MlittleFriend/dsh-character-profiler
The installation script will place the package at:
~/.dsh/profiles/web
And add the plugin to bundles, registering the plugin entry in the profile’s cordis.patch.yml.
API configuration is automatically inherited from the dsh-tool-writing entry’s configuration at runtime by the plugin; the key only exists in one place (either the tool-writing patch configuration or environment variables), so no copying is needed.
The plugin runs with the permissions of the current dsh process. It is recommended to check the source code and license before installation; the license for this plugin is MIT.
Typical Usage¶
Below is a workflow from card creation to checking:
- At the beginning of each volume: run
novel_profiler_statusto see who hasn’t been profiled and whose proportions are abnormal. - New characters: run
novel_profileto create a profiling profile. - Routine checks: run
novel_appearanceto see if appearance weight/proportions are unbalanced. - After finishing a few chapters: run
novel_deviationto check if behavior is drifting. - Arc changes: run
novel_profileto update the profile; old profiles will be overwritten.
You can also drive the engine locally directly for verification:
node test-local.mjs --stats --root "项目目录"
node test-local.mjs --profile <character_key> --root "项目目录"
node test-local.mjs --deviation <character_key> --root "项目目录"
These commands are used to view statistics, generate/update profiles, and detect character behavioral deviations, respectively.
Suitable Scenarios and Notes¶
Suitable for:
- Long novels, multi-character writing.
- Character cards already exist, but continuous profiling profiles are missing.
- Need statistics on character appearance weight, proportions, and chapter distribution.
- Need to check if character behavior in the text deviates from settings.
Notes:
novel_profileandnovel_deviationconsume LLM;novel_profiledeep models are optional.novel_appearanceandnovel_profiler_statusare pure local, 0 API.- Characters without a character card will not be statistically counted/detected, and
novel_appearancewill prompt to create the card. - When no profiling profile exists, deviation detection falls back to comparing against the character card and suggests running
novel_profilefirst. - When updating the profile with
novel_profile, old profiles will be overwritten. - The plugin runs within the permissions of the current dsh process; check the source code and license before installation.
- The DSH community directory is an independent site with no official affiliation with DeepSeek/Huafan, and the directory page should not be interpreted as an official app store.
Conclusion¶
dsh-character-profiler breaks down character consistency into three executable tasks: profiling, statistics, and detection. First use novel_profile to establish character profiles, then use novel_appearance to see appearance weight, and finally use novel_deviation to check if behavior is drifting. For long-form writing requiring long-term character maintenance, this is a specific checking workflow.
Related links: