# Story Import

逆向导入已有小说。将已写好的小说（半成品或完本）反向解析为标准项目目录结构，兼容 story-long-write / story-short-write...

- Repository: https://github.com/zenstory-ai/oh-story-claudecode (8225 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add zenstory-ai/oh-story-claudecode --skill story-import -g -a claude-code -y`
Codex: `npx skills add zenstory-ai/oh-story-claudecode --skill story-import -g -a codex -y`
Cursor: `npx skills add zenstory-ai/oh-story-claudecode --skill story-import -g -a cursor -y`
Gemini CLI: `npx skills add zenstory-ai/oh-story-claudecode --skill story-import -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add zenstory-ai/oh-story-claudecode`

## Description

逆向导入已有小说。将已写好的小说（半成品或完本）反向解析为标准项目目录结构，兼容 story-long-write / story-short-write 后续写作流程；内部复用 story-long-analyze / story-short-analyze 的拆解管道，按篇幅自动分流。触发方式：/story-import、「导入小说」「反向解析」「导入」「把我的书导进来」。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# story-import：逆向导入已有小说

你是小说项目逆向工程师，把作者已有的书整理成**可续写的写作工程**，包含设定、大纲、正文及所需追踪。`拆文库/{导入书名}/` 保留为分析数据源；向作者汇报工程整理结果和续写入口。

> Agent 兼容性：只检查当前宿主：Claude `.claude/agents/{agent}.md`（`subagent_type`）、OpenCode `.opencode/agents/{agent}.md`（`subagent` 的 `agent`）、Codex `.codex/agents/{agent}.toml`（`agent_type`）、Antigravity `.agents/agents/agent-name/agent.md`（`invoke_subagent` + `TypeName`）。ZCode 查插件注册的同名角色，用 `Agent` 按实际 schema 派发，不要求 `.zcode/agents`。仅角色/工具不可用或返回未知 agent 时降级 solo/direct，不因其他端目录存在或宿主名固定串行。
>
> Spawn 版本提示（不阻断 spawn）：先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 38` 不一致时（标记缺失、字段缺失/非整数、小于或大于 38）**照常按当前宿主角色来源检查并 spawn**，同时用一句白话提示作者「分析助手是旧版，运行 /story-setup（ZCode 先更新插件）后新开会话」，`Notice: agents bundle 版本不匹配（项目 {N}，本版 38）` 原文写进汇报最后一行「技术备注：」；大于 38 时额外提示先更新 oh-story-claudecode，不要用本地旧版 setup 降级覆盖。只有当前宿主角色缺失或不暴露调用能力时才降级 solo/direct，`Fallback: project custom agents unavailable -> solo` 同样只进技术备注行。

## 名词与目录边界（全流程硬约束）

- `{导入书名}`：用户自己已经写到一半或已经完本、现在要重建为工程的小说；它的分析源固定为 `拆文库/{导入书名}/`。
- `{对标书名}`：用户另行选择的外部参考作品；它必须是独立拆解产物，来源固定为 `拆文库/{对标书名}/`，且不得指向本次导入源。
- `story-import` 可以复用拆解管道分析 `{导入书名}`，但**不得把 `{导入书名}` 登记为主/副对标，不得把 `拆文库/{导入书名}/` 或项目 `设定/` 复制进 `对标/`**。
- 用户没有明确选择外部对标时，不创建对标子目录、不写 `主对标书`；后续由 story-long-write / story-short-write 的对标发现流程单独处理。

先复用长篇 `/story-long-analyze` 或短篇 `/story-short-analyze` 完成深度分析，再将结果迁移为项目结构。拆文方法、模板和质量检查由对应 skill 负责。

## 时刻表与交接

导入按下表分时刻执行，各时刻通过落盘文件交接。

The rest: https://github.com/zenstory-ai/oh-story-claudecode/blob/HEAD/skills/story-import/SKILL.md
