with one click
with one click
产出可发布章节,完整执行上下文→起草→审查→润色→提交→备份。
基于总纲生成卷纲、时间线和章纲,并把新增设定增量写回现有设定集。
使用审查 Agent 评估章节质量,生成报告并写回审查指标。
从当前会话提取成功模式并写入 project_memory.json
查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询。
启动只读小说管理面板,查看项目状态、实体图谱与章节内容。
| name | webnovel-init |
| description | 深度初始化网文项目。通过分阶段交互收集完整创作信息,生成可直接进入规划与写作的项目骨架与约束文件。 |
| allowed-tools | Read Write Edit Grep Bash Agent AskUserQuestion WebSearch WebFetch |
.webnovel/state.json、设定集/*、大纲/总纲.md、.webnovel/idea_bank.json。/webnovel-plan 与 /webnovel-write 可直接运行。init_project.py。Read/Grep/Bash/Agent/AskUserQuestion/WebSearch/WebFetch 辅助收集。idea_bank.json、.story-system、设定集、大纲、正文、.webnovel/state.json 或任何 canon/read model 文件。路径说明:references/ 指 skill 私有 skills/webnovel-init/references/;../../references/ 指共享 references。
| Step | Trigger | Reference | 实际路径 |
|---|---|---|---|
| Step 1 | always | 数据流规范 | ${SKILL_ROOT}/references/system-data-flow.md |
| Step 1 | always | 题材套路库 | ${SKILL_ROOT}/references/genre-tropes.md |
| 卖点/题材采集 | always | 题材配置 | ${SKILL_ROOT}/../../references/genre-profiles.md |
| Step | Trigger | Reference | 实际路径 |
|---|---|---|---|
| Step 2 | 用户人物扁平 | 角色设计 | ${SKILL_ROOT}/references/worldbuilding/character-design.md |
| Step 4 | always | 势力格局 | ${SKILL_ROOT}/references/worldbuilding/faction-systems.md |
| Step 4 | 涉及修仙/玄幻/高武/异能 | 力量体系 | ${SKILL_ROOT}/references/worldbuilding/power-systems.md |
| Step 4 | always | 世界规则 | ${SKILL_ROOT}/references/worldbuilding/world-rules.md |
| Step 5 | always | 创意约束 | ${SKILL_ROOT}/references/creativity/creativity-constraints.md |
| Step 5 | always | 卖点生成 | ${SKILL_ROOT}/references/creativity/selling-points.md |
| Step 5 | 复合题材 | 题材融合 | ${SKILL_ROOT}/references/creativity/creative-combination.md |
| Step 5 | 卡顿 | 灵感候选 | ${SKILL_ROOT}/references/creativity/inspiration-collection.md |
| Step 5 | 题材映射命中 | 反套路库 | ${SKILL_ROOT}/references/creativity/anti-trope-*.md |
| Step 6 | always | 设定一致性 | ${SKILL_ROOT}/references/worldbuilding/setting-consistency.md |
| Step | Trigger | 检索命令 |
|---|---|---|
| 角色/书名/势力设定 | 用户开始设定命名 | python -X utf8 "${SCRIPTS_DIR}/reference_search.py" --skill init --table 命名规则 --query "{命名对象} {题材}" --genre {题材} |
Read/Grep:读取项目上下文与参考文件(README.md、CLAUDE.md、templates/genres/*、references/*)。Bash:执行 init_project.py、文件存在性检查、最小验证命令。Agent:拆分并行子任务(如题材映射、约束包候选生成、文件验证);Step 1.5 用户选择参考书拆解作为灵感来源时,调用 webnovel-writer:deconstruction-agent。AskUserQuestion:用于关键分歧裁决、候选方案选择、最终确认。WebSearch:用于检索最新市场趋势、平台风向、题材数据(可带域名过滤)。WebFetch:用于抓取已确定来源页面内容并做事实核验。环境设置(bash 命令执行前):
export WORKSPACE_ROOT="${CLAUDE_PROJECT_DIR:-$PWD}"
if [ -z "${CLAUDE_PLUGIN_ROOT}" ] || [ ! -d "${CLAUDE_PLUGIN_ROOT}/scripts" ]; then
echo "ERROR: 未设置 CLAUDE_PLUGIN_ROOT 或缺少目录: ${CLAUDE_PLUGIN_ROOT}/scripts" >&2
exit 1
fi
export SCRIPTS_DIR="${CLAUDE_PLUGIN_ROOT}/scripts"
必须做:
${CLAUDE_PLUGIN_ROOT}/scripts${SCRIPTS_DIR}/webnovel.pywhere 把 WORKSPACE_ROOT 解析成书项目根;新项目尚不存在时,where 可能命中旧指针或旧项目。references/system-data-flow.md(用于校对 init 产物与 plan/write 输入链路)references/genre-tropes.mdtemplates/genres/(仅在用户选定题材后按需读取)输出:
进入故事核采集前,必须先用 AskUserQuestion 或直接提问的方式确认用户是否要提供灵感来源。不要默认拆书,也不要把参考作品当作必填项。
建议询问:
你这本书的灵感来源想从哪里开始?可以直接说原创想法,也可以提供参考作品做拆书提炼。若要拆书,请给参考书名+平台,并尽量提供章节摘录或文本路径;没有参考也可以直接跳过。
可接受的灵感来源:
当用户选择参考作品拆书且提供文本路径或章节摘录时,必须使用 Agent 工具调用 webnovel-writer:deconstruction-agent,不得由 init 主流程口头替代拆解结果。
Agent(
subagent_type: "webnovel-writer:deconstruction-agent",
prompt: "reference_title={reference_title}; reference_source={reference_source}; reference_text_path={reference_text_path}; reference_text_excerpt={reference_text_excerpt}; analysis_mode={quick|deep|auto}; init_goal={当前初始化故事方向或空}; target_genre={题材或空}。只返回 init_reference_research JSON 对象,不写任何文件,不创建目录,不写 .story-system、.webnovel、设定集、大纲、正文、idea_bank.json、state.json 或任何 canon/read model 文件。"
)
处理规则:
init_reference_research JSON 后,只使用其中的 reader_promise、opening_hook_patterns、cool_point_loops、protagonist_patterns、antagonist_pressure_patterns、pacing_notes、borrowable_structures、differentiation_requirements、init_candidates、quality。quality:quality.passed=false、confidence < 0.85 或 warnings 非空时,不得把候选折叠进创意约束包;只能把风险和需补充材料展示给用户确认。do_not_copy 和 canon_contamination_warnings 必须进入已知信息清单,作为后续创意生成红线。收集项(必收):
题材集合(用于归一化与映射):
交互方式:
收集项(必收):
收集项(可选):
收集项(必收):
收集项(条件必收):
收集项(必收):
收集项(题材相关):
流程:
references/creativity/creativity-constraints.md 的 8.1 五维评分),辅助用户决策。备注:
idea_bank.json 或任何生成项目文件。必须输出"初始化摘要草案"并让用户确认:
确认规则:
{
"project": {
"title": "",
"genre": "",
"target_words": 0,
"target_chapters": 0,
"one_liner": "",
"core_conflict": "",
"target_reader": "",
"platform": ""
},
"protagonist": {
"name": "",
"desire": "",
"flaw": "",
"archetype": "",
"structure": "单主角"
},
"relationship": {
"heroine_config": "",
"heroine_names": [],
"heroine_role": "",
"co_protagonists": [],
"co_protagonist_roles": [],
"antagonist_tiers": {},
"antagonist_level": "",
"antagonist_mirror": ""
},
"golden_finger": {
"type": "",
"name": "",
"style": "",
"visibility": "",
"irreversible_cost": "",
"growth_rhythm": ""
},
"world": {
"scale": "",
"factions": "",
"power_system_type": "",
"social_class": "",
"resource_distribution": "",
"currency_system": "",
"currency_exchange": "",
"sect_hierarchy": "",
"cultivation_chain": "",
"cultivation_subtiers": ""
},
"constraints": {
"anti_trope": "",
"hard_constraints": [],
"core_selling_points": [],
"opening_hook": ""
}
}
未满足以下条件前,禁止执行 init_project.py:
project_root 必须由书名安全化生成(去非法字符,空格转 -)。project_root = <当前工作目录>/<书名安全化结果>,即 PROJECT_ROOT="${WORKSPACE_ROOT}/${PROJECT_SLUG}"。. 开头,自动前缀 proj-。${CLAUDE_PLUGIN_ROOT})。WORKSPACE_ROOT 当作 PROJECT_ROOT,除非用户明确指定当前目录本身就是书项目根。WORKSPACE_ROOTPROJECT_SLUGPROJECT_ROOT推荐安全化命令(与规则保持一致):
PROJECT_SLUG="$(python -X utf8 -c "import re,sys; title=sys.argv[1].strip(); slug=re.sub(r'[\\\\/:*?\"<>|]+','',title); slug=re.sub(r'\\s+','-',slug).strip('-'); print(('proj-' + slug) if (not slug or slug.startswith('.')) else slug)" "{title}")"
PROJECT_ROOT="${WORKSPACE_ROOT}/${PROJECT_SLUG}"
echo "WORKSPACE_ROOT=${WORKSPACE_ROOT}"
echo "PROJECT_SLUG=${PROJECT_SLUG}"
echo "PROJECT_ROOT=${PROJECT_ROOT}"
python "${SCRIPTS_DIR}/webnovel.py" init \
"${PROJECT_ROOT}" \
"{title}" \
"{genre}" \
--protagonist-name "{protagonist_name}" \
--target-words {target_words} \
--target-chapters {target_chapters} \
--golden-finger-name "{gf_name}" \
--golden-finger-type "{gf_type}" \
--golden-finger-style "{gf_style}" \
--core-selling-points "{core_points}" \
--protagonist-structure "{protagonist_structure}" \
--heroine-config "{heroine_config}" \
--heroine-names "{heroine_names}" \
--heroine-role "{heroine_role}" \
--co-protagonists "{co_protagonists}" \
--co-protagonist-roles "{co_protagonist_roles}" \
--antagonist-tiers "{antagonist_tiers}" \
--world-scale "{world_scale}" \
--factions "{factions}" \
--power-system-type "{power_system_type}" \
--social-class "{social_class}" \
--resource-distribution "{resource_distribution}" \
--gf-visibility "{gf_visibility}" \
--gf-irreversible-cost "{gf_irreversible_cost}" \
--currency-system "{currency_system}" \
--currency-exchange "{currency_exchange}" \
--sect-hierarchy "{sect_hierarchy}" \
--cultivation-chain "{cultivation_chain}" \
--cultivation-subtiers "{cultivation_subtiers}" \
--protagonist-desire "{protagonist_desire}" \
--protagonist-flaw "{protagonist_flaw}" \
--protagonist-archetype "{protagonist_archetype}" \
--antagonist-level "{antagonist_level}" \
--target-reader "{target_reader}" \
--platform "{platform}"
idea_bank.json写入 .webnovel/idea_bank.json:
{
"selected_idea": {
"title": "",
"one_liner": "",
"anti_trope": "",
"hard_constraints": []
},
"constraints_inherited": {
"anti_trope": "",
"hard_constraints": [],
"protagonist_flaw": "",
"antagonist_mirror": "",
"opening_hook": ""
}
}
必须补齐:
init 完成后,立即生成 MASTER_SETTING,让后续 plan 有调性/禁忌参照:
GENRE="$(python -X utf8 -c "import json,os; root=os.environ['PROJECT_ROOT']; s=json.load(open(root + '/.webnovel/state.json',encoding='utf-8')); print(s.get('project',{}).get('genre',''))")"
python -X utf8 "${SCRIPTS_DIR}/webnovel.py" --project-root "${PROJECT_ROOT}" \
story-system "${GENRE}" --genre "${GENRE}" --persist --format json
说明:
--chapter,只生成 MASTER_SETTING.json 和 anti_patterns.json--emit-runtime-contracts(还没有卷/章级数据)执行检查:
test -f "${PROJECT_ROOT}/.webnovel/state.json"
find "${PROJECT_ROOT}/设定集" -maxdepth 1 -type f -name "*.md"
test -f "${PROJECT_ROOT}/大纲/总纲.md"
test -f "${PROJECT_ROOT}/.webnovel/idea_bank.json"
test -f "${PROJECT_ROOT}/.story-system/MASTER_SETTING.json"
test "$(basename "${PROJECT_ROOT}")" = "${PROJECT_SLUG}"
成功标准:
state.json 存在且关键字段不为空(title/genre/target_words/target_chapters)。世界观.md、力量体系.md、主角卡.md。主角组.md;heroine_config=无女主 不生成 女主卡.md。金手指设计.md、复合题材-融合逻辑.md、爽点规划.md 或空的 角色库/物品库/其他设定 目录;这些信息以主角卡、世界观、卷纲为事实源。总纲.md 已填核心主线与约束字段。idea_bank.json 已写入且与最终选定方案一致。.story-system/MASTER_SETTING.json 存在且 route.primary_genre 非空。触发条件:
idea_bank.json 缺失或内容不一致。恢复流程:
init_project.py;