nw-ch-write

nw-ch-write is a command for Claude Code from zhiliyouxian/claude-novel-writer. It costs 25 tokens per session (1,527 once invoked), scanned A, original, MIT.

A command for creating a consecutive range of novel chapters from an existing outline. It writes each chapter to a project folder and keeps related story records updated.

In plain words
What is it for?
Use it to create chapters 1–10, 11–20, or any other numbered range with `/nw-ch-write start-end`. It is for projects that already have a blueprint and chapter outline.
Why use it?
It removes the need to start each chapter separately or track progress by hand. It also checks the project and outline before writing, and asks before replacing existing chapters.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the novel-writer plugin — 9 skills, 11 commands, 9 agents shipped together

Good fit Use it to create chapters 1–10, 11–20, or any other numbered range with /nw-ch-write start-end. It is for projects that already have a blueprint and chapter outline.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zhiliyouxian/claude-novel-writer/nw-ch-write
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/zhiliyouxian/claude-novel-writer

Made for: Claude Code.

Or install novel-writer, the plugin that ships this one along with the rest of its 9 skills, 11 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nw-ch-write

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-ch-write/github.svg)](https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-ch-write)
Your own site
<a href="https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-ch-write"><img src="https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-ch-write/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nw-ch-write

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-ch-write"><img src="https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-ch-write.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,527 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.01527
Opus 5 $0.00013 $0.00763
Sonnet 5 $0.00005 $0.00305
Haiku 4.5 $0.00003 $0.00153

Measured 11d ago against content hash 3309153744ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

nw-ch-write scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/nw-ch-write.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

批量章节创作命令

快捷批量创作多个章节的命令。

执行此命令后进入章节阶段,后续对话可直接讨论章节修改,无需重复输入命令。

用法

/nw-ch-write <起始章节>-<结束章节>

示例

# 创作第1-10章
/nw-ch-write 1-10

# 创作第11-20章
/nw-ch-write 11-20

# 创作第47-56章
/nw-ch-write 47-56

功能

此命令会:

  1. 解析范围: 提取起始和结束章节号
  2. 调用Agent: 循环调用 chapter-writer Agent
  3. 逐章创作: 从起始章节到结束章节,逐个创作
  4. 自动管理: 每章创作完自动更新 entities.md
  5. 进度追踪: 完成后更新 progress.md

执行流程

用户输入: /nw-ch-write 1-10
  ↓
确定 project_id:
  ├─ 检查 blueprints/ 下有几个项目
  ├─ 如果只有一个 → 自动使用
  ├─ 如果有多个 → 询问用户选择哪个项目
  └─ 如果没有蓝图 → 提示先创建蓝图
  ↓
解析: 起始=1, 结束=10, 共10章
  ↓
确保目录存在: mkdir -p productions/{project_id}/chapters productions/{project_id}/data
  ↓
For each 章节 from 1 to 10:
  ├─ 调用 chapter-writer Agent
  ├─ 传入: 章节号, outline.md, entities.md
  ├─ 等待创作完成
  ├─ 保存 productions/{project_id}/chapters/chapter-{NNNN}.md
  ├─ 更新 productions/{project_id}/data/entities.md
  └─ 显示进度: "已完成 {N}/10 章"
  ↓
全部完成后:
  ├─ 更新 productions/{project_id}/data/progress.md
  └─ 提示用户: "10章创作完成,建议运行 /nw-ch-audit 1-10 进行审核"

参数验证

  • 范围检查: 起始 < 结束
  • 重复检查: 如果章节文件已存在,询问是否覆盖
  • 大纲检查: 确保 outline.md 包含对应章节

错误处理

错误1: 大纲缺失

错误: blueprints/{project_id}/outline.md 不存在
建议: 请先使用 /create-blueprint 或 outline-architect Agent 创建大纲

错误2: 范围超出大纲

错误: 大纲只有200章,但请求创作201-210章
建议: 请调整范围或扩展大纲

错误3: 章节已存在

警告: chapter-0001.md 已存在
选项: [覆盖] [跳过] [取消]

最佳实践

建议1: 每次10章

# 推荐: 每批10章,便于审核和修改
/nw-ch-write 1-10
/nw-ch-write 11-20
/nw-ch-write 21-30

建议2: 创作后及时审核

/nw-ch-write 1-10
/nw-ch-audit 1-10    # 立即审核
# 根据审核意见修改后,再写下一批

建议3: 检查一致性

/nw-ch-write 1-10
# 系统会自动运行 consistency-checker Skill
# 检查实体一致性

输出示例

开始批量创作: 第1-10章
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[1/10] 创作 第1章 废柴少年...
  ✓ 完成 (2847字)
  ✓ 更新实体库: +3个人物, +2个地点

[2/10] 创作 第2章 玉佩之秘...
  ✓ 完成 (2901字)
  ✓ 更新实体库: +1个物品

[3/10] 创作 第3章 签到系统...
  ✓ 完成 (2876字)
  ✓ 更新实体库: 境界更新(炼气3层→炼气5层)

...

[10/10] 创作 第10章 外门大比...
  ✓ 完成 (2955字)
  ✓ 更新实体库: +4个人物

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ 批量创作完成!

统计信息:
- 创作章节: 10章
- 总字数: 28,734字
- 新增实体: 15个人物, 8个地点, 3个物品
- 境界更新: 炼气3层 → 炼气9层

文件位置:
- 章节文件: productions/{project_id}/chapters/chapter-0001.md ~ chapter-0010.md
- 实体库: productions/{project_id}/data/entities.md (已更新)
- 进度记录: productions/{project_id}/data/progress.md (已更新)

下一步建议:
1. 运行 /nw-ch-audit 1-10 进行审核
2. 查看 productions/{project_id}/data/entities.md 检查实体一致性
3. 审核通过后,继续创作下一批: /nw-ch-write 11-20

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 201 lines · 0 tokens per session scan A 3309153744ac

Subscribe to this mod's changes

nw-ch-write is a command published in the GitHub repository zhiliyouxian/claude-novel-writer (5 stars, last pushed 8mo ago), licensed MIT. It adds 25 tokens to every session and 1,527 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.