# Send Fanfic Writer to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fanfic-writer",
    "name": "Fanfic Writer",
    "source": "tencent",
    "type": "skill",
    "category": "内容创作",
    "sourceUrl": "https://clawhub.ai/tanson515/fanfic-writer",
    "canonicalUrl": "https://clawhub.ai/tanson515/fanfic-writer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/fanfic-writer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fanfic-writer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "INSTALL_GUIDE.md",
      "prompts/v1/chapter_draft_continue.md",
      "prompts/v1/chapter_draft_first.md",
      "prompts/v1/chapter_outline.md",
      "prompts/v1/chapter_plan.md",
      "prompts/v1/main_outline.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/fanfic-writer"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fanfic-writer",
    "downloadUrl": "https://openagent3.xyz/downloads/fanfic-writer",
    "agentUrl": "https://openagent3.xyz/skills/fanfic-writer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fanfic-writer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fanfic-writer/agent.md"
  }
}
```
## Documentation

### Fanfic Writer v2.1 - 自动化小说写作系统 / Automated Novel Writing System

版本 Version: 2.1.0
架构 Architecture: 基于证据的状态管理 with atomic I/O
安全机制 Safety: Auto-Rescue, Auto-Abort Guardrail, FORCED 连击熔断
核心特性: 每个阶段人工确认

### 系统概览 / System Overview

Fanfic Writer v2.1 是一套生产级的小说写作流水线，每个阶段都需要人工确认：

/ Fanfic Writer v2.1 is a production-grade novel writing pipeline with human confirmation at each phase:

9 阶段流水线 / 9 Phase Pipeline: 从初始化到最终QC
7 状态面板 / 7 State Panels: 角色、剧情线、时间线、道具、地点、POV规则、会话记忆
证据链 / Evidence Chain: 所有状态变更带有 (章节, 片段, 置信度) 追踪
原子I/O / Atomic I/O: temp → fsync → rename 模式 + 快照回滚
多视角QC / Multi-Perspective QC: 3-评审协议 + 100分制评分
安全机制 / Safety Mechanisms: Auto-Rescue, Auto-Abort
人工确认 / Human Confirmation: 每个阶段必须确认才能继续

### 人工确认流程 / Human Confirmation Flow

根据设计文档，每个阶段都需要人工确认：

阶段 Phase需要确认的内容状态 StatusPhase 1书名、类型、字数、存放目录必需Phase 2风格指南必需Phase 3主线大纲必需Phase 4章节规划必需Phase 5世界观设定必需Phase 6每章正文后确认进入下一章必需Phase 7Backpatch 确认必需Phase 8-9最终合并确认必需

### 通过 OpenClaw 调用

帮我写一本都市灵异小说

AI 会引导你完成每个阶段的确认。

### 通过 CLI

# 初始化新书 (每个阶段会确认)
python -m scripts.v2.cli init

# 写作 (每章会确认)
python -m scripts.v2.cli write --run-dir <path>

### 目录结构 / Directory Structure

novels/
└── {book_title_slug}__{book_uid}/
    └── runs/
        └── {run_id}/
            ├── 0-config/              # 配置层
            ├── 1-outline/             # 大纲层
            ├── 2-planning/           # 规划层
            ├── 3-world/              # 世界观层
            ├── 4-state/              # 运行时状态 (7面板)
            ├── drafts/                # 草稿层
            ├── chapters/              # 最终章节
            ├── anchors/               # 锚点
            ├── logs/                  # 日志
            ├── archive/              # 归档
            └── final/                 # 最终输出

### 阶段参考 / Phase Reference

阶段 Phase名称 Name描述 Description需要确认1Initialization创建工作空间、配置✅ 书名/类型/字数/目录2Style Guide定义叙事风格✅ 风格指南3Main Outline生成书籍级情节结构✅ 主线大纲4Chapter Planning详细章节列表与钩子✅ 章节规划5World Building角色、阵营、规则、道具✅ 世界观5.5Alignment Check验证世界观匹配意图清单自动6Writing Loop清洗→草稿→QC→提交✅ 每章确认7Backpatch PassFORCED章节回补修复✅ 确认8Merge Book合并章节为最终版本✅ 确认9Whole-Book QC最终7点质量检查✅ 确认

### 确认流程 / Confirmation Flow

[生成大纲] → 用户确认 → [生成正文] → QC评分 → 用户确认 → [下一章]

### QC 评分标准

分数 Score状态 Status动作 Action≥85PASS保存，继续75-84WARNING保存（带警告），继续<75REVISE重试第三次<75FORCED保存，进Backpatch

### 0-book-config.json

{
  "version": "2.1.0",
  "book": {
    "title": "书名",
    "title_slug": "book_slug",
    "book_uid": "8char_hash",
    "genre": "都市灵异",
    "target_word_count": 100000,
    "chapter_target_words": 2500
  },
  "generation": {
    "model": "moonshot/kimi-k2.5",
    "mode": "manual",
    "max_attempts": 3,
    "auto_threshold": 85,
    "auto_rescue_enabled": true
  }
}

### 模型说明

重要: 这个 skill 不硬编码任何模型。当 OpenClaw 调用此 skill 时，自动使用 OpenClaw 当前配置的模型。

### 函数入口

from scripts.v2.openclaw_entry import run_skill, get_required_confirmations

# 获取某阶段需要确认的内容
confirmations = get_required_confirmations("6_write")
# Returns: ["每章正文生成后确认", "每章评分确认"]

# 运行 skill - 模型由 OpenClaw 自动提供
result = run_skill(
    book_title="我的小说",
    genre="都市",
    target_words=100000,
    mode="manual"
    # oc_context 由 OpenClaw 自动传入，包含当前模型
)

### oc_context 参数

OpenClaw 会自动传入 oc_context 参数，包含：

model_call - 调用当前模型的方法
model_name - 当前模型名称（可选）
generate - 备选方法（可选）

### 模块结构 / Module Structure

scripts/v2/
├── __init__.py
├── utils.py              # ID生成、slug、路径
├── atomic_io.py          # 原子写入、快照
├── workspace.py          # 目录管理
├── config_manager.py     # 配置I/O
├── state_manager.py      # 7面板
├── prompt_registry.py    # 模板注册表
├── prompt_assembly.py   # 提示词构建
├── price_table.py       # 费率表管理
├── resume_manager.py    # 断点续传、锁管理
├── phase_runner.py      # 阶段1-5
├── writing_loop.py       # 阶段6
├── safety_mechanisms.py  # 阶段7-9
├── cli.py               # CLI入口
└── openclaw_entry.py    # OpenClaw入口 (v2.1新增)

### v2.1.0 (2026-02-16)

✅ 每个阶段人工确认机制
✅ OpenClaw 函数入口
✅ 接入真实模型 API
✅ 修复 Windows 兼容性
✅ 完善中文文档

### v2.0.0 (2026-02-11)

初始版本
9阶段流水线
7状态面板
多视角QC

### 许可证 / License

MIT License
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: tanson515
- Version: 2.1.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/fanfic-writer)
- [Send to Agent page](https://openagent3.xyz/skills/fanfic-writer/agent)
- [JSON manifest](https://openagent3.xyz/skills/fanfic-writer/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/fanfic-writer/agent.md)
- [Download page](https://openagent3.xyz/downloads/fanfic-writer)