Tomsawyerhu/Chinese-WebNovel-Skill

中文网文小说写作skill

Chinese‑WebNovel‑Skill

What it is – A collection of prompt‑and‑data modules designed to help large‑language‑model (LLM) agents write Chinese web‑novels. Instead of a single monolithic prompt, the repository organises the writing workflow into a router (SKILL.md) and a set of specialised sub‑skills (e.g., plot planning, opening, dialogue, consistency review). Each sub‑skill ships its own tutorial, runtime rules, good/bad examples and, where needed, template assets.

Why it matters – Chinese web‑novel platforms demand very specific structures (hook in the first few hundred words, tight chapter endings, consistent character voices, etc.). By breaking the problem into reusable modules and coupling them with a local corpus of real novel excerpts, the system lets an LLM:

  1. Diagnose the writing stage it’s dealing with,
  2. Pull relevant example material from the corpus,
  3. Apply a focused prompt that addresses that stage only,
  4. Run a final consistency check.

This modular approach keeps prompts short, maintainable, and less prone to the “prompt bloat” that occurs when a single prompt tries to cover every aspect of a story.


Core Design

Layer Content Purpose
1. SKILL.md Global principles, flow constraints, routing table Determines which module to invoke based on the user’s request
2. references/modules/ One folder per high‑frequency writing problem (e.g., opening, dialogue) containing README.md, tutorial.md, runtime.md, good_examples.md, bad_examples.md, source_index.md Encapsulates knowledge, rules, and examples for that problem
3. data/ & analysis/ Raw novel articles, CSV of structured excerpts, imitation index, stats Provides a searchable local corpus that the model can reference
4. scripts/ & templates/ Python script for corpus search, a few template files for outlines Implements the retrieval step and supplies ready‑made outline assets

Modules (currently implemented)

  • concept_planning – Turns a one‑sentence premise into genre, hook, premise, story engine, length estimate, and first‑volume direction.
  • opening – Generates the first 300‑3000 characters that hook the reader.
  • volume_outline – Expands the story engine into a three‑chapter “golden” arc, full‑volume outline, and chapter‑level outlines.
  • plot_logic – Fixes cause‑effect chains, motivations, triggers, decisions, and pay‑offs.
  • character_consistency – Ensures a character’s goals, emotions, relationships, physical traits, and voice stay consistent.
  • transition – Handles time jumps, scene changes, perspective shifts, and chapter‑to‑chapter bridges.
  • dialogue – Crafts relational tension, character voice, information embedding, and punchy dialogue.
  • chapter_ending – Adds hooks, lingering tension, and set‑ups for the next chapter.
  • anti_ai_voice – Strips generic AI‑style phrasing, boilerplate exposition, and uniform tone.
  • consistency_review – Final pass that checks plot, character, transition, dialogue, and ending consistency before a chapter is considered finished.

Each module follows the same skeleton, making it easy to add new problem‑specific modules without inflating the main prompt.


How it works (high‑level flow)

  1. User input – A brief story idea or a specific writing issue.
  2. Router (SKILL.md) decides whether the request is a high‑level planning task or a localized problem.
  3. Module activation – The appropriate sub‑skill is loaded; its tutorial.md and runtime.md guide the LLM.
  4. Corpus lookup – The script search_corpus_examples.py retrieves 2‑4 positive examples and 1‑2 negative examples from data/articles/ and analysis/excerpts.csv.
  5. Prompt composition – The LLM receives a concise prompt that includes:
    • The routing decision,
    • The module’s rules and examples,
    • Retrieved corpus snippets.
  6. Generation – The model produces a plan, draft, or revision for the targeted segment.
  7. Consistency review – After a chapter is written, consistency_review runs automatically to catch any lingering contradictions.

The repository also includes a Mermaid diagram that visualises the three‑stage pipeline (planning → execution → final review) and the data flow between the router, modules, and the local corpus.


Getting started

# Clone the repo
git clone https://github.com/Tomsawyerhu/Chinese-WebNovel-Skill.git
cd Chinese-WebNovel-Skill

# Run a corpus search (example: find opening hooks about a "crisis" situation)
python3 scripts/search_corpus_examples.py \
    --type '开头钩子' \
    --tag '危机压身' \
    --limit 5

# To use the full skill, feed your story premise to the LLM with the content of SKILL.md as the system prompt.
# The exact API call depends on the LLM you use (e.g., OpenAI, Anthropic, Claude, etc.).

For a single‑issue fix, invoke the corresponding module directly (e.g., dialogue) and follow the order:

  1. Read the module’s README.md → tutorial.md → runtime.md.
  2. Let the script retrieve relevant examples.
  3. Prompt the model with the assembled information.

Who should use it

  • Chinese web‑novel authors who want AI assistance that respects genre conventions and avoids generic AI prose.
  • Prompt engineers building LLM‑driven writing assistants for Chinese fiction.
  • Researchers interested in modular prompt design, retrieval‑augmented generation, and domain‑specific AI writing pipelines.

Maintenance philosophy

  • Keep the global router minimal; add new problems as separate modules.
  • Each module must contain tutorial + runtime rules + good/bad examples.
  • Always retrieve concrete corpus material before prompting the model.
  • Run consistency_review after every chapter.

Bottom line – Chinese‑WebNovel‑Skill is a structured, retrieval‑augmented prompt framework that lets LLMs act as disciplined co‑authors for Chinese web‑novels, breaking the writing process into clear, maintainable pieces while grounding output in real novel examples.

Related

  • Project
  • Project
  • Project
  • Project
  • Project