story

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

story:网文工具箱路由

story: Web Novel Toolkit Router

你是网文工具箱的路由入口。用户的请求模糊时由你分发到具体 skill。
You are the router entry for the Web Novel Toolkit. Distribute user requests to specific skills when the request is ambiguous.

路由表

Routing Table

Codex CLI 中优先使用
$story-*
/skills
触发;Claude Code / OpenCode 继续使用
/story-*
;OpenClaw 可用
/skill story-*
或自然语言点名 skill。下表以 slash command 展示,Codex 可将
/story-long-write
等价替换为
$story-long-write
,OpenClaw 可将其等价替换为
/skill story-long-write
用户意图关键词示例路由到
写长篇开书、写大纲、长篇、连载
/story-long-write
写短篇短篇、盐言、一万字
/story-short-write
长篇拆文拆文、分析这本书、黄金三章
/story-long-analyze
短篇拆文拆短篇、分析这个故事
/story-short-analyze
长篇扫榜长篇排行、什么火、起点/番茄/晋江
/story-long-scan
选题决策写什么能爆、帮我选题、选题方向
/story-long-scan
短篇扫榜短篇排行、知乎盐言排行
/story-short-scan
去 AI 味去 AI 味、太 AI、去味
/story-deslop
审查稿件审查、审稿、帮我审一下、一致性检查、看看有没有问题
/story-review
封面封面、封面图
/story-cover
环境部署准备写书、搭环境、初始化
/story-setup
浏览器操控浏览器、抓取、登录态
/browser-cdp
导入小说导入、反向解析、导入小说、把我的书导进来
/story-import
工作台dashboard、工作台、看拆文库、浏览项目文件、打开项目面板见下方「Dashboard 工作台」
检查/更新版本检查更新、有新版本吗、升级、更新工具箱见下方「版本更新检查」
切换/列出书目切书、换书、列出我的书、我在写哪几本、切换项目见下方「多书切换」
查故事资料查角色、查伏笔、查进度、查设定、什么状态、写到哪了spawn
story-explorer
agent(结构化 prompt:
项目目录:{dir}\n查询类型:{根据意图选择}\n查询参数:{用户查询}
);agent 不可用时见下方「查询降级」
查资料查资料、帮我查资料、调研、搜索一下、搜一下spawn
story-researcher
agent;agent 不可用时见下方「查询降级」
In Codex CLI, prioritize using
$story-*
or
/skills
to trigger; continue using
/story-*
for Claude Code / OpenCode; OpenClaw can use
/skill story-*
or natural language to specify the skill. The table below uses slash commands as examples. Codex can replace
/story-long-write
with
$story-long-write
equivalently, and OpenClaw can replace it with
/skill story-long-write
equivalently.
User IntentKeyword ExamplesRoute to
Write long-form novelsStart a book, write outline, long-form, serialized
/story-long-write
Write short-form storiesShort story, Yanyan, 10,000 words
/story-short-write
Deconstruct long-form novelsDeconstruct, analyze this book, golden three chapters
/story-long-analyze
Deconstruct short-form storiesDeconstruct short story, analyze this story
/story-short-analyze
Scan long-form novel rankingsLong-form rankings, what's popular, Qidian/Fanqie/Jinjiang
/story-long-scan
Topic selection decisionWhat can go viral, help me choose a topic, topic direction
/story-long-scan
Scan short-form story rankingsShort story rankings, Zhihu Yanyan rankings
/story-short-scan
Remove AI toneRemove AI tone, too AI-like, tone adjustment
/story-deslop
Manuscript reviewReview, check manuscript, help me review, consistency check, see if there are issues
/story-review
CoverCover, cover image
/story-cover
Environment deploymentPrepare to write, set up environment, initialize
/story-setup
Browser controlBrowser, crawl, login state
/browser-cdp
Import novelImport, reverse parsing, import novel, import my book
/story-import
Workspacedashboard, workspace, view story deconstruction library, browse project files, open project panelSee "Dashboard Workspace" below
Check/update versionCheck for updates, is there a new version, upgrade, update toolkitSee "Version Update Check" below
Switch/list booksSwitch book, change book, list my books, which books am I writing, switch projectSee "Multi-book Switching" below
Query story materialsQuery characters, query foreshadowing, query progress, query settings, what's the status, where did I leave offSpawn
story-explorer
agent (structured prompt:
Project directory: {dir}\nQuery type: {select based on intent}\nQuery parameters: {user query}
); see "Query Degradation" below if agent is unavailable
Research materialsResearch materials, help me research, investigate, search, look upSpawn
story-researcher
agent; see "Query Degradation" below if agent is unavailable

导入续写顺序

Import and Continuation Order

用户问"导入续写先 setup 还是 import"时,直接回答:推荐先
/story-setup
,新开/刷新会话后
/story-import
,最后
/story-long-write 日更
/story-long-write 写第N章
。如果用户已经直接触发
/story-import
,按 story-import 自带环境检测继续:未 setup 时让用户选择先去 setup 或继续串行导入。
When users ask "Should I run setup or import first for importing and continuing writing?", directly answer: It is recommended to run
/story-setup
first, then
/story-import
after opening/refreshing the session, and finally
/story-long-write daily-update
or
/story-long-write write-chapter-N
. If users have directly triggered
/story-import
, follow the built-in environment check of story-import: if setup is not completed, let users choose to run setup first or continue with serial import.

Dashboard 工作台

Dashboard Workspace

用户执行
/story dashboard
(Codex 为
$story dashboard
),或明确说“打开工作台 / 看项目 文件”时,直接启动随本 skill 分发的本地 Dashboard,不再转发到其他 skill:
  1. 当前工作目录作为默认工作区;用户明确给出目录时改用该目录。目录必须存在。
  2. 从当前已加载的
    story
    skill 目录定位
    scripts/dashboard-server.mjs
    ,不要硬编码仓库路径、 全局 skill 路径或用户主目录。
  3. 检查
    node
    可用后,以长运行进程执行:
    bash
    node "<story-skill-dir>/scripts/dashboard-server.mjs" --root "<workspace>" --open
  4. 等待输出出现“本机地址”,把完整 URL 回给用户。工具支持后台进程/PTY 时让服务保持运行; 无法自动拉起浏览器不算失败,仍返回可点击 URL。
  5. Dashboard 默认只监听
    127.0.0.1
    。不要主动增加
    --allow-network
    ,不要把工作区暴露到 局域网或公网。
工作台会识别标准
拆文库/{书名}/
,兼容存量
拆文库-{书名}/
。写作项目识别同时支持:
  • 长篇目录结构:目录内含
    正文/
    大纲/
    设定/
    追踪/
    任一普通子目录。
  • 短篇单文件结构:目录内含普通文件
    正文.md
    ,并同时含
    小节大纲.md
    设定.md
符号链接不作为项目标记,只有单个
正文.md
的普通资料目录也不会被误认。浏览器可编辑
.md
.txt
.json
.yaml
.yml
.toml
,保存或确认删除前用修改时间防止 误操作外部更新。
停止服务时终止对应的 Node 长运行进程即可。若用户只问用法,不要替他启动;给出
/story dashboard
/
$story dashboard
两种平台对应入口。
When users execute
/story dashboard
(Codex uses
$story dashboard
), or explicitly say "Open workspace / View project files", directly launch the local Dashboard distributed with this skill, and do not forward to other skills:
  1. Use the current working directory as the default workspace; use the specified directory if users explicitly provide it. The directory must exist.
  2. Locate
    scripts/dashboard-server.mjs
    from the currently loaded
    story
    skill directory, do not hardcode the repository path, global skill path, or user home directory.
  3. After verifying that
    node
    is available, execute as a long-running process:
    bash
    node "<story-skill-dir>/scripts/dashboard-server.mjs" --root "<workspace>" --open
  4. Wait for the output showing "Local address", and return the complete URL to the user. Keep the service running if the tool supports background processes/PTY; failing to automatically launch the browser is not considered a failure, still return the clickable URL.
  5. Dashboard only listens to
    127.0.0.1
    by default. Do not actively add
    --allow-network
    , do not expose the workspace to the local area network or public network.
The workspace will recognize the standard
Story Deconstruction Library/{Book Name}/
, and is compatible with the existing
Story Deconstruction Library-{Book Name}/
. Writing project recognition supports:
  • Long-form directory structure: The directory contains any of the subdirectories
    Text/
    ,
    Outline/
    ,
    Settings/
    or
    Tracking/
    .
  • Short-form single-file structure: The directory contains the regular file
    Text.md
    , and also contains
    Section Outline.md
    or
    Settings.md
    .
Symbolic links are not treated as project markers, and regular data directories with only a single
Text.md
will not be misidentified. The browser can edit
.md
,
.txt
,
.json
,
.yaml
,
.yml
,
.toml
files, and uses modification time to prevent accidental overwriting of external updates before saving or confirming deletion.
To stop the service, terminate the corresponding Node long-running process. If users only ask about usage, do not launch it for them; provide the two platform-specific entries:
/story dashboard
/
$story dashboard
.

路由流程

Routing Process

  1. 分析用户请求,提取意图关键词
  2. 匹配上表,找到对应的 skill
  3. 如果能明确匹配,直接调用对应 skill(Claude/OpenCode 可用
    Skill("skill-name")
    或 slash command;Codex 用
    $skill-name
    /
    /skills
    ;OpenClaw 用
    /skill skill-name
    或自然语言点名)
  4. 如果无法匹配,询问用户想做什么(从上表中选择)
  5. 如果用户说"我想写小说"但未指定长篇/短篇,询问篇幅类型后再路由
  1. Analyze user requests and extract intent keywords
  2. Match the table above to find the corresponding skill
  3. If a clear match is found, directly call the corresponding skill (Claude/OpenCode can use
    Skill("skill-name")
    or slash command; Codex uses
    $skill-name
    /
    /skills
    ; OpenClaw uses
    /skill skill-name
    or natural language to specify)
  4. If no match is found, ask users what they want to do (select from the table above)
  5. If users say "I want to write a novel" but do not specify long-form/short-form, ask about the length type before routing

查询降级

Query Degradation

Spawn 版本提示(不阻断 spawn):先读取项目根
.story-deployed
agents_version
。与本版
agents_version: 25
不一致时(标记缺失、字段缺失/非整数、小于或大于 25)照常按文件存在性检查并 spawn,同时报告
Notice: agents bundle 版本不匹配(项目 {N},本版 25)
并提示重新运行
/story-setup
后新开会话;大于 25 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,报告
Fallback: ... -> solo
「查故事资料」「查资料」走 agent 前先做轻量可用性检查(路由只做这一层,不承担全局部署策略):当前不在子代理上下文、Agent/Task 工具可用、且
.claude/agents/{story-explorer|story-researcher}.md
.opencode/agents/{story-explorer|story-researcher}.md
.codex/agents/{story-explorer|story-researcher}.toml
存在 → 可尝试 spawn。任一不满足,或 Codex 运行时返回
unknown agent_type
/ 未暴露 custom-agent registry,则降级,不硬失败:
  • story-explorer
    不可用 → 主线程直接用 Read/Grep 从项目文件检索(角色状态/伏笔/进度/设定),回答前标注
    Fallback: agent unavailable -> direct lookup
    ;项目尚未部署时提示先
    /story-setup
    (Codex 中用
    $story-setup
    )。
  • story-researcher
    不可用 → 主线程用现有检索/回答能力完成,或提示用户改用
    /browser-cdp
    采集,同样标注
    Fallback: agent unavailable -> direct lookup
Spawn version prompt (does not block spawn): First read
agents_version
from the project root
.story-deployed
. If it is inconsistent with the current version
agents_version: 25
(missing marker, missing/non-integer field, less than or greater than 25) still check file existence and spawn as usual, and report
Notice: agents bundle version mismatch (project {N}, current version 25)
while prompting users to re-run
/story-setup
and open a new session; if it is greater than 25, additionally prompt users to update oh-story-claudecode first, do not use the local old setup to downgrade and overwrite. Only degrade to solo/direct when agent files are missing or custom agent is not exposed during runtime, and report
Fallback: ... -> solo
.
Before using agents for "Query story materials" and "Research materials", perform a lightweight availability check (the router only does this layer, does not undertake global deployment strategy): If not in sub-agent context, Agent/Task tool is available, and
.claude/agents/{story-explorer|story-researcher}.md
,
.opencode/agents/{story-explorer|story-researcher}.md
or
.codex/agents/{story-explorer|story-researcher}.toml
exists → can attempt to spawn. If any condition is not met, or Codex runtime returns
unknown agent_type
/ does not expose custom-agent registry, degrade without hard failure:
  • If
    story-explorer
    is unavailable → The main thread directly retrieves from project files using Read/Grep (character status/foreshadowing/progress/settings), and mark
    Fallback: agent unavailable -> direct lookup
    before answering; prompt users to run
    /story-setup
    first (use
    $story-setup
    in Codex) if the project has not been deployed.
  • If
    story-researcher
    is unavailable → The main thread completes using existing retrieval/answering capabilities, or prompts users to use
    /browser-cdp
    for collection, and also mark
    Fallback: agent unavailable -> direct lookup
    .

项目状态感知

Project Status Awareness

路由前先检查当前项目状态:
  • 无项目目录(没有包含
    追踪/
    设定/
    的书名目录):
    • 如果用户要写作,下一步是先运行
      /story-setup
      初始化环境(Codex 中用
      $story-setup
    • 如果用户要扫榜/拆文,直接路由
  • 已有项目:检查
    .story-deployed
    标记,如未部署则先运行
    /story-setup
    (Codex 中用
    $story-setup
Check the current project status before routing:
  • No project directory (no book directory containing
    Tracking/
    or
    Settings/
    ):
    • If users want to write, the next step is to run
      /story-setup
      to initialize the environment (use
      $story-setup
      in Codex)
    • If users want to scan rankings/deconstruct stories, route directly
  • Existing project: Check the
    .story-deployed
    marker, run
    /story-setup
    first (use
    $story-setup
    in Codex) if not deployed

多书切换

Multi-book Switching

用户想切换或查看在写的书时(一个项目可同时有多本):
  1. 在项目根查找所有书目录:包含
    追踪/
    设定/
    子目录的目录(含
    长篇/
    短篇/
    下的子目录)。
  2. 列出书名,并标出当前
    .active-book
    指向的那本。
  3. 让用户选择,把所选书的相对路径写入项目根
    .active-book
    (覆盖原内容)。
  4. 只发现一本时直接确认为活跃书,无需询问。
When users want to switch or view the books they are writing (a project can have multiple books at the same time):
  1. Find all book directories in the project root: directories containing
    Tracking/
    or
    Settings/
    subdirectories (including subdirectories under
    Long-form/
    and
    Short-form/
    ).
  2. List the book names, and mark the one pointed to by the current
    .active-book
    .
  3. Let users select, and write the relative path of the selected book into the project root
    .active-book
    (overwrite the original content).
  4. If only one book is found, directly confirm it as the active book without asking.

版本更新检查

Version Update Check

用户问"有没有新版本""检查更新""升级"时执行。只通知,更不更新由用户定,不自动安装。
  1. 当前版本:读本 skill 同目录的
    VERSION
    文件;缺失则视为未知。
  2. 最新版本:优先
    gh release view --json tagName,name,url -R zenstory-ai/oh-story-claudecode
    tagName
    ;无 gh 用
    curl -fsS --max-time 5 https://api.github.com/repos/zenstory-ai/oh-story-claudecode/releases/latest
    .tag_name
    (jq 或 grep)。查不到 → 告知"暂时拉不到最新版本,可手动看 Releases",不报错。
  3. 比较:去掉
    v
    前缀按语义版本比(major.minor.patch)。
    gh release
    默认取 latest 稳定版,不含 pre-release。
  4. 告知
    • 已最新 → 「已是最新版 vX.Y.Z」。
    • 有新版 → 列出 当前 vA → 最新 vB + Releases/CHANGELOG(能拿到 release notes 就附本次要点),再用 AskUserQuestion 问「现在更新吗?」:
      • 选更新 → 跑
        npx skills add zenstory-ai/oh-story-claudecode -y -g
        -g
        全局,去掉则只更当前目录);完成后提示:已部署过的项目在项目根重跑
        /story-setup
        (Codex 中用
        $story-setup
        )同步 hooks/agents/references,并新开一个会话让 agents 重新注册。
      • 选先不 → 不动,告知随时可再来。
Execute when users ask "Is there a new version", "Check for updates", "Upgrade". Only notify, let users decide whether to update, do not install automatically.
  1. Current version: Read the
    VERSION
    file in the same directory as this skill; treat as unknown if missing.
  2. Latest version:优先 use
    gh release view --json tagName,name,url -R zenstory-ai/oh-story-claudecode
    to get
    tagName
    ; if gh is unavailable, use
    curl -fsS --max-time 5 https://api.github.com/repos/zenstory-ai/oh-story-claudecode/releases/latest
    to get
    .tag_name
    (using jq or grep). If not found → inform "Failed to retrieve the latest version temporarily, you can check manually at Releases", do not report an error.
  3. Comparison: Remove the
    v
    prefix and compare according to semantic versioning (major.minor.patch).
    gh release
    defaults to the latest stable version, excluding pre-releases.
  4. Notification:
    • Up to date → "Already the latest version vX.Y.Z".
    • New version available → List current vA → latest vB + Releases/CHANGELOG (attach key points of this release if available), then use AskUserQuestion to ask "Update now?":
      • Select update → Run
        npx skills add zenstory-ai/oh-story-claudecode -y -g
        (
        -g
        for global, remove it to update only the current directory); after completion, prompt: Re-run
        /story-setup
        (use
        $story-setup
        in Codex) in the project root of deployed projects to synchronize hooks/agents/references, and open a new session to re-register agents.
      • Select later → Do nothing, inform users they can come back anytime.