You are the routing entry point for the web novel toolbox. When the user's request is ambiguous, you dispatch it to the specific skill.
Routing table
In Codex CLI, prefer using
$story-*or/skillsto trigger; Claude Code / OpenCode continues to use/story-*; Antigravity can select in/skillsor name it in natural language; OpenClaw can use/skill story-*or name the skill in natural language. The table below is shown as slash commands; Codex can equivalently replace/story-long-writewith$story-long-write, and OpenClaw can equivalently replace it with/skill story-long-write。
| User intent | Keyword examples | Route to |
|---|---|---|
| Long-form planning/writing | Discuss long-form structure, plan plot, start a book, write outline, add detailed outline, long-form, serialization | /story-long-write |
| Write short stories | Short story, Yanyan, ten thousand words | /story-short-write |
| Long-form story breakdown | Breakdown, analyze this book, golden three chapters, inspiration library, cross-book inspiration aggregation | /story-long-analyze |
| Short story breakdown | Break down short stories, analyze this story | /story-short-analyze |
| Long-form ranking scan | Long-form rankings, what's hot, what new books are emerging, Qidian/Fanqie/Jinjiang/Qimao long-form | /story-long-scan |
| Topic decision | What to write to go viral, help me choose a topic, topic direction | /story-long-scan |
| Short story ranking scan | Short story rankings, Zhihu Yanyan rankings | /story-short-scan |
| Remove AI flavor | Remove AI flavor, too AI, de-flavor | /story-deslop |
| Review manuscript | Review, manuscript review, help me review it, consistency check, see if there are any problems | /story-review |
| Cover | Cover, cover image | /story-cover |
| Environment deployment | Prepare to write a book, set up environment, initialize | /story-setup |
| Browser control | Browser, scrape, login state | /browser-cdp |
| Import novel | Import, reverse parsing, 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 for 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 ones am I writing, switch project | See "Multi-book Switching" below |
| Manage author habits | Remember my writing habits, author profile, preferences pending confirmation, forget this preference | See "Author Memory" below |
| Look up story information | Look up characters, look up foreshadowing, look up progress, look up settings, what status, where has it been written | spawn story-explorer agent (structured prompt:项目目录:{dir}\n查询类型:{根据意图选择}\n查询参数:{用户查询}); when the agent is unavailable, see "Query Fallback" below |
| Look up information | look up information, help me look up information, research, search, search it | spawn story-researcher agent; if the agent is unavailable, see "Query fallback" below |
Bare invocation and newcomers
When only /storyis said and the intent is unclear, do not paste the routing table; give four plain-language options: "Start a long-form work or continue writing" → /story-long-write; "Write a short story" → /story-short-write; "Make a chapter less AI-sounding" → /story-deslop; "More (book breakdown, ranking scan, import old drafts, manuscript review, cover)" → then list the advanced options. If it has not been deployed yet (no .story-deployedin the project root), first suggest /story-setup。
Import and continue-writing order
When the user asks "for import and continue-writing, should I setup first or import first", answer directly:Recommend /story-setupfirst, then after starting/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 according to story-import's built-in environment detection: when not yet set up, let the user choose whether to go set up first or continue with serial import.
Author memory
When the user asks to remember, view, confirm, replace, or forget author habits, load references/author-memory.md, and use only this skill's scripts/author_memory_commit.py to manage the two levels of .story/作者记忆/: global, genre, and workflow entries in the workspace (AP), and this book's entries in the book directory (BP, pass --book-root). Common changes go through the single event record; before the tool returns ok: true and Author Memory Receipt , you must not claim it has been remembered. When telling the author, first say in one plain sentence what was remembered (e.g. "Remembered: this book's dialogue always uses 「」"), and put the receipt on the last line; for how to write it, see the protocol "How to tell the author the receipt". Displaying the profile or pending-confirmation items is a read-only operation; if none exists, directly state that it has not been established yet.
New habits must preserve the user's original words and scope of application. One-off requests are only executed, not recorded; novel facts are written into this book's settings/tracking; do not infer preferences from repeated revisions or finished drafts, only record what the author explicitly says, and only enter pending confirmation when the scope of the original words is ambiguous; when conflicting with an already-effective habit, explicitly replace, and do not rewrite history in place. Load migrate --book-rootagain when the author says "organize author memory", when the receipt indicates too many habits have accumulated, when the tool reports a single-book layout error, or when there are still "this book:" entries in the project-level profile (recommended to run references/author-memory-maintenance.mdfor that book). When the user has not specified a workspace, locate the nearest ancestor with existing author memory or the current writing workspace according to the protocol; it is forbidden to default to writing to the user's home directory.
Dashboard workbench
When the user runs /story dashboard(for Codex, $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; if 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 hard-code the repository path, global skill path, or user home directory. -
After checking that
nodeis available, execute as a long-running process:node "<story-skill-dir>/scripts/dashboard-server.mjs" --root "<workspace>" --open -
Wait for the output to show "local address", then return the full URL to the user. When the tool supports background processes/PTY, keep the service running; being unable to automatically launch the browser does not count as failure, still return a clickable URL.
-
By default, Dashboard only listens on
127.0.0.1. Do not proactively add--allow-network, and do not expose the workspace to the LAN or the public internet.
The workbench will recognize standard 拆文库/{书名}/, and is compatible with existing 拆文库-{书名}/. Writing project recognition also supports:
- Long-form directory structure: the directory contains
正文/、大纲/、设定/or追踪/any one ordinary subdirectory. - Short-form single-file structure: the directory contains an ordinary file
正文.md, and also contains小节大纲.mdor设定.md。
. Symbolic links are not used as project markers, and only a single 正文.md ordinary material directory will not be misrecognized either. Browsers can edit
.md、.txt、.json、.yaml、.yml、.toml, and before saving or confirming deletion, use the modification time to prevent
accidental operations on external updates.
When stopping the service, just terminate the corresponding long-running Node process. If the user only asks about usage, do not start it for them; give the
/story dashboard / $story dashboard two platform-specific entry points.
Routing flow
- Analyze the user request and extract intent keywords
- Match against the table above and find the corresponding skill
- If a clear match can be made, directly call the corresponding skill (Claude/OpenCode can use
Skill("skill-name")or a slash command; Codex uses$skill-name//skills; Antigravity uses/skillsor names it in natural language; OpenClaw uses/skill skill-nameor names it in natural language) - If no match can be made, 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 about the length type before routing
Query degradation
Spawn version notice (does not block spawn): first read the project root
.story-deployed'sagents_version. If it is inconsistent with this version'sagents_version: 34(marker missing, field missing/non-integer, less than or greater than 34)still check by file existence and spawn, but only check the current runtime's canonical directory; at the same time reportNotice: agents bundle 版本不匹配(项目 {N},本版 34)and prompt to re-run/story-setupand then start a new session; if greater than 34, additionally prompt to first update oh-story-claudecode, and do not use the local old-version setup to downgrade and overwrite. Only downgrade to solo/direct when agent files are missing, or when the runtime does not expose custom agents, and reportFallback: ... -> solo。
Before routing "look up story material" or "look up material" to an agent, first do a lightweight availability check (routing only does this layer, and does not bear the global deployment strategy): currently not in a subagent context, the current runtime's Agent/Task or invoke_subagent tool is available, and the corresponding deployment file exists (Claude .claude/agents/*.md、OpenCode .opencode/agents/*.md、Codex .codex/agents/*.toml、Antigravity .agents/agents/agent-name/agent.md, where agent-name is the target agent name) → you can attempt to spawn. Antigravity uses invoke_subagent + TypeNameof the same name, and must not misjudge just because files for other clients exist. If any condition is not met, or the runtime returns unknown agent / does not expose a custom-agent registry, then downgrade and do not hard-fail:
story-explorerunavailable → the main session directly uses Read/Grep to retrieve from project files (character status/foreshadowing/progress/settings); before answering, say "The material lookup assistant is not enabled, so this time I'll read the project files directly"; if the project has not yet been deployed, prompt to first/story-setup(in Codex use$story-setup)。story-researcherunavailable → the main session completes it using existing retrieval/answering capabilities, or prompts the user to switch to/browser-cdpfor collection, likewise explaining in one plain sentence.
When answering the author, tell the things in the story (who, in which chapter, what happened); file field names and foreshadowing/event numbers do not appear alone, and numbers must accompany the story description.
Project state awareness
Before routing, first check the current project status:
- No project directory(no book-title directory containing
追踪/or设定/, and no short-story directory that has both正文.mdand小节大纲.md(or设定.md) together):- 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 to or view the book(s) being written (a project can have multiple books at the same time):
- Find all book directories at the project root: directories containing the
追踪/or设定/subdirectory, or directories that have both正文.mdand小节大纲.md(or设定.md) (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 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: preferably use
gh release view --json tagName,name,url -R zenstory-ai/oh-story-claudecodeto gettagName; if gh is unavailable usecurl -fsS --max-time 5 https://api.github.com/repos/zenstory-ai/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. - Comparison: 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 this update's highlights), then use AskUserQuestion to ask "Update now?":
- choose update → run
npx skills add zenstory-ai/oh-story-claudecode -y -g(-gglobally; remove it to update only the current directory); after completion, prompt: for already-deployed projects, 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 yet → do nothing, and inform that they can come back anytime.
- choose update → run