nw-init

nw-init is a command for Claude Code from zhiliyouxian/claude-novel-writer. It costs 13 tokens per session (763 once invoked), scanned A, original, MIT.

A setup command that creates a standard workspace for writing novels. It adds folders for source material, blueprints, chapters, and released files, plus a project guide named CLAUDE.md.

In plain words
What is it for?
Use it when starting a novel project to prepare its directory structure and generate the initial workflow guide.
Why use it?
It removes the need to create the project folders and basic instructions by hand. It also avoids overwriting folders or guide files that already exist.

Command for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: mentions CLAUDE.md.

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

Good fit Use it when starting a novel project to prepare its directory structure and generate the initial workflow guide.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zhiliyouxian/claude-novel-writer/nw-init
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-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-init/github.svg)](https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-init)
Your own site
<a href="https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-init"><img src="https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-init/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-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhiliyouxian/claude-novel-writer/nw-init"><img src="https://agentmods.dev/badge/commands/zhiliyouxian/claude-novel-writer/nw-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 763 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.00013 $0.00763
Opus 5 $0.00006 $0.00381
Sonnet 5 $0.00003 $0.00153
Haiku 4.5 $0.00001 $0.00076

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

Security

Grade A, and why

nw-init 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 12d 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-init.md · 113 lines

What it actually says

工作区初始化命令

在当前目录创建小说创作工作区的标准目录结构,并生成项目级 CLAUDE.md 指导文件。

用法

/nw-init

功能

此命令会在当前目录创建以下目录结构和文件:

{当前目录}/
├── CLAUDE.md                   # 项目工作指南(新生成)
├── pools/                      # 素材池部门
│   └── analysis/              # 分析报告存放处
│
├── blueprints/                 # 策划部门
│   └── .gitkeep
│
├── productions/                # 制作部门
│   └── .gitkeep
│
└── releases/                   # 发布部门
    └── .gitkeep

执行指令

收到此命令后,执行以下步骤:

步骤1: 创建目录结构

mkdir -p pools/analysis blueprints productions releases

步骤2: 生成 CLAUDE.md

读取 Plugin 中的 templates/project-CLAUDE.md 模板,替换占位符后写入当前目录:

占位符替换规则:
- {version} → 插件版本号(从 .claude-plugin/plugin.json 读取)

生成的 CLAUDE.md 包含

  • 工作流概览
  • 快速开始命令表
  • 目录说明

步骤3: 输出完成信息

如果用户不在预期目录,先提示确认再执行。

输出示例

✅ 工作区初始化完成!

创建的目录结构:
├── CLAUDE.md        # 工作指南
├── pools/           # 放入参考小说进行分析
├── blueprints/      # 存放蓝图(世界观、角色、大纲)
├── productions/     # 存放章节文件
└── releases/        # 存放导出成品

下一步:
1. 准备素材: mkdir pools/reference_1 && cp 参考小说.txt pools/reference_1/
2. 分析素材: /nw-scan reference_1
3. 生成蓝图: /nw-bp-plan 玄幻 废柴流

或者直接开始创作:
"帮我策划一个玄幻废柴流小说"

注意事项

  1. 任意目录: 可以在任何你想要的目录执行此命令
  2. 不覆盖: 如果目录或 CLAUDE.md 已存在,不会覆盖现有文件
  3. 版本控制: 创建的结构适合 Git 版本控制

已有工作区检测

如果当前目录已经包含工作区结构(存在 pools/blueprints/productions/releases/ 中的任一目录),会提示:

⚠️ 检测到已有工作区结构

现有目录/文件:
- CLAUDE.md ✓
- pools/ ✓
- blueprints/ ✓
- productions/ ✗ (不存在)
- releases/ ✗ (不存在)

是否补充缺失的目录? [Y/n]

相关命令

  • /status - 查看工作区状态
  • /analyze-pool - 分析素材池
  • /create-blueprint - 创建蓝图
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. 12d ago First seen · 113 lines · 0 tokens per session scan A b27ae5c82c90

Subscribe to this mod's changes

nw-init is a command published in the GitHub repository zhiliyouxian/claude-novel-writer (5 stars, last pushed 8mo ago), licensed MIT. It adds 13 tokens to every session and 763 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.