write

write is a command for coding agents from wordflowlab/novel-writer. It costs 14 tokens per session (1,204 once invoked), scanned A, original, MIT.

A writing command for a novel-writing project that loads the story plan, previous chapters, character data, style rules, and other writing guidance before creating a chapter.

In plain words
What is it for?
It is for drafting a planned chapter, checking character names and forms of address, updating tracked story details, and performing quick validation after writing.
Why use it?
It keeps new chapters consistent with the story, characters, relationships, terminology, and the project’s writing rules.

Command

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.

agentmods
npx agentmods add commands/wordflowlab/novel-writer/write
Clone the repo
git clone --depth 1 https://github.com/wordflowlab/novel-writer

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 write

README.md
[![agentmods](https://agentmods.dev/badge/commands/wordflowlab/novel-writer/write.svg)](https://agentmods.dev/commands/wordflowlab/novel-writer/write)
Your own site
<a href="https://agentmods.dev/commands/wordflowlab/novel-writer/write"><img src="https://agentmods.dev/badge/commands/wordflowlab/novel-writer/write.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 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,204 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00014 $0.01204
Opus 5 $0.00007 $0.00602
Sonnet 5 $0.00003 $0.00241
Haiku 4.5 $0.00001 $0.00120

Measured 4d ago against content hash fe057eebe01b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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.

.specify/templates/commands/write.md · 127 lines

How it starts

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

执行章节写作任务:

  1. 运行脚本 {SCRIPT} 确定要写作的章节
  2. 加载相关文件:
    • 创作风格:.specify/memory/writing-constitution.md
    • 故事大纲:stories/*/story.md
    • 章节规划:stories/*/outline.md
    • 前文内容:stories/*/chapters/ (如有)
    • 角色验证规则spec/tracking/validation-rules.json (如有)
    • 角色状态spec/tracking/character-state.json
    • 关系规则spec/tracking/relationships.json
    • 个人语料memory/personal-voice.md
    • 自然化表达spec/knowledge/natural-expression.md
    • 反AI检测spec/presets/anti-ai-detection.md

写作前验证提醒

如果存在验证规则文件,执行以下检查

  1. 显示主角正确名称和别名
  2. 列出本章将出现的角色及其正确称呼
  3. 提醒常见错误(从validation-rules.json的common_errors读取)

示例输出:

📝 写作提醒
━━━━━━━━━━━━━━━━━━━
主角:李中庸(中庸、李公子)
配角:沈玉卿 → 主角称呼为"公子"
⚠️ 避免使用:李明、张华、主角
  1. 应用反AI检测策略

    • 词汇优化:替换AI特征词为口语表达
    • 句法自然化:长短句交错,加入口语特征
    • 认知模拟:体现人类思维的不完美性
    • 缺陷植入:适度的错别字和标点随意(每2000字1处)
    • 个性标记:应用personal-voice.md的个人特征
  2. 根据章节大纲创作内容:

    • 开场:吸引读者,承接前文
    • 发展:推进情节,深化人物
    • 转折:制造冲突或悬念
    • 收尾:适当收束,引出下文
  3. 确保内容符合:

    • 设定的创作风格
    • 角色性格一致性
    • 世界观规则
    • 情节逻辑
    • 自然化要求:避免过于完美的表达
  4. 写作后快速验证(如果存在validation-rules.json):

    • 扫描生成内容中的角色名称
    • 检查是否有forbidden列表中的错误名称
    • 验证称呼是否符合relationships规则
    • 如发现问题,立即提示并建议修正
  5. AI检测自检

    • 检查是否有连续3句结构相似
    • 检查用词是否过于书面化
    • 确认有适度的口语化特征
    • 验证文本不过于完美
  6. 将章节内容写入对应文件

  7. 更新写作进度和任务状态

写作要点:

  • 保持风格一致性
  • 注意伏笔的埋设和回收
  • 对话要符合角色身份
  • 描写要有画面感
  • 每章要有明确的推进作用
  • 反AI要点
    • 自然化表达优于完美文字
    • 适度缺陷增加真实感
    • 个人特征贯穿全文

追踪数据自动更新

写作完成后,自动执行以下更新:

  1. 更新情节追踪

    • 更新 spec/tracking/plot-tracker.json 的当前章节
    • 标记完成的情节节点
    • 记录新增的伏笔
  2. 更新时间线

    • 提取章节中的时间信息
    • 更新 spec/tracking/timeline.json
    • 检查时间连续性
  3. 更新角色关系

    • 识别关系变化
    • 更新 spec/tracking/relationships.json
    • 记录关系演变历程
  4. 更新角色状态

    • 记录角色位置变化
    • 更新 spec/tracking/character-state.json
    • 追踪角色发展
  5. 生成追踪提醒

    ✅ 第N章写作完成,追踪数据已更新
    
    建议执行:
    - /plot-check 验证情节连贯性
    - /timeline 检查时间逻辑
    - /relations 确认关系变化
    - /track --check 批量验证最近章节(推荐每10章执行一次)
    

Read the full file on GitHub · 127 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. 4d ago First seen · 127 lines · 14 tokens per session scan A fe057eebe01b

Subscribe to this mod's changes

write is a command published in the GitHub repository wordflowlab/novel-writer (939 stars, last pushed 10mo ago), licensed MIT. It adds 14 tokens to every session and 1,204 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-30.