← Back to Skills Marketplace
waitli

Dream Novel Writer

by Halcyon · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ✓ Security Clean
211
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install dream-novel-skill
Description
基于雪花写作法和三层记忆架构的小说创作辅助技能,支持从核心种子到章节产出的全流程小说架构与长文本记忆维持。包含了独立提示词库与 JS 管理脚本自动化工具。
README (SKILL.md)

Dream Novel Writer (小说创作专家)

技能介绍

本技能使你化身为专业的小说编辑和作家助手。通过融合“雪花写作法”的宏观故事构建,以及“三层记忆架构”的长文追踪技术,指导并协助用户从零开始创作出逻辑严密、人物丰满、避免大模型遗忘与幻觉的高质量长篇小说。你将拥有专属的操作目录 ./resources/* 来提取纯净版的大模型专用模板,以及 ./scripts/* 的 CLI 工具帮助持久化存储创作成果。

技能工作流 (Agent 必须遵循的步骤)

当你接到开启小说创作的任务后,请遵循这三个阶段流转。

先决条件:项目初始化与续写 (Project Init & Resume)

在进入阶段一之前,必须先确认并固定“小说项目目录”(一本书一个目录)。

  • 若是新书:要求用户给出项目路径(默认 ~/novels/\x3Cbook_name>,如用户未指定则采用默认),然后执行:
node ./scripts/state-manager.js init \x3C小说项目存储路径>
  • 若是续写:要求用户确认项目路径,并确保后续所有产出与临时文件都写入该项目目录。
    • 进入目录后,先读取 summary.json 与已存在的 chapter_*.md,确定“下一章编号”。
      • 规则:以现存 chapter_*.md 的最大章节号为准,下一章 = max + 1。
      • summary.jsonchapterSummaries 更大,则以其最大章节号为准。
    • 使用 temp_outline_all.txt 取出对应章的大纲,写入 temp_outline.txt 后再进入阶段三。
  • 所有产出与临时文件(大纲、章节正文、temp_outline.txt、temp_update_*.json 等)必须位于该项目目录内。

阶段一:架构生成 (Architecture Generation)

  1. 前置需求采集:询问用户要写的:**主题、小说类型、预计篇章、以及内容指导。**如果用户已经提供完毕,直接进入后续。
  2. 核心种子 (Core Seed):读取 ./resources/architecture.md 下的「核心种子 (coreSeed)」部分,填入用户的输入并对自己请求生成最终版“一句话故事公式”。
  3. 角色动力学设计:读取 ./resources/architecture.md 的「角色动力学 (characterDynamics)」执行生成 3-6 个具备深层欲望驱动的角色设定。
  4. 世界观 (World Building)情节架构 (plotArchitecture):继续读取 ./resources/architecture.md 下余下的模板进行相应的推论。注意:推论完成后不要停止,立即自动进入阶段二。

阶段二:章节节奏分布 (Chapter Blueprints)

读取 ./resources/chapter.md 的提示词。在此基础上,向大模型推演并规划未来的分集大纲。 重要长篇处理法则(分批大纲循环):由于单次上下文限制,对于长篇(如几十上百章),你必须进行分批生成大纲的循环任务(如:先生成 1-30 章大纲,再生成 31-60 章大纲,不断追加)。你必须将所有批次大纲持续追加并合并存入项目根目录的 temp_outline.txt 中。 ⚠️绝对警告:在用户要求的“总章数”大纲全部生成并合并完毕之前,绝对不允许私自进入阶段三生成正文!必须等待大纲全满! 所有大纲确认全部生成落地后,确认项目目录已初始化,然后进入阶段三。

阶段三:自动化长篇连载生成及记忆维护 (Writing & Memory)

正式开始写文阶段。这是该技能解决你作为 Agent “容易遗忘”问题的核心,请务必严谨执行:

注意:summary.json 需包含 chapterSummaries 数组以供 prompt-assembler 读取最近章节摘要;若当前为单章结构,需在写作流程中维护该数组或调整读取策略。

每一章的生成,必须完整走完以下流程后再推进下一章;章节完成后应询问用户是否继续下一章。

1. 生成章节正文前(准备上下文) 将正在撰写的一章大纲存为临时文件(temp_outline.txt;全量大纲建议命名 temp_outline_all.txt 并常驻项目目录),使用拼装脚本获得自动整合记忆库的新 Prompt:

node ./scripts/prompt-assembler.js \x3C小说项目路径> \x3C当前写的章节号> \x3C临时大纲文件>

读取终端返回的 Prompt 内容,交给大模型生成精彩的小说正文(初稿)。

2. 章节自审与自动化定稿 (Auto-Review & Finalize) 初稿生成后,基于最初存入的 temp_outline.txt 里的定级要求(含情节张力、伏笔埋设、核心作用等),作为编辑进行严格复核:

  • 如果脱离大纲、张力不足或忘记埋设伏笔,进行打回重写,直到完全符合。
  • 审核通过后,输出最终版神作,并把内容自动化定稿为 chapter_X.md 文件(X为章节号),持久化存放到小说路径中。

3. 章节写毕后,抽提本章增量数据到 JSON 定稿后,马上读取 ./resources/utility.md 的各大系统模板作为系统提示词并提取结构化数据:

  • 用「生成章节摘要」提取本章结构化 summary,如果处于一卷结束需要「更新卷/弧级汇总」。
  • 用「更新角色数据库」抽取新角色、物品、状态、角色间关系走势并出成 JSON 块。
  • 用「更新伏笔数据库」抽取这章埋设的新悬念或是否解答了解过的悬念 JSON 块。

4. 用工具持久化更新数据库 把你第 3 步抽出的各种类别 JSON 临时保存为临时文件 temp_update_characters.json 等等(每种单独存),然后分别执行状态更新:

node ./scripts/state-manager.js update \x3C小说项目路径> characters temp_update_characters.json
node ./scripts/state-manager.js update \x3C小说项目路径> summary temp_update_summary.json
node ./scripts/state-manager.js update \x3C小说项目路径> foreshadowing temp_update_foreshadowing.json

这样状态就会保持最新。本步骤执行完毕后,如果没有到达预定的目标章数,必须立刻静默开始下一章(重复执行第1、2、3步),直到整本小说完结。


[!NOTE] 如果你在写入 JSON 时提示“JSON parse error”类异常,说明你作为 Agent 提取 JSON 时混杂了注释或其他 markdown 控制符(比如多余的代码块结尾)。请让大模型重写出无多余字符的纯 JSON 数据再传给脚本。

Usage Guidance
This skill appears to do what it says (templates + two Node.js CLI scripts for assembling prompts and managing JSON state), but review these before installing: - Ensure Node.js is available and that you are comfortable the skill will execute node scripts; the registry metadata does not list Node as a required binary (the SKILL.md expects it). Install will fail or behave unexpectedly without Node. - Confirm the project path before use. The agent is instructed to default to ~/novels/<book_name> if the user doesn't specify; verify the path the agent will use. Do not let the agent write to system or sensitive directories. - The SKILL.md requires the agent to 'silently' and repeatedly continue writing chapters until completion. If you allow autonomous invocation, the agent could continue generating content and making many API calls/writes without further prompts — consider requiring explicit user confirmation between chapters or limiting the maximum number of auto-continued chapters. - Inspect the bundled scripts locally: they perform filesystem read/write only and do not make network calls. Confirm you are comfortable with the files they create (characters.json, foreshadowing.json, world.json, summary.json and chapter_X.md). - If you want tighter safety: (1) declare/verify Node runtime requirement; (2) run the skill in a sandboxed environment or restrict the allowed project directory; (3) modify SKILL.md to remove or require confirmation for the '静默开始下一章' behavior; (4) review and run the scripts manually once to see outputs and ensure they behave as expected. Confidence is medium because the code is small and readable (no obfuscation or network calls), but the missing runtime declaration and the forced-autonomous behavior create practical risks that depend on how you intend to use the skill.
Capability Analysis
Type: OpenClaw Skill Name: dream-novel-skill Version: 1.0.3 The skill is a comprehensive novel-writing assistant that uses a 'Snowflake' methodology and a multi-layered memory architecture to manage long-form content. It utilizes local Node.js scripts (`state-manager.js` and `prompt-assembler.js`) to handle state persistence by reading and writing JSON files (characters, foreshadowing, and summaries) within a user-specified project directory. While the skill executes shell commands and performs file system operations, these behaviors are transparently documented and strictly aligned with the stated purpose of maintaining narrative consistency across chapters. No evidence of data exfiltration, unauthorized network access, or malicious intent was found.
Capability Assessment
Purpose & Capability
Name/description (novel-writing, memory/architecture helpers) match the included files: templates in resources/* and two JS CLI tools that read/write project JSON and assemble prompts. However the SKILL.md instructs running node ./scripts/*.js but the skill metadata declares no required binaries; Node.js should be declared as a dependency.
Instruction Scope
Instructions remain within the novel-authoring domain (create project dir, read/write summary.json, chapter_*.md, call prompt-assembler/state-manager). Concern: SKILL.md mandates '静默开始下一章' (silently start next chapter repeatedly until the book is complete). That grants broad autonomous behavior (continuous generation and filesystem writes) and could lead to unexpected resource usage or unwanted content generation if not constrained.
Install Mechanism
No install spec (instruction-only) and bundled scripts/resources are provided. No external downloads or network calls in code. Still, because it expects to execute bundled Node.js scripts, the skill should declare Node as a required runtime binary; omission is an incoherence to surface to users.
Credentials
The skill requests no environment variables, no external credentials, and scripts operate on user-specified project directories only. There are no network endpoints or secret exfiltration attempts in the code.
Persistence & Privilege
The skill is not force-included (always:false) and allows autonomous invocation (default). Combined with the SKILL.md requirement to 'immediately silently start the next chapter' and to continually write files to the project directory, this can produce prolonged autonomous activity and many filesystem writes. This is not a platform privilege escalation but is a behavioral risk worth flagging.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dream-novel-skill
  3. After installation, invoke the skill by name or use /dream-novel-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
**Added project directory management and enhanced long novel workflow continuation** -主要优化长篇小说写作中,推出后无法链接的问题,只要agent 能读取到整个目录,就可以明确小说架构、以及之前章节的架构内容,就可以继续写下去。 - 新增项目初始化与“续写”模式,所有文件与临时产出需统一存储在项目目录下,支持小说断点续写和章节自动编号 - 完善长篇分批大纲循环生成规则与 temp_outline_all.txt 命名说明 - 强化章节概要(chapterSummaries)与现有大纲的对接,确保 prompt 生成准确追踪之前内容 - 写作流程中每章结束后需询问用户是否继续,不再强制静默推进所有剩余章节 - 明确所有生成、合并、审核和落盘的具体文件位置与命名规范,提升兼容性与可维护性
v1.0.2
Initial code and resource files added for the dream-novel-skill. - Introduced foundational project structure with 50 new files, including .git and resource directories. - Bundled independent prompt libraries and JavaScript CLI tools for managing novel writing workflows. - No user workflow or instruction changes in this version.
v1.0.1
- Removed legacy resources, scripts, and configuration files to streamline skill structure. - Updated skill documentation to add a new complete version number field. - Enhanced chapter outline workflow: blueprints for long novels must now be generated and merged in batches before writing begins. - Added explicit rule: do not start generating chapter content until all required outlines are fully complete. - Documentation now reflects updated, stricter stage separation and workflow requirements.
v1.0.0
Dream Novel Writer (v1.0.0) - Initial release of a novel writing assistant skill based on the snowflake method and layered memory architecture. - Supports end-to-end novel creation workflow: core seed extraction, character/world/plot outlining, chapter-by-chapter generation, and in-depth memory maintenance. - Includes an independent prompt library and JS scripts for automated workspace, memory updates, and project persistence. - Automated writing loop ensures full chapter drafts, self-review, and structured data extraction (summaries, character/status, foreshadowing) for long-form story coherence. - Features a CLI toolset to manage creative state and maintain consistency across the writing process.
Metadata
Slug dream-novel-skill
Version 1.0.3
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is Dream Novel Writer?

基于雪花写作法和三层记忆架构的小说创作辅助技能,支持从核心种子到章节产出的全流程小说架构与长文本记忆维持。包含了独立提示词库与 JS 管理脚本自动化工具。 It is an AI Agent Skill for Claude Code / OpenClaw, with 211 downloads so far.

How do I install Dream Novel Writer?

Run "/install dream-novel-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Dream Novel Writer free?

Yes, Dream Novel Writer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Dream Novel Writer support?

Dream Novel Writer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Dream Novel Writer?

It is built and maintained by Halcyon (@waitli); the current version is v1.0.3.

💬 Comments