zenstory-ai/oh-story-claudecode / skills/story-import
story-import
Verified逆向导入已有小说。将已写好的小说(半成品或完本)反向解析为标准项目目录结构,兼容 story-long-write / story-short-write 后续写作流程;内部复用 story-long-analyze / story-short-analyze 的拆解管道,按篇幅自动分流。触发方式:/story-import、「导入小说」「反向解析」「导入」「把我的书导进来」。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.7 KB |
| references/benchmark-sync.md | markdown | 4.0 KB |
| references/character-state-reverse.md | markdown | 4.2 KB |
| references/deep-analysis.md | markdown | 4.3 KB |
| references/import-report.md | markdown | 4.3 KB |
| references/import-special-cases.md | markdown | 2.5 KB |
| references/import-tracking.md | markdown | 6.7 KB |
| references/length-routing.md | markdown | 1.5 KB |
| references/outline-reverse-rules.md | markdown | 6.0 KB |
| references/outline-reverse.md | markdown | 2.8 KB |
| references/structure-mapping-long.md | markdown | 20.1 KB |
| references/structure-mapping-short.md | markdown | 10.2 KB |
| references/tracking-initialization.md | markdown | 1.6 KB |
| scripts/build_outline_brief.jsexecutable | script | 15.4 KB |
| scripts/check-outline-contract.js | script | 12.4 KB |
| scripts/outline_view.jsexecutable | script | 15.1 KB |
| scripts/tracking_commit.jsexecutable | script | 84.7 KB |
| scripts/wordcount_core.jsexecutable | script | 20.3 KB |
references/outline-reverse.md
View on GitHub# 逐批反推细纲(长篇导入)
卷纲写定后,从章节摘要反推每章细纲,一批一个任务包。进度记在导入记录(`{书目录}/.story/work/导入记录.md`)的「细纲:已验收到第 B 章」;续跑从第 B+1 章起整批重做,这一批里已经存在但没验收的细纲文件按新任务包重写覆盖。
## Step 1:生成本批任务包
用 Node.js 18+ 请求第 B+1 章起的 20 章(剩下不足 20 章就到最后一章;已生成细纲的局部返修直接传对应章范围):
```text
node {story-import skill 根}/scripts/build_outline_brief.js --project {书目录} --chapters {A-B}
```
脚本将反推规则与模板([outline-reverse-rules.md](outline-reverse-rules.md) 全文)、测好的历史长度、摘要要点和覆盖本批的卷纲剧情单元卡,拼成 `{书目录}/.story/work/排纲/导入细纲_第AAA-BBB章.md`。历史长度按 `visible_chars_v1` 计算;执行者要读的总量超过约 25K 字时脚本自动少排几章(可少于 10 章)。以 stdout JSON 的 `chapters` 为实际范围、`next` 为下一批起点,`null` 表示已到最后一章。缺摘要的章改读正文,所需正文量也计入总量。
长度必须由脚本测,不得用模型估算,也不得跳过不报。找不到 Node.js 或脚本报错时停下,用一句话告诉作者卡在哪(如「第 12 章正文读不到,先把正文迁完」),不贴原始报错堆栈也不另加技术备注行;卷纲缺失或找不到覆盖本批的单元卡时,先回结构迁移补卷纲。
## Step 2:写本批细纲
- **有 story-architect**(导入记录写着可用,按 SKILL.md 顶部的当前宿主角色来源检查,ZCode 查插件注册角色):主会话只取任务包路径,不读包的内容。Prompt:`项目目录:{dir}\n任务包:{任务包路径}\n先完整读取任务包,按包里的规则与模板完成;作者已定的事在 .story/work/导入记录.md,对话内容不会传给你\n交付后只回任务包开头要求的几项`。Antigravity 用 `invoke_subagent` + `TypeName: "story-architect"`。
- **没有**:主会话完整读取任务包,按包内规则写本批;不另读包外写作技法,也不整读拆文库摘要。
## Step 3:验收与交接
每批写完由主会话运行 `node {story-import skill 根}/scripts/check-outline-contract.js --json <本批细纲路径...>`:exit 1 时只按报告补缺的字段或小节(有 story-architect 时把报错原样交回同一 agent 修一次)。通过后把导入记录的细纲进度改成「已验收到第 B 章」。还有下一批时,向作者一句话说到第几章了,末尾按 [SKILL.md 的换上下文规则](../SKILL.md#时刻表与交接) 建议新开对话说「继续导入」;没有子代理时每批都这样建议。全部章节细纲写完再进 Phase 4。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |