This captures successful writing patterns from your webnovel sessions and appends them to a project memory file. When you nail a chapter hook or pacing beat, run it with a quick note and it categorizes the pattern (hook, dialogue, pacing, payoff), tags it with the current chapter number from your state file, and writes it out via a Python script that handles JSON serialization properly. The source is explicit about never hand-editing the JSON, which is smart. It auto-initializes the memory file if missing and skips exact duplicates by pattern type plus description. Useful if you're writing serial fiction and want to build a library of what actually worked without relying on memory alone.

skills.sh installs
606
GitHub stars
7.9K
last updated
Aug 21, 2026

Install

$ npx -y skills add lingfengqaq/webnovel-writer --skill webnovel-learn --agent claude-code

Installs into .claude/skills of the current project.

Files

/webnovel-learn

Project Root Guard(必须先确认)

  • 必须在项目根目录执行(需存在 .webnovel/state.json)
  • 用统一入口解析项目根,避免写错目录:
export WORKSPACE_ROOT="${CLAUDE_PROJECT_DIR:-$PWD}"
export SCRIPTS_DIR="${CLAUDE_PLUGIN_ROOT:?}/scripts"
export PROJECT_ROOT="$(python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${WORKSPACE_ROOT}" where)"

目标

提取可复用的写作模式(钩子/节奏/对话/微兑现等),追加到 .webnovel/project_memory.json。

执行流程

  1. 读取 "$PROJECT_ROOT/.webnovel/state.json" 的 progress.current_chapter 作为当前章节号;缺失则用 source_chapter: null,不阻断。
  2. 解析用户输入(/webnovel-learn 后的经验文本;为空则取本次对话中用户认可的写法),归类 pattern_type(hook/pacing/dialogue/payoff/emotion/format/other,无法归类用 other)。
  3. 调用 project-memory add-pattern 写入,不得手写或拼接 JSON:
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" project-memory add-pattern \
  --pattern-type "{pattern_type}" \
  --description "{用户输入或提炼后的完整描述}" \
  --category "{分类,可空}" \
  --importance "{high|medium|low}"

约束

  • 不删除旧记录,仅追加。
  • 追加前扫描已有 patterns;pattern_type + description 完全相同则跳过并告知用户,部分相似不去重。
  • 禁止使用 Write 或手工编辑 .webnovel/project_memory.json。

成功标准

Sponsors

Details

Repository
github.com/lingfengqaq/webnovel-writer
Category
Documentation
First seen
Jun 3, 2026

More from lingfengqaq/webnovel-writer

All 6
1toss avatarguidetoss/es-toolkites-toolkit usage guide covering installation, import patterns, and setup for Node.js, Bun, Deno, and browsers. Use when the user asks how to install, import, or538skills.sh installs
2aj-geddes avatarapi-reference-documentationaj-geddes/useful-ai-promptsCreate comprehensive API reference documentation with OpenAPI/Swagger specs, REST endpoints, authentication, examples, and SDKs. Use when documenting REST APIs,499skills.sh installs
3openclaudia avatarwrite-blogopenclaudia/openclaudia-skillsGenerate a full SEO-optimized blog post. Use when the user says "write a blog post", "blog article", "write about", "create content for", "SEO article", "blog c477skills.sh installs
4secondsky avatarapi-reference-documentationsecondsky/claude-skillsCreates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples. Use when documenting REST APIs, cr465skills.sh installs
5davila7 avatarwriting-plansdavila7/claude-code-templatesUse when you have a spec or requirements for a multi-step task, before touching code408skills.sh installs
6davila7 avatarwriting-skillsdavila7/claude-code-templatesUse when creating new skills, editing existing skills, or verifying skills work before deployment389skills.sh installs