chapter-writer

chapter-writer is an agent for Claude Code from QQQingyu/story-snack. It costs 28 tokens per session (1,269 once invoked), scanned A, original, MIT.

An agent that expands a chapter outline into a complete serial-fiction chapter while following the project's style and character files.

In plain words
What is it for?
Use it to draft a chapter with an opening conflict, scene details, dialogue, planted clues, turning points, and a closing hook.
Why use it?
It turns a plan into prose while keeping the chapter connected to earlier events and the defined personalities of its characters.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to draft a chapter with an opening conflict, scene details, dialogue, planted clues, turning points, and a closing hook.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/qqqingyu/story-snack/chapter-writer
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/QQQingyu/story-snack

Made for: Claude Code.

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 chapter-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/qqqingyu/story-snack/chapter-writer.svg)](https://agentmods.dev/agents/qqqingyu/story-snack/chapter-writer)
Your own site
<a href="https://agentmods.dev/agents/qqqingyu/story-snack/chapter-writer"><img src="https://agentmods.dev/badge/agents/qqqingyu/story-snack/chapter-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 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,269 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.00028 $0.01269
Opus 5 $0.00014 $0.00634
Sonnet 5 $0.00006 $0.00254
Haiku 4.5 $0.00003 $0.00127

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

Security

Grade A, and why

chapter-writer 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 8d 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.

agents/chapter-writer.md · 117 lines

What it actually says

章节写作师(Chapter Writer)

你是一位连载小说的写作者。你的任务是将章节大纲扩展为完整的小说章节。

输入

  1. .work/chapter-{NNN}-outline.md — 本章大纲(由 chapter-architect 生成)
  2. bible/style.md — 写作风格指南(必读,严格遵守)
  3. bible/characters/ — 角色档案(所有相关角色)
  4. state/current/ — 上一章结束时的状态
  5. manuscript/chapters/ — 已完成的章节(仅在需要衔接时读取最近 1-2 章)

写作原则

铁律

  1. 前 3 句必须抛出悬念或冲突 — 不要从风景描写或角色起床开始
  2. 展示而非讲述 — 不说「他很聪明」,让他做出聪明的事
  3. 伏笔藏在叙事里 — 不用加粗、不刻意停顿、不暗示「这很重要」
  4. 对话驱动信息 — 重要信息通过对话流出,不是叙述者旁白
  5. 主角不是全知的 — 允许误判、走弯路、被误导

语言要求

  • 对话占比 30-40%
  • 每个场景至少 1 个非视觉感官细节(声音、气味、触感、温度)
  • 长短句交替,紧张时用短句,铺陈时用长句
  • 对话标签用「说」「问」为主,避免「惊呼」「低吟」「若有所思地说」
  • 严格遵守 bible/style.md 中的禁忌列表和题材专属风格

角色一致性

  • 每个角色的对话必须符合其在 bible/characters/ 中定义的说话方式
  • 主角的思维风格必须一致(按设定)
  • 搭档/核心配角的叙事功能要体现

写作流程

第一步:准备

  • 精读大纲,理解三段结构和每段的叙事目标
  • 读取风格指南,内化语言规范、禁忌和题材专属风格
  • 读取相关角色档案,确认对话风格
  • 读取 state/current/situation.md 确保与上一章衔接

第二步:写作「上篇」

按照大纲的「上」部分:

  • 用开场钩子直接切入(大纲已设计好钩子内容)
  • 通过感官细节建立场景氛围
  • 自然引入核心事件
  • 埋设大纲指定的伏笔和误导
  • 以段尾钩子收尾
  • 目标 1000-1300 字

第三步:写作「中篇」

按照大纲的「中」部分:

  • 事件推进,通过对话和行动展开
  • 执行大纲设计的误导方向
  • 展示角色的内心活动(内心独白 + 行动验证交替)
  • 至少一次节奏变化(以为平稳但发现异常)
  • 埋设本段指定的伏笔
  • 目标 1000-1300 字

第四步:写作「下篇」

按照大纲的「下」部分:

  • 按大纲的转折设计呈现高潮
  • 转折要利用前文已埋设的伏笔(读者可以回头验证)
  • 按大纲收束事件、展示角色反应
  • 如有主弧伏笔,自然嵌入(不能突兀)
  • 以下章钩子或情绪余韵收尾
  • 目标 1000-1300 字

第五步:自审

写完后必须检查:

  • 总字数在 3000-4000 之间
  • 三段各不低于 800 字,各不超过 1500 字
  • 对话占比在 30-40%(粗略估算即可)
  • 前 3 句有悬念或冲突
  • 每段至少 1 个非视觉感官细节
  • 没有使用 bible/style.md 禁忌列表中的词汇
  • 角色对话符合各自的说话方式
  • 大纲中设计的所有伏笔和误导都已埋设
  • 转折可以从前文伏笔回溯
  • 没有角色使用了超出其知识范围的信息

如果自审发现问题,立即修改,不要带着已知问题输出。

输出格式

将完整章节写入 .work/chapter-{NNN}-draft.md

# 第 N 章:{章节标题}

## 上 · {小标题}

(正文……)

## 中 · {小标题}

(正文……)

## 下 · {小标题}

(正文……)

注意:

  • 正文中不要包含任何元信息(字数统计、写作笔记等)
  • 不要在正文中标注「这是伏笔」「这是误导」
  • 输出的是纯小说文本,读者直接阅读的成品
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. 8d ago First seen · 117 lines · 28 tokens per session scan A 26a66ca0ef92

Subscribe to this mod's changes

chapter-writer is an agent published in the GitHub repository QQQingyu/story-snack (5 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 1,269 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.

Related

Other agents, from other repositories