Skip to content
Content
Skill

/story-setup

网文写作工具集基础设施部署与检查。为 Claude Code / OpenCode / Codex / Google Antigravity / ZCode / OpenClaw / Reasonix 提供内置适配;Web AI / 通用 Agent 可走 skills + AGENTS.md 文件模式。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」「检查写作环境」。

From plugin
oh-story
6.9k13 skills
Install
$ npx -y skills add worldwonderer/oh-story-claudecode --skill story-setup --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/story-setup

Context preview

The summary Claude sees to decide when to auto-load this skill.

网文写作工具集基础设施部署与检查。为 Claude Code / OpenCode / Codex / Google Antigravity / ZCode / OpenClaw / Reasonix 提供内置适配;Web AI / 通用 Agent 可走 skills + AGENTS.md 文件模式。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」「检查写作环境」。

SKILL.md

story-setup.SKILL.md
name: story-setup
version: 1.2.10
description: "网文写作工具集基础设施部署与检查。为 Claude Code / OpenCode / Codex / Google Antigravity / ZCode / OpenClaw / Reasonix 提供内置适配;Web AI / 通用 Agent 可走 skills + AGENTS.md 文件模式。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」「检查写作环境」。"
metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudecode"}}

story-setup:网文写作工具集基础设施部署

你是写作基础设施部署器。将网文写作工具集部署到用户项目目录:已适配的 CLI 走专用 hooks/agents/config;NarraFork、Web AI、自定义 Agent 等环境走通用文件模式。

**执行铁律:不覆盖用户已有配置,合并而非替换。**

选择模式

  • 参数为 `check`,或用户只要求检查部署、诊断环境、排查 agent 不可用时:完整读取 [references/diagnostics.md](references/diagnostics.md),按其中流程仅检查并报告;不进入下面的部署流程。
  • 用户要求安装、更新或修复时:执行下面的部署流程。检查后已明确授权的修复沿用本文件的部署与合并规则。

---

Phase 1:检测项目状态

**先自检参考目录**:以正在执行的本 `SKILL.md` 所在目录为准,列出与它同级的 `references/` 下的子目录,核对下面 9 个名字是否都在**且都非空**——`agent-references`、`templates`、`opencode`、`codex`、`antigravity`、`zcode`、`openclaw`、`reasonix`、`generic`;同级 `scripts/merge-claude-settings.py`、`scripts/merge-codex-hooks.py`、`scripts/merge-antigravity-hooks.py`、`scripts/generate-antigravity-agents.mjs`、`scripts/deploy-antigravity-skills.py` 与 `scripts/copy-path-safety.py` 也必须存在(Claude/Codex/Antigravity hooks 合并、Antigravity Skills 物化与 agent 生成、递归复制安全检查依赖它们)。有缺即 skill 包没装全,**立即停止,不写任何部署文件**,报告里区分「缺目录」「目录为空」和「缺脚本」,并给修复指令:「story-setup 参考资料包不完整,缺 {路径}。按你的安装方式重装 oh-story-claudecode(命令行装的重跑 `npx skills add zenstory-ai/oh-story-claudecode -y -g`,marketplace / Plugin Management 装的在面板里重装),再执行 /story-setup。」

> 判据是「有没有 `SKILL.md`」:只看正在执行的 `SKILL.md` 同级的 `references/`。项目内 `.claude/skills/story-setup/`、`.codex/skills/story-setup/` 和 OpenCode 的 `skills/story-setup/` 只有 `references/agent-references/`、不含 `SKILL.md`,不会是执行目录,也不要拿它们核对。Antigravity / ZCode / OpenClaw / Reasonix / generic 的项目副本是整份 skill 拷贝、自带 `SKILL.md`,9 个子目录本就齐全,照常核对即可。

1. 检查当前目录是否已部署过(存在 `.story-deployed`)

  • `agents_version` 缺失、非整数或小于 `30` → 标记为待更新,继续执行当前部署
  • `agents_version: 30` → 使用 AskUserQuestion 确认是否重新部署;提示里写明重新部署只用**当前本地 skill 包**刷新项目文件,要拿 skill 本身的新版本得先更新 oh-story-claudecode(`npx skills add` 或 marketplace),再回来重跑
  • `agents_version` 大于 `30` → 当前 story-setup 比项目部署旧;停止以避免降级覆盖,提示先更新 oh-story-claudecode,不写任何部署文件
  • 同时读 `target_cli` 字段。**已部署项目以 sentinel 里的值为准**:非空时(逗号分隔的多端组合原样保留)跳过下面第 5-12 步的环境探测与选择,直接按这些端重新部署。只有字段缺失或为空,才回落到探测。用户明确要求增删目标端时,用 AskUserQuestion 在现有值基础上改,改完的值写回 sentinel。

2. 检查是否有书名目录(包含 `追踪/` 子目录的目录,或用户自定义结构)

  • 有 → 识别为长篇项目,显示当前项目信息
  • 无 → 识别为新项目或短篇项目

3. 检查 `.claude/settings.local.json` 是否存在

  • 存在 → 读取现有配置,后续合并
  • 不存在 → 后续创建新文件

4. 检查 `.active-book` 文件是否存在

  • 存在 → 显示当前活跃书目
  • 不存在 → 跳过

5. 检查 `opencode.json` 或 `.opencode/` 是否存在

  • 存在 → 识别为 opencode 项目,`target_cli = opencode`
  • 不存在 → 跳过

6. 检查 `.codex/`、`.codex/config.toml`、`.codex/agents/`、`.codex/hooks.json`、`AGENTS.md` 中的 Codex 段

  • 存在 → 识别为 Codex 项目,`target_cli = codex`
  • 不存在 → 跳过

7. 检查 `.agents/hooks.json`、`.agents/agents/`,或 `.agents/rules/oh-story.md` 中的 Antigravity 标记

  • 存在 → 识别为 Google Antigravity 项目,`target_cli = antigravity`
  • 不存在 → 跳过

8. 检查 `.zcode/`、`.zcode/config.json`、`zcode.json`、`.zcode/skills/`、`.zcode/commands/`、`AGENTS.md` 中的 ZCode 段

  • 存在 → 识别为 ZCode 项目,`target_cli = zcode`
  • 不存在 → 跳过

9. 检查 `openclaw.json`、`.openclaw/`,或 `AGENTS.md` 中的 OpenClaw 段(标题行含 `网文写作工具集(OpenClaw)`)

  • 存在 → 识别为 OpenClaw 项目,`target_cli = openclaw`
  • 不存在 → 跳过

10. 检查 `.reasonix/`、`reasonix-plugin.json`、`REASONIX.md`,或 `AGENTS.md` 中的 Reasonix 段(标题行含 `网文写作工具集(Reasonix)`)

  • 存在 → 识别为 Reasonix 项目,`target_cli = reasonix`
  • 不存在 → 跳过

11. 检查 `AGENTS.md` 中的通用段(标题行含 `网文写作工具集(通用 Agent / Web AI)`)

  • 存在 → 识别为通用 Web AI 项目,`target_cli = generic`
  • 不存在 → 跳过

> 第 9-11 步只认各端**互斥**的标记。`skills/*/SKILL.md` 的 `metadata.openclaw` 不作 OpenClaw 信号:13 个 skill 全都带这个字段,而 OpenClaw / Reasonix / generic 三条 skills-only 路径部署出的 `skills/` 长得一样,用它判定会把后两者一律误认成 OpenClaw。`.agents/skills/` 由 Antigravity、Codex 与 Reasonix 共用,也不单独作准;Antigravity 必须由 hooks/agents/rule 专属标记识别。后三端真正的分辨点是各自 `AGENTS.md` 模板的标题行。

12. 如 `.claude/` 或 `CLAUDE.md`、OpenCode、Codex、Antigravity、ZCode、OpenClaw、Reasonix、generic 标记同时存在 → 使用 AskUserQuestion 让用户选择目标环境(选项:Claude Code / OpenCode / Codex / Google Antigravity / ZCode / OpenClaw / Reasonix / 通用 Web AI 或其他 Agent / 任意组合) 13. 如八类标记都不存在(全新项目)→ 使用 AskUserQuestion 让用户选择目标环境

  • 用户选择 opencode → `target_cli = opencode`,部署时创建 `opencode.json` 和 `.opencode/`
  • 用户选择 claude-code → 按现有逻辑处理
  • 用户选择 codex → `target_cli = codex`,部署时创建 `.codex/`
  • 用户选择 antigravity → `target_cli = antigravity`,部署时创建 `.agents/skills`、`.agents/agents`、`.agents/rules`、`.agents/hooks` 并合并 `.agents/hooks.json`
  • 用户选择 zcode → `target_cli = zcode`,部署时创建 `.zcode/`、合并根 `AGENTS.md`,不创建项目 custom agents
  • 用户选择 openclaw → `target_cli = openclaw`,部署时复制 OpenClaw 兼容 skills 到项目 `skills/`
  • 用户选择 reasonix → `target_cli = reasonix`,部署时复制 skills 到项目 `skills/`、写入 Reasonix 版 `AGENTS.md`,不创建项目 custom agents/hooks
  • 用户选择通用 Web AI / 其他 Agent → `target_cli = generic`,部署通用 `AGENTS.md` 与项目本地 `skills/`;不写平台专属 hooks/agents
  • 用户选择多端 → `target_cli = claude-code,opencode,codex,antigravity,zcode,openclaw,reasonix,generic` 的子集(仅包含用户选择的端)

Phase 2:部署基础设施

使用 AskUserQuestion 确认部署位置后,依次执行。

整个 Phase 2 幂等:目录复制、文件写入和下表各合并算法重复执行结果一致。因环境原因(工具不可用、权限被拒、网络失败)中途失败时,直接从头重跑本 Phase,不需要先清理半成品;`create only if absent` 的用户状态文件(见下表 Owner class)不会被二次覆盖。

**两列基准目录不同**:`Source path` 相对正在执行的这份 skill 包,`Target path` 相对用户项目根。执行每一行(以及下面各端部署算法里的每个递归复制步骤)之前,先把通配符具体化为单个源/目标,再用本 `SKILL.md` 同级的 `scripts/copy-path-safety.py` 检查。该脚本按 `Path.resolve` / `realpath` 语义跟随已有 symlink,并在两侧都存在时用 `samefile` 核对文件系统对象;**只转绝对路径或比较字符串不算检查完成**。读取其 JSON:`status: same` 时 no-op,禁止复制;仅 `copy_allowed: true` 时可以复制;`source_missing`、`unsafe_target_within_source` 或 `filesystem_identity_error` 必须停止该步骤并报告。无法运行脚本时只能用当前环境的文件系统 API 做完全相同的 canonical realpath、same-object 与 target-descendant 检查;无法确认就停止,不得尝试复制。OpenClaw / Reasonix / generic 的项目副本是整份 skill 拷贝,重跑时执行的就是项目里那份;Reasonix / Codex 还可能经 `.agents/skills → ../skills` symlink 加载,路径文本不同也可能指向同一目录,照字面复制会把目录嵌进自身并撑满磁盘。

**部署前清理自嵌套残留**:`{.claude,.codex,

Read more
Ships withoh-story

网文写作 skill 包,覆盖长篇与短篇网络小说的扫榜、拆文、写作、去AI味、封面图全流程。内置适配 Claude Code、Google Antigravity、OpenCode、ZCode、OpenClaw、Codex CLI、Reasonix;能读取项目文件的 Web AI / Agent 环境也可按通用 skills 路径使用。 Oh Story is an open-source skill pack that turns coding agents — Claude Code, Codex CLI,

Get the whole plugin
Stats
6,889
Stars
980
Forks
Active
Maintenance
JavaScript
Language
MIT
License
1d ago
Last commit
4mo ago
Created

Repo: worldwonderer/oh-story-claudecode

Other skills on oh-story.

story-cover
Skill

story-cover

小说封面生成。根据书名、作者名自动分析题材风格,调用 GPT-Image-2 生成含标题和署名的专业级网文封面;Codex CLI 优先使用内置 ImageGen,无需单独 API Key。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「做个小说封面」「封面设计」。

story-import
Skill

story-import

逆向导入已有小说。将已写好的小说(半成品或完本)反向解析为标准项目目录结构,兼容 story-long-write / story-short-write 后续写作流程;内部复用 story-long-analyze / story-short-analyze…

story-long-analyze
Skill

story-long-analyze

长篇网文拆文。深度拆解爆款长篇小说的黄金三章、人设架构、爽点设计、节奏控制。单一深度拆解管道:跑完黄金三章(Stage 1)后产出快速预览报告并询问是否继续全量拆解,确认后从 Stage 2 续跑逐章摘要、聚合分析、设定关系、汇总报告,全程产物落盘…