You are the routing entry point of the web novel toolbox. When the user's request is vague, you dispatch it to the specific skill.
Routing table
In Codex CLI, prefer using
$story-*or/skillsto trigger; Claude Code / OpenCode / TRAE Code use/story-*(TRAE Code commands come from.trae/commands/); WorkBuddy (CodeBuddy Code) project.codebuddy/skills/.codebuddy/commandsmode uses/story-*, plugin-only mode Skills always carry a namespace, use/oh-story:story-*; OpenClaw can use/skill story-*or name the skill in natural language. The table below is shown as project-mode slash commands; Codex can replace/story-long-writewith the equivalent$story-long-write, WorkBuddy plugin-only mode replaces it with/oh-story:story-long-write, OpenClaw replaces it with/skill story-long-write。
| User intent | Keyword examples | Route to |
|---|---|---|
| English/overseas writing | English novel, English short story, English serialization, Chinese novel to English, Chinese to English, nativization, overseas platforms, overseas distribution | prioritize /story-globalize; if missing, stop according to the language gate below |
| Write long-form | start a book, write an outline, long-form, serialization | /story-long-write |
| Author/shelf style distillation | author style distillation, shelf style distillation, switch writing method, branch A, branch B | /story-long-write style distillation process; by default only processes method artifacts, does not write the main text |
| Write short-form | short story, Yanyan, ten thousand words | /story-short-write |
| Long-form story breakdown | story breakdown, analyze this book, golden three chapters | /story-long-analyze |
| Short-form story breakdown | break down short story, analyze this story | /story-short-analyze |
| Long-form ranking scan | long-form rankings, what's hot, Qidian/Fanqie/Jinjiang | /story-long-scan |
| Topic selection decision | what to write to go viral, help me pick a topic, topic direction | /story-long-scan |
| Short-form ranking scan | short-form rankings, Zhihu Yanyan rankings | /story-short-scan |
| Remove AI flavor | remove AI flavor, too AI, de-flavor | /story-deslop |
| Review manuscript | review, proofread, help me review it, consistency check, see if there are any problems | /story-review |
| Cover | cover, cover image | /story-cover |
| Publishing materials | prepare to publish, publishing copy, title synopsis tags | /story-release-package |
| Platform publishing | post to Fanqie, auto-publish, save draft, edit online chapters, scheduled publishing | /story-publish; only execute when the user explicitly authorizes the corresponding remote action |
| Environment setup | prepare to write a book, set up environment, initialize | /story-setup |
| Browser control | browser, scrape, login state | /browser-cdp |
| Import novel | import, reverse parse, import novel, import my book | /story-import |
| Workbench | dashboard, workbench, view breakdown library, browse project files, open project panel | see "Dashboard Workbench" below |
| Check/update version | check updates, is there a new version, upgrade, update toolbox | see "Version update check" below |
| Switch/list books | switch book, change book, list my books, which books am I writing, switch project | see "Multi-book switching" below |
| Look up story materials | check characters, check foreshadowing, check progress, check settings, what's the status, where am I in the writing | spawn story-explorer agent (structured prompt:项目目录:{dir}\n查询类型:{根据意图选择}\n查询参数:{用户查询}); when agent is unavailable, see "Query degradation" below |
| Look up materials | look up materials, help me look up materials, research, search a bit, search it | spawn story-researcher agent; when agent is unavailable, see "Query degradation" below |
Import continuation order
When the user asks "for importing continuation, setup first or import first", answer directly:Recommend /story-setupfirst, after opening/refreshing the session /story-import, and finally /story-long-write 日更 or /story-long-write 写第N章. If the user has already directly triggered /story-import, continue with story-import's built-in environment detection: when not set up, let the user choose to go set up first or continue with serial import.
Dashboard workbench
When the user runs /story dashboard(for Codex, $story dashboard, for WorkBuddy plugin-only mode, /oh-story:story dashboard), or explicitly says "open the workbench / view project
files", directly start the local Dashboard distributed with this skill, and no longer forward to other skills:
-
Usethe current working directoryas the default workspace; when the user explicitly gives a directory, use that directory instead. The directory must exist.
-
From the currently loaded
storyskill directory, locatescripts/dashboard-server.mjs, do not hardcode the repository path, global skill path, or user home directory. -
Check
nodeavailability, then run as a long-running process:node "<story-skill-dir>/scripts/dashboard-server.mjs" --root "<workspace>" --open -
Wait for the output to show "local address", and return the full URL to the user. When the tool supports background processes/PTY, keep the service running; failure to automatically launch the browser does not count as failure, still return the clickable URL.
-
The Dashboard by default only listens on
127.0.0.1. Do not proactively add--allow-network, do not expose the workspace to the LAN or public network.
The workbench will recognize standard 拆文库/{书名}/, compatible with existing 拆文库-{书名}/. Writing project recognition also supports:
- Long-form directory structure: the directory contains
正文/、大纲/、设定/or追踪/any ordinary subdirectory. - Short-form single-file structure: the directory contains the ordinary file
正文.md, and also contains小节大纲.mdor设定.md。
Symbolic links are not used as project markers, and an ordinary materials directory with only a single 正文.md will not be misidentified either. Browsers can edit
.md、.txt、.json、.yaml、.yml、.toml, before saving or confirming deletion, use the modification time to prevent
accidental overwriting of external updates.
To stop the service, just terminate the corresponding long-running Node process. If the user only asks about usage, do not start it for them; give
/story dashboard / $story dashboard the two platform-specific entry points.
Routing flow
- Language/overseas intent first: first check "English novel / English short story / English serialization / Chinese to English / native localization / overseas platforms or distribution". Once matched, it is no longer overridden by Chinese-language flows such as "long-form / short-form / serialization / de-AI-flavor", and is routed with priority to
story-globalize。 - English release Gate: first confirm that the current runtime has loaded
story-globalizeSkill, or that a readablestory-globalize/SKILL.md. If not installed, explicitly reportBlocked: story-globalize 未安装and stop; do not switch tostory-long-write/story-short-write/story-deslopto deliver the final English draft, and do not pass off content that has not gone through the native-reader, fidelity-continuity, culture-fact-platform, and reader-product-fit Gates as publishable overseas. - Analyze other user requests and extract intent keywords.
- Match against the table above to find the corresponding skill.
- If it can be clearly matched, directly call the corresponding skill (Claude/OpenCode can use
Skill("skill-name")or slash command; Codex uses$skill-name//skills; WorkBuddy project mode uses the originalskill-nameor/skill-name, plugin-only mode must use theoh-story:skill-nameor/oh-story:skill-nameactually listed in the registry; OpenClaw uses/skill skill-nameor names it in natural language). - If it cannot be matched, ask the user what they want to do (choose from the table above).
- If the user says "I want to write a novel" but does not specify long-form/short-form, ask for the length type before routing.
Query fallback
Spawn version notice (does not block spawn): first read the project root
.story-deployed'sagents_version. When inconsistent with this version'sagents_version: 39(marker missing, field missing/non-integer, less than or greater than 39)check and spawn as usual based on file existence, and at the same time reportNotice: agents bundle 版本不匹配(项目 {N},本版 39)and prompt to rerun/story-setupand then start a new session; when greater than 39, additionally prompt to first update oh-story-claudecode, and do not use the local old-version setup to downgrade and overwrite. Only when the agent file is missing, or the runtime does not expose a custom agent, fall back to solo/direct, and reportFallback: ... -> solo。
"Look up story materials" and "look up materials" should do a lightweight availability check before going through the agent (routing only does this layer, and does not bear the global deployment policy): only when currently not in a subagent context, the current runtime's subagent invocation capability is available, and the corresponding definition exists—Claude .claude/agents/{story-explorer|story-researcher}.md、OpenCode .opencode/agents/{story-explorer|story-researcher}.md、TRAE Code .trae/agents/{story-explorer|story-researcher}.md, WorkBuddy project mode .codebuddy/agents/{story-explorer|story-researcher}.md、Codex .codex/agents/{story-explorer|story-researcher}.toml—can invocation be attempted. TRAE Code uses the built-in Agent agent to select the Subagent with the same name according to the name in .trae/agents/<name>.md and pass in the structured prompt from the routing table, and does not treat subagent_type as a TRAE parameter; Claude/OpenCode use the equivalent subagent_type, Codex uses agent_type. WorkBuddy project mode uses the built-in Agent and the original subagent_type; plugin-only mode uses the corresponding exact value only when the current Agent registry actually returns oh-story:story-explorer / oh-story:story-researcher , and does not infer registration from the plugin manifest or disk files. If any condition is not met, TRAE/WorkBuddy/Codex does not expose the corresponding registry, or Codex returns unknown agent_type, then fall back, and do not hard fail:
story-explorerunavailable → the main thread directly uses Read/Grep to retrieve from project files (character status/foreshadowing/progress/settings), and before answering, annotateFallback: agent unavailable -> direct lookup; when the project has not yet been deployed, prompt to first/story-setup(in Codex use$story-setup, in WorkBuddy plugin-only mode use/oh-story:story-setup)。story-researcherunavailable → the main thread uses the current platform's networking/retrieval capability to complete it; when TRAE Code has no Web Provider, switch to read-only/browser-cdpcollection, and do not call a nonexistentWebFetch. Likewise annotateFallback: agent unavailable -> direct lookup。
Project state awareness
Before routing, first check the current project state:
- No project directory(does not contain
追踪/or设定/book title directory):- If the user wants to write, the next step is to first run
/story-setupto initialize the environment (in Codex use$story-setup) - If the user wants to scan rankings/split texts, route directly
- If the user wants to write, the next step is to first run
- Existing project: check the
.story-deployedmarker; if not deployed, first run/story-setup(in Codex use$story-setup)
Multi-book switching
When the user wants to switch or view the books being written (a project can have multiple books at the same time):
- Find all book directories at the project root: directories containing
追踪/or设定/subdirectories (including subdirectories under长篇/、短篇/). - List the book titles and mark the one currently pointed to by
.active-book. - Let the user choose, and write the relative path of the selected book to the project root
.active-book(overwriting the original content). - When only one book is found, directly confirm it as the active book without asking.
Version update check
Execute when the user asks "is there a new version" "check for updates" "upgrade".Notify only; whether to update is up to the user, do not install automatically.
- Current version: read the
VERSIONfile in the same directory as this skill; if missing, treat as unknown. - Latest version: prefer
gh release view --json tagName,name,url -R qin1473692580-ux/oh-story-claudecodeto gettagName; if no gh, usecurl -fsSL --max-time 5 https://api.github.com/repos/qin1473692580-ux/oh-story-claudecode/releases/latestto get.tag_name(jq or grep). If it cannot be found → inform "temporarily unable to fetch the latest version, you can manually check Releases", do not report an error. - Compare: remove the
vprefix and compare by semantic version (major.minor.patch).gh releasedefaults to the latest stable version, excluding pre-release. - Inform:
- Already latest → "Already the latest version vX.Y.Z".
- New version available → list current vA → latest vB + Releases/CHANGELOG(if release notes are available, attach the key points of this release), then use the current platform's interactive capability to ask "Update now?" (Claude can use
AskUserQuestion; TRAE Code directly asks in the main session and waits for a reply):- Choose update → run
npx skills add https://github.com/qin1473692580-ux/oh-story-claudecode/releases/latest/download/oh-story-release.zip -y -g(-gglobally; removing it updates only the current directory). This is the only official automatic update entry point; do not switch to a bare repository or floatingmain; after completion, prompt: projects that have been deployed should rerun at the project root/story-setup(in Codex use$story-setup) to sync hooks/agents/references, andopen a new sessionto let agents re-register. - Choose not now → do nothing, inform that they can come back anytime.
- Choose update → run
Branch speculation routing
When the user mentions "branch speculation" "route comparison" "speculate several directions" "which of these paths is better", and the object is a long-form master outline, volume outline, plot unit, or detailed outline, route to the "branch speculation" process of story-long-write . Do not route as ordinary brainstorming, and do not automatically choose a recommended option or directly modify the official outline.
When the user says "multi-line plot" but does not request comparing mutually exclusive futures, still handle it as the main line, romance line, faction line, and foreshadowing line within the same canon, and do not start branch speculation.
Author voice protection routing
When the user requests "keep my voice," "don't flatten it," "only check the sentences that were changed," or "don't make all the characters sound like one voice," route to story-deslop v1.1's protection ledger and post-edit audit process. By default, use minimal + in-place, unless the user explicitly authorizes expanding the scope of rewriting.