Claude Project Setup
mohitagw15856/pm-claude-skills
Set up a repo or project so an AI coding agent works well in it — the CLAUDE.md, the context, the guardrails, and the conventions the agent needs to be useful instead of lost.
网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md/AGENTS.md 等基础设施部署到用户项目目录,支持 Claude Code / OpenCode / Codex / OpenClaw。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」。
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Xiaoyangy/novel-studio story-setup --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/story-setup .claude/skills/story-setup && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .claude/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setupType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Xiaoyangy/novel-studio story-setup --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/story-setup .agents/skills/story-setup && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .agents/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Xiaoyangy/novel-studio story-setup --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/story-setup .cursor/skills/story-setup && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .cursor/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Xiaoyangy/novel-studio.git --path skills/story-setup--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Xiaoyangy/novel-studio story-setup --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/story-setup .gemini/skills/story-setup && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .gemini/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Xiaoyangy/novel-studio story-setupInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/story-setup .github/skills/story-setup && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .github/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Xiaoyangy/novel-studio --skill story-setup -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Xiaoyangy/novel-studio story-setup --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xiaoyangy/novel-studio.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/story-setup .opencode/skills/story-setup && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "story-setup" agent skill from https://github.com/Xiaoyangy/novel-studio/tree/main/skills/story-setup into .opencode/skills/story-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "story-setup", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
story-setup网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md/AGENTS.md 等基础设施部署到用户项目目录,支持 Claude Code / OpenCode / Codex / OpenClaw。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」。
Story Setup is an agent skill from Xiaoyangy/novel-studio. 网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md/AGENTS.md 等基础设施部署到用户项目目录,支持 Claude Code / OpenCode / Codex / OpenClaw。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」。
Its SKILL.md is about 5.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 93 other files, including reference files (for example `CONTEXT.md`, `UPGRADING.md` and `context.json`).
It sits in Agent Workflows, covering Agent instruction files and Creative writing and fiction. The repository describes itself as: 开源、本地优先的 AI 长篇小说创作引擎:多智能体世界推演、按弧规划、RAG 长程记忆、逐章审核与断点恢复 | Open-source AI novel generator for long-form fiction. The licence is Apache-2.0.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit ed04a10. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
opencodeFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
models.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Story Setup loads about 5.7k tokens when it runs, and up to ~201k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 1,744 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Xiaoyangy/novel-studio at commit ed04a10, republished under its Apache-2.0 licence (© Xiaoyangy). 1,744 words, ~5,711 tokens.
.claude/skills/story-setup/SKILL.md (or your agent's skills folder). This skill also uses 91 other files; get the full folder from GitHub.你是写作基础设施部署器。将网文写作工具集的全套基础设施(hooks、rules、agents、CLAUDE.md、AGENTS.md、Codex/OpenClaw 配置)部署到用户项目目录。
执行铁律:不覆盖用户已有配置,合并而非替换。
.story-deployed)追踪/ 子目录的目录,或用户自定义结构).claude/settings.local.json 是否存在.active-book 文件是否存在opencode.json 或 .opencode/ 是否存在target_cli = opencode.codex/、.codex/config.toml、.codex/agents/、.codex/hooks.json、AGENTS.md 中的 Codex 段target_cli = codexopenclaw.json、.openclaw/、.agents/skills/、AGENTS.md 中的 OpenClaw 段,或 skills/*/SKILL.md 中的 metadata.openclawtarget_cli = openclaw.claude/ 或 CLAUDE.md、opencode 标记、Codex 标记、OpenClaw 标记同时存在 → 使用 AskUserQuestion 让用户选择目标 CLI(选项:仅 Claude Code / 仅 OpenCode / 仅 Codex / 仅 OpenClaw / 任意组合)target_cli = opencode,部署时创建 opencode.json 和 .opencode/target_cli = codex,部署时创建 .codex/target_cli = openclaw,部署时复制 OpenClaw 兼容 skills 到项目 skills/target_cli = claude-code,opencode,codex,openclaw(仅包含用户选择的端)使用 AskUserQuestion 确认部署位置后,依次执行。
| Source path | Target path | Owner class | Merge mode | Validation check |
|---|---|---|---|---|
skills/story-setup/references/templates/CLAUDE.md.tmpl | CLAUDE.md | user+managed | marker/section merge | contains story skill routing sections |
skills/story-setup/references/templates/hooks/ | .claude/hooks/ | story-setup managed | recursive replace | session-*.sh, detect-story-gaps.sh, validate-story-commit.sh, guard-outline-before-prose.sh, check-prose-after-write.sh, lib/common.sh, lib/sentinel.sh exist |
skills/story-setup/references/templates/rules/*.md | .claude/rules/*.md | story-setup managed | replace | every rule contains paths frontmatter |
skills/story-setup/references/templates/agents/*.md | .claude/agents/*.md | story-setup managed | replace | 7 agent files exist |
skills/story-setup/references/agent-references/*.md | .claude/skills/story-setup/references/agent-references/*.md | story-setup managed | replace | every story-setup/references/agent-references/*.md reference resolves |
skills/story-setup/references/templates/settings-hooks.json | .claude/settings.local.json | user+managed | merge by hook command | hook JSON valid and registered commands deduped |
skills/story-setup/references/templates/上下文.md.tmpl | {书名}/追踪/上下文.md | user state | create only if absent | never overwrite existing writing context |
| generated sentinel | .story-deployed | story-setup managed | replace | contains agents_version, setup_skill_version, target_cli, resolver_strategy, references_dir |
skills/story-setup/references/opencode/AGENTS.md.tmpl | AGENTS.md | user+managed | marker/section merge | contains story skill routing sections |
skills/story-setup/references/opencode/agents/ | .opencode/agents/ | story-setup managed | replace | 7 agent files exist(replace 前按 2.4.4 Step 0 缓存现有 model:,避免覆盖用户已配模型) |
skills/story-setup/references/opencode/plugin.ts | .opencode/plugins/story-hooks.ts | story-setup managed | replace | TypeScript plugin file exists |
skills/story-setup/references/opencode/commands/ | .opencode/commands/ | story-setup managed | replace | 13 command files exist |
skills/story-setup/references/opencode/opencode.json.patch | merge into opencode.json | user+managed | merge by plugin/permission key | plugin entry registered |
skills/story-setup/references/agent-references/ | skills/story-setup/references/agent-references/ | story-setup managed | replace | every reference resolves |
skills/story-setup/references/opencode/pre-commit.sh | .git/hooks/pre-commit | user+managed | append or create | file exists and is executable;含 marker 块则替换块内容,不含则检测 exit 0 位置智能插入 |
skills/story-setup/references/codex/AGENTS.md.tmpl | AGENTS.md | user+managed | marker/section merge | contains Codex story skill routing sections |
skills/story-setup/references/codex/agents/ | .codex/agents/ | story-setup managed | replace | 7 TOML agent files parse and contain name/description/developer_instructions |
skills/story-setup/references/codex/hooks/hooks.json | .codex/hooks.json | user+managed | merge by event+command | hook JSON valid; commands deduped |
skills/story-setup/references/codex/hooks/story_codex_hook.py | .codex/hooks/story_codex_hook.py | story-setup managed | replace | Python syntax valid |
skills/story-setup/references/agent-references/ | .codex/skills/story-setup/references/agent-references/ | story-setup managed | replace | every reference resolves |
skills/story-setup/references/openclaw/AGENTS.md.tmpl | AGENTS.md | user+managed | marker/section merge | contains OpenClaw story skill routing sections |
repository skills/story*/ | skills/story*/ | story-setup managed for known skill names | replace known skill dirs only | 8 SKILL.md files exist; OpenClaw-compatible frontmatter |
skills/story-setup/references/agent-references/ | skills/story-setup/references/agent-references/ | story-setup managed | replace via full skill copy | every reference resolves |
部署 opencode.json.patch 时按以下规则合并:
opencode.json(如存在),解析 JSONplugin 数组:将 ./.opencode/plugins/story-hooks.ts 加入数组,去重permission、model、provider 等),不覆盖opencode.jsonskills/story-setup/references/templates/CLAUDE.md.tmplCLAUDE.md(如已存在,按「CLAUDE.md 合并策略」处理)skills/story-setup/references/templates/hooks/ 复制到用户项目 .claude/hooks/lib/,其中:lib/common.sh 提供 project_root、discover_active_book、discover_all_bookslib/sentinel.sh 提供 .story-deployed 字段读取.claude/hooks/*.sh 设置执行权限(chmod +x);lib/*.sh 由 hook source,不要求可执行位skills/story-setup/references/templates/rules/ 下所有 .md 文件.claude/rules/ 目录skills/story-setup/references/templates/agents/ 下所有 .md 文件.claude/agents/ 目录UPGRADING.md 的版本检测结果重新部署.claude/agents/ 注册 subagent。当前会话内新部署的 agent 不会立即可用——必须让用户新开一个 Claude Code 会话,story-architect/narrative-writer 等 custom agent 才会注册成 subagent_type;否则 story-review、story-long-write 等想 spawn 时会拿到「subagent_type 不可用」并降级 solo(单视角)。这一步必须在安装报告里明确告知用户(见 Phase 3 第 6 步)。scripts/sync-opencode.py 生成 .opencode/agents/*.md;Codex 由 scripts/generate-codex-agents.py 生成 .codex/agents/*.toml。story-setup/references/agent-references/*.md 这一本 skill 内复制路径;不要跨 skill 引用其他 skill 的 references。若全局安装路径不同,优先用项目内 .claude/skills/ 或 skills/ 作为规范路径前缀,其次用工具的 skill 搜索能力,不要假定固定绝对路径。skills/story-setup/references/agent-references/ 下所有 .md 复制到项目内 .claude/skills/story-setup/references/agent-references/skills/ 目录,也可以同步复制到 skills/story-setup/references/agent-references/ 作为 fallback,但不得只复制 fallback 而遗漏 .claude/skills/ 主路径story-setup/references/agent-references/<file>.md,源包与目标包都必须存在 <file>.mdskills/story-setup/references/codex/agents/ 下所有 .toml 文件,复制到用户项目 .codex/agents/scripts/generate-codex-agents.py 从 Claude agent 模板确定性生成name、description、developer_instructionsconsistency-checker、story-explorer)必须保留 sandbox_mode = "read-only".codex/agents/*.toml,项目 .codex/ 配置层需要被 trust;部署后需要新会话/刷新后才可能稳定暴露给 spawn。若运行时返回 unknown agent_type,调用方必须降级 solo/direct 并报告 fallback。skills/story-setup/references/agent-references/ 同步复制到 .codex/skills/story-setup/references/agent-references/,作为 Codex agent 的项目内参考资料主路径仅当
target_cli含opencode时执行。OpenCode 子代理不指定模型时继承主模型,导致低成本 Agent 也消耗主模型额度。此步骤自动检测用户模型并写入model:字段。
.opencode/agents/ 的 replace 之前执行)OpenCode agents 部署是 replace,会覆盖上次写入的 model:。所以在执行该 replace 之前先扫描现有 .opencode/agents/*.md,缓存每个 agent 的 model:(agent 名 → 模型 ID)。后续检测失败/超时、或用户跳过某一级时,用缓存值回填,避免把用户上次配好的低成本模型抹成主模型。若 replace 已先发生、缓存为空,则按全新部署处理,并在安装报告中提示"未能保留上次模型配置"。
优先执行 opencode models --verbose,它输出含 cost(input/output/cache 单价)、context、capabilities 的 metadata;不可用或解析失败时回退到 opencode models 纯文本(每行 provider/model)。两者都用 60000ms(60 秒)超时,因为首次运行需加载 models.dev 缓存。
model:、跳过自动配置,在安装报告中输出手动配置指南优先按成本分级(有 --verbose 时):按每模型实际 cost 从低到高分档——低端取最便宜/免费档、中端取中价档、高端取最贵或上下文/能力最强档。免费模型按真实 cost=0 归低端,不按名字里的营销词(如 nemotron-3-ultra-free 名含 ultra 但 cost=0,应归低端)。无 cost 数据的模型也据此进入候选,不被丢弃。
回退按关键词分级(无 --verbose 或无 cost 时):按模型 ID 中最后一个 / 之后的模型名按 -、.、_ 分割为段,逐段精确匹配关键词(不区分大小写)。例如 minimax-m3 拆为 [minimax, m3],不匹配 mini 也不匹配 max;claude-haiku-4.5 拆为 [claude, haiku, 4, 5],匹配 haiku。关键词分级是启发式,安装报告中标注 分级依据:关键词(heuristic)。
| 等级 | 匹配关键词 | 对应 Agent |
|---|---|---|
| 低端 | haiku, flash, mini, nano, lite | consistency-checker, story-explorer |
| 中端 | sonnet, plus | story-researcher, narrative-writer, character-designer |
| 高端 | opus, pro, ultra, max | story-architect |
按 低端 → 中端 → 高端 顺序,每级用 AskUserQuestion 让用户选择。
低端选项结构:
问题:"为低成本 Agent(consistency-checker, story-explorer)选择模型:"
选项:
- provider/model-id
- provider/model-id
- 自定义输入(手动输入完整模型 ID,ID 拼写错误要到运行时才会暴露)
- 跳过,使用主模型(成本可能较高)中端选项结构:
问题:"为写作质量关键 Agent(narrative-writer, character-designer, story-researcher)选择模型:"
选项:
- provider/model-id
- provider/model-id
- 自定义输入(请勿使用低端模型,会影响正文质量;ID 拼写错误要到运行时才会暴露)
- 跳过,使用主模型(主模型质量通常足够)高端选项结构:
问题:"为总指挥 Agent(story-architect)选择模型:"
选项:
- provider/model-id
- provider/model-id
- 自定义输入(手动输入完整模型 ID,ID 拼写错误要到运行时才会暴露)
- 跳过,使用主模型(成本可能较高)规则:
自定义输入、保留现有模型(Step 0 缓存到该 agent 的 model,无则不显示此项)、跳过,用主模型。候选为 0 时仍弹窗,并在问题说明里给出对应警告 + 列出未分级/未入档模型供参考——不再静默跳过交互(否则用户够不到自定义输入)。自定义输入:用户输入 provider/model-id 完整 ID;写入前校验为单行、无控制字符、匹配 ^[A-Za-z0-9._-]+/[A-Za-z0-9._:+-]+$,不符则提示重输或改选跳过。保留现有模型:写回 Step 0 缓存的该 agent model(重新部署时保住用户上次配置),不算"跳过"。跳过,用主模型:显式清除——不写该 agent 的 model:,agent 继承主模型。想保留上次配置请选 保留现有模型。对应用户选择的 agent 文件(.opencode/agents/*.md,由部署清单中 OpenCode agents 部署步骤在此步骤之前已部署),在 frontmatter 末尾、closing --- 之前,以零缩进的顶层字段插入 model:(不要插进 permission: 等多行 map 的缩进块内部)。值含 YAML 特殊字符时加引号,确保不破坏 frontmatter:
---
description: ...
mode: subagent
permission:
read: allow
edit: deny
steps: 12
model: provider/model-id
---model: 字段(重新部署场景),替换该顶层 model: 的值,不新增重复键保留现有模型:写回 Step 0 缓存的该 agent model跳过,用主模型:不写入 model: 字段model:,避免 replace 抹掉用户上次配置skills/story-setup/references/templates/上下文.md.tmpl{书名}/追踪/ 已存在时,创建缺失的 {书名}/追踪/上下文.md追踪/ 目录兼容性说明:
settings-hooks.json中 PreToolUse 的if字段使用 Claude Code hook 条件语法,需要运行环境支持 hook-level if。若目标工具不支持该字段,hook 脚本本身仍会自检并 advisory-only 退出;部署时可删除该if字段并保留 matcher + command。
skills/story-setup/references/templates/settings-hooks.json.claude/settings.local.json(如存在).claude/settings.local.jsonCodex 项目 hooks 部署到 .codex/hooks.json,hook 脚本部署到 .codex/hooks/story_codex_hook.py。
skills/story-setup/references/codex/hooks/hooks.json.codex/hooks.json(如存在),提取 hooks 部分command 去重追加;每个 hook 同时携带 command(POSIX sh,Unix)与 commandWindows(cmd.exe,Windows)两个字段,整体保留不要拆开.codex/hooks.json 后提示用户:项目 .codex/ 层需要被 Codex trust,非 managed command hooks 还需要在 /hooks 中 review/trust 后才会运行;Windows 下 Codex 以 cmd.exe 跑 hook,走 commandWindows(cwd 为项目根时生效,否则 no-op),正文守卫在 Windows 非项目根目录下不强制拦截OpenClaw Phase 1 只部署 skills,不部署 OpenClaw agents/hooks/plugin。
skills/ 下所有包含 SKILL.md 的 story skill 目录(8 个:story*)。skills/{skill-name}/,仅替换这些 story-setup 管理的已知 skill 目录;保留用户在 skills/ 下的其他目录。SKILL.md 必须满足 OpenClaw frontmatter 约束:name / description 是单行键值,metadata 是单行 JSON 对象且含 metadata.openclaw。skills/story-setup/references/openclaw/AGENTS.md.tmpl 到项目 AGENTS.md,按「AGENTS.md 合并策略」合并。.story-deployed 的 target_cli 写入 openclaw 或多端组合;references_dir 对 OpenClaw 写 skills/story-setup/references/agent-references。.story-deployed 文件(sentinel file)key: value 格式,hook 用 references/templates/hooks/lib/sentinel.sh 读取):deployed_at: <date -u +"%Y-%m-%dT%H:%M:%SZ">
agents_version: 16
setup_skill_version: 1.2.5
target_cli: claude-code(或 opencode、codex、openclaw,或 claude-code,opencode,codex,openclaw 等组合)
resolver_strategy: project-local-skill-reference
references_dir: .claude/skills/story-setup/references/agent-references(Codex 可写 .codex/skills/story-setup/references/agent-references;OpenClaw 可写 skills/story-setup/references/agent-references;多端用逗号分隔).claude/.agents-pending-restart(空文件即可)。session-start.sh 在下一个会话启动时据此确认 agents 已随新会话注册,并自动删除该标记——用来向用户确认「重启已生效」。.story-deployed 已存在但无 agents_version 或版本 < 16,提示用户重新运行 story-setup 以更新 hooks/agents/rules/reference bundle(具体变更见 UPGRADING.md).claude/settings.local.json 中的 hooks 字段是否正确.claude/hooks/ 下的脚本是否存在且有执行权限.claude/hooks/lib/common.sh 与 .claude/hooks/lib/sentinel.sh 是否存在.claude/rules/ 下的规则文件是否存在且包含 paths frontmatter.claude/agents/ 下的 7 个 agent 定义文件是否存在.claude/skills/story-setup/references/agent-references/ 下 reference 文件完整story-setup/references/agent-references/<file>.md 都能解析到 deployed bundle.story-deployed 是否存在且包含时间戳、agents_version: 16、setup_skill_version: 1.2.5、target_cli、resolver_strategy、references_dir.claude/agents/,但这些 custom agent 只在「会话启动」时才会被 Claude Code 注册成 subagent_type。请新开一个 Claude Code 会话再开始写作,否则当前会话里 story-review / story-long-write 等想 spawn story-architect、narrative-writer 等时会拿到「subagent_type 不可用」并降级 solo(单视角,失去多 agent 协作)。判断是否生效:新会话里跑 /story-review,报告头若是 Effective Mode: full/lean 即注册成功;若是 Fallback: ... -> solo 说明还在旧会话或未注册。/story-long-write 或 /story-short-writeAgent 模型配置:
story-architect → <高端模型>(provider/model-id)
narrative-writer → <中端模型>(provider/model-id)
character-designer → <中端模型>(provider/model-id)
story-researcher → <中端模型>(provider/model-id)
consistency-checker → <低端模型>(provider/model-id)
story-explorer → <低端模型>(provider/model-id)opencode models 不可用),输出手动配置指南:无法自动检测模型列表。以下 Agent 未配置模型,将使用主模型,成本可能较高:
- consistency-checker(建议使用低成本模型)
- story-explorer(建议使用低成本模型)
手动配置方法:编辑 .opencode/agents/{agent名}.md,在 frontmatter 中添加:
model: provider/model-id
可用模型列表与成本可通过 opencode models --verbose 查看(输出含每模型 cost/context)。
模型库与定价见 OpenCode 官方模型源 https://models.dev/。.opencode/agents/ 下的 7 个 agent 定义文件是否存在,且 frontmatter 包含 mode: subagent 和 permission 字段.opencode/plugins/story-hooks.ts 是否存在.opencode/commands/ 下的 7 个 command 文件是否存在skills/story-setup/references/agent-references/ 下 reference 文件完整且数量与源目录一致opencode.json 的 plugin 数组是否包含 story-hooks 条目.git/hooks/pre-commit 是否存在且有执行权限(Windows 上跳过执行权限检查).opencode/agents/ 下 agent 文件 frontmatter 可被 YAML 解析、model:(如有配置)是合法顶层标量,而非仅 grep 到 model: 子串AGENTS.md 含 Codex story skill routing sections.codex/agents/ 下 7 个 .toml agent 定义文件存在并可解析.codex/hooks.json 存在且 JSON 有效,包含 .codex/hooks/story_codex_hook.py command.codex/hooks/story_codex_hook.py 存在且 Python 语法有效.codex/skills/story-setup/references/agent-references/ 下 reference 文件完整且数量与源目录一致.codex/ 配置层,并在 /hooks review/trust 非 managed hooks;部署后新开 Codex 会话让 custom agents 生效;若当前运行时仍返回 unknown agent_type,按各 skill 的 fallback 规则降级 solo/directAGENTS.md 含 OpenClaw story skill routing sectionsskills/ 下 8 个 story skill 目录存在,且每个 SKILL.md 包含单行 name、单行 description、单行 JSON metadata.openclawskills/story-setup/references/agent-references/ 下 reference 文件完整且数量与源目录一致| 占位符 | 替换规则 | 示例 |
|---|---|---|
{项目名} | 用户项目名称或目录名 | 《剑来》、《暗卫》 |
{书名} | 书名目录名(与目录一致) | 与 {项目名} 相同,或用户自定义 |
{目标平台} | 目标发布平台 | 起点、番茄、晋江、知乎盐言 |
{作者名} | 用户笔名或昵称 | 未指定时用「作者」 |
替换时去掉花括号。如果用户未指定项目名,用当前目录名。未指定的占位符保留原样不替换。
用户已有 CLAUDE.md 时,按 marker/section 合并:
## 标题切分为 section map用户已有 AGENTS.md 时,按 marker/section 合并:
## 标题切分为 section mapskills/story-setup/references/opencode/AGENTS.md.tmpl;Codex 使用 skills/story-setup/references/codex/AGENTS.md.tmpl;OpenClaw 使用 skills/story-setup/references/openclaw/AGENTS.md.tmplhooks 注册合并按 command 字段去重:
.claude/settings.local.json(如存在),提取 hooks 部分settings-hooks.json 模板,提取要注册的 hooks.story-deployed 不存在 → 全新安装,Phase 2 全部执行.story-deployed 存在且 agents_version: 16 → 提示已部署,AskUserQuestion 确认是否重新部署.story-deployed 存在但 agents_version < 16 → 提示需要更新,重新执行 Phase 2 覆盖 agents/hooks/rules/reference bundle,CLAUDE.md / AGENTS.md / settings.local.json / .codex/hooks.json 走合并策略| 文件 | 用途 |
|---|---|
| references/templates/CLAUDE.md.tmpl | 项目根 CLAUDE.md 模板 |
| references/templates/hooks/ | 8 个 hook 脚本模板 + lib/common.sh/lib/sentinel.sh(正文兜底 check-prose-after-write.sh 限 PostToolUse Write/Edit;cat>/tee 等 Bash 写正文由 Codex Stop 回合末 git 扫描兜,Claude/OpenCode 的 Bash 仅 pre-guard) |
| references/templates/rules/ | 4 条 path-scoped 规则模板 |
| references/templates/agents/ | 6 个 agent 定义模板(story-architect, character-designer, narrative-writer, consistency-checker, story-researcher, story-explorer) |
| references/agent-references/ | Agent 模板自带的参考资料副本;部署到 .claude/skills/story-setup/references/agent-references/,避免跨 skill references |
| references/templates/settings-hooks.json | hooks 注册 JSON 片段 |
| references/templates/上下文.md.tmpl | 写作上下文模板 |
| references/codex/AGENTS.md.tmpl | Codex 项目根 AGENTS.md 模板 |
| references/codex/agents/ | 7 个 Codex custom agent TOML 模板 |
| references/codex/hooks/hooks.json | Codex hooks 注册 JSON 模板(部署到 .codex/hooks.json) |
| references/codex/hooks/story_codex_hook.py | Codex hook adapter(部署到 .codex/hooks/story_codex_hook.py) |
| references/openclaw/AGENTS.md.tmpl | OpenClaw 项目根 AGENTS.md 模板(skills-only) |
流水线: 部署 位置: 初始化(最前置)
| 时机 | 跳转到 | 命令 |
|---|---|---|
| 部署完成,开始写作 | novel-pipeline / novel-write(story-long-write / story-short-write 只作方法参考) | novel-studio --pipeline --prompt-file <需求文件> |
© Xiaoyangy, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 91 other files (references) in skills/story-setup of Xiaoyangy/novel-studio.
Open the folder on GitHubat commit ed04a10
Story Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Story Setup this skillXiaoyangy/novel-studio | 131 | — | ~5.7k | Automated safety check: Pass | Apache-2.0 | |
| Claude Project Setupmohitagw15856/pm-claude-skills | 1.4k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Using Agent Skillsaddyosmani/agent-skills | 104k | 4 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Claude ReflectBayramAnnakov/claude-reflect | 1.8k | 2 repos | ~627 | Automated safety check: Pass | MIT | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Writing For Agentsbestofjs/bestofjs | 3.1k | 18 repos | ~2.7k | Automated safety check: Pass | MIT |
mohitagw15856/pm-claude-skills
Set up a repo or project so an AI coding agent works well in it — the CLAUDE.md, the context, the guardrails, and the conventions the agent needs to be useful instead of lost.
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
BayramAnnakov/claude-reflect
Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
bestofjs/bestofjs
Writing documents for agents. An agent skill from bestofjs/bestofjs.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
Xiaoyangy/novel-studio
长篇网文写作方法论与 novel-studio pipeline 适配器。用于把长篇开书、大纲、日更、续写、重写等需求整理为 pipeline 输入;在 novel-studio 内禁止直接生成正文。触发方式:/story-long-write、/写长篇、「帮我开书」「写大纲」「日更」「续写」「继续写」「修改第X章」「回炉」「重写第X章」。
Xiaoyangy/novel-studio
短篇网文写作方法论与 novel-studio pipeline 适配器。用于把短篇、盐言故事、拆文续写等需求整理为 pipeline 输入;在 novel-studio 内禁止直接生成正文。触发方式:/story-short-write、/写短篇、「帮我写一篇短篇」「写个盐言故事」。
Xiaoyangy/novel-studio
豆瓣阅读原创长篇专项方法论与 novel-studio pipeline 适配器。用于把 15W-30W 字原创长篇的主题、类型、开头、文字、标签、简介和提交自检要求整理为 pipeline 输入;在 novel-studio 内禁止直接生成正文。触发方式:/story-douban-long-write、/豆瓣长篇、/豆瓣写作、「写一部豆瓣阅读原创长篇」「按豆瓣要求写长篇」。
Xiaoyangy/novel-studio
短篇网文拆文。拆解爆款短篇小说(番茄短篇 / 故事会 / 知乎盐选 / 追妻 / 世情 / 重生 / 虐渣等通俗题材)的故事核、结构、情感线、反转设计、写作手法、共鸣层次。单一全量拆解管道:跑完 Stage 2-6 产出完整拆文报告,落盘到 deconstruction-library/{书名}/,下游 story-short-write 同时读拆文报告 + 情节节点 + 写作手法 + 原文…
Xiaoyangy/novel-studio
审核一段/一篇小说(或任意叙事性文本)的「AI 创作度」——判断它有多大可能由 AI 生成、或 AI 参与了多少。当用户想知道一段文字是不是 AI 写的、AI 味重不重、是人工还是 AI、AI 辅助了多少、帮忙鉴别/检测/审稿 AI 生成内容、给稿件的「人味/机味」打分时,都使用本技能。触发词包括但不限于:AI 创作度、AI 味、是不是 AI 写的、AI 生成检测、人工还是 AI、鉴别…
Xiaoyangy/novel-studio
把各功能串成一条可恢复的流水线:(共创→)写作→评审→重写→交付,按阶段执行、断点续跑。触发:「一条龙写完整本书」「从头跑完整个流程」「中断后接着跑」,想要无人值守端到端、且能中断恢复时使用。
Categories
网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md/AGENTS.md 等基础设施部署到用户项目目录,支持 Claude Code / OpenCode / Codex / OpenClaw。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」。. Story Setup is an agent skill from Xiaoyangy/novel-studio.
Story Setup fits situations like: tasks that involve Agent instruction files; tasks that involve Creative writing and fiction.
Run `npx skills add Xiaoyangy/novel-studio --skill story-setup -a claude-code`. Or copy the skill folder (skills/story-setup in Xiaoyangy/novel-studio) into .claude/skills/story-setup in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Xiaoyangy/novel-studio --skill story-setup -a codex`. Or copy the skill folder (skills/story-setup in Xiaoyangy/novel-studio) into .agents/skills/story-setup in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Xiaoyangy/novel-studio --skill story-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/story-setup, .gemini/skills/story-setup, .github/skills/story-setup and .opencode/skills/story-setup in your project.
Going by SKILL.md and its folder, Story Setup needs the command-line tools its instructions call (opencode). Our summary lists: Python 3.
SKILL.md names 1 domain. As links in the text: models.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Story Setup is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.7k tokens (SKILL.md is roughly 23k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 196k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Story Setup: Claude Project Setup (mohitagw15856/pm-claude-skills, 1.4k stars), Using Agent Skills (addyosmani/agent-skills, 104k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.8k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Xiaoyangy (a GitHub user) maintains it in Xiaoyangy/novel-studio, which has 131 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on September 23, 2026.
Source: Xiaoyangy/novel-studio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.