Agent skill

Story Setup

by uu201 in uu201/character-arc

网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md 等基础设施部署到用户项目目录。

MITAuto-check passedAgent Workflows

Install Story Setup

skills CLI
$ npx skills add uu201/character-arc --skill story-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install uu201/character-arc story-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/uu201/character-arc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/skills/oh-story-claudecode/story-setup .claude/skills/story-setup && rm -rf skills-src

Use ~/.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/

Facts

Skill name
story-setup
GitHub stars
579
Token cost
~2k tokens
SKILL.md length
586 words
Files
55 (incl. references)
Skills in repo
26
Repo updated
First seen
Licence
MIT

At a glance

网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md 等基础设施部署到用户项目目录。

  • Works in 3 steps: :检测项目状态 → :部署基础设施 → :验证安装
  • Tasks that involve Agent instruction files
  • SKILL.md covers Phase 1:检测项目状态, Phase 2:部署基础设施, Phase 3:验证安装 and 模板占位符, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Story Setup is an agent skill from uu201/character-arc. 网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md 等基础设施部署到用户项目目录。 触发方式:/story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 56 other files, including reference files (for example `UPGRADING.md`, `references/agent-references/anti-ai-writing.md` and `references/agent-references/banned-words.md`).

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: CharacterArc(弧光) AI 小说创作应用,集项目设定、角色关系、剧情大纲、章节写作与多模型 AI 协作于一体. The licence is MIT.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “/story-setup”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. :检测项目状态
  2. :部署基础设施
  3. :验证安装

What it can do on your machine

Read from SKILL.md and the folder at commit 2943d80. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Story Setup loads about 2k tokens when it runs, and up to ~121k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 586 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~121k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from uu201/character-arc at commit 2943d80, republished under its MIT licence (© uu201). 586 words, ~2,038 tokens.

Download SKILL.mdSave it as .claude/skills/story-setup/SKILL.md (or your agent's skills folder). This skill also uses 54 other files; get the full folder from GitHub.
name
story-setup
description
网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md 等基础设施部署到用户项目目录。 触发方式:/story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」
version
1.1.1

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

你是写作基础设施部署器。将网文写作工具集的全套基础设施(hooks、rules、agents、CLAUDE.md)部署到用户项目目录。

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


Phase 1:检测项目状态

  1. 检查当前目录是否已部署过(存在 .story-deployed)
    • 如果已存在 → 使用 AskUserQuestion 确认是否重新部署
  2. 检查是否有书名目录(包含 追踪/ 子目录的目录,或用户自定义结构)
    • 有 → 识别为长篇项目,显示当前项目信息
    • 无 → 识别为新项目或短篇项目
  3. 检查 .claude/settings.local.json 是否存在
    • 存在 → 读取现有配置,后续合并
    • 不存在 → 后续创建新文件
  4. 检查 .active-book 文件是否存在
    • 存在 → 显示当前活跃书目
    • 不存在 → 跳过

Phase 2:部署基础设施

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

2.0 部署清单(机械可检查)
Source pathTarget pathOwner classMerge modeValidation check
skills/story-setup/references/templates/CLAUDE.md.tmplCLAUDE.mduser+managedmarker/section mergecontains story skill routing sections
skills/story-setup/references/templates/hooks/.claude/hooks/story-setup managedrecursive replacesession-*.sh, detect-story-gaps.sh, validate-story-commit.sh, lib/common.sh, lib/sentinel.sh exist
skills/story-setup/references/templates/rules/*.md.claude/rules/*.mdstory-setup managedreplaceevery rule contains paths frontmatter
skills/story-setup/references/templates/agents/*.md.claude/agents/*.mdstory-setup managedreplace7 agent files exist
skills/story-setup/references/agent-references/*.md.claude/skills/story-setup/references/agent-references/*.mdstory-setup managedreplaceevery story-setup/references/agent-references/*.md reference resolves
skills/story-setup/references/templates/settings-hooks.json.claude/settings.local.jsonuser+managedmerge by hook commandhook JSON valid and registered commands deduped
skills/story-setup/references/templates/上下文.md.tmpl{书名}/追踪/上下文.mduser statecreate only if absentnever overwrite existing writing context
generated sentinel.story-deployedstory-setup managedreplacecontains agents_version, setup_skill_version, target_cli, resolver_strategy, references_dir
2.1 部署 CLAUDE.md
  • 读取 skills/story-setup/references/templates/CLAUDE.md.tmpl
  • 替换占位符(见下方「模板占位符」段)
  • 写入项目根目录 CLAUDE.md(如已存在,按「CLAUDE.md 合并策略」处理)
2.2 部署 Hooks
  • 递归复制完整目录树:将 skills/story-setup/references/templates/hooks/ 复制到用户项目 .claude/hooks/
  • 必须保留子目录 lib/,其中:
    • lib/common.sh 提供 project_root、discover_active_book、discover_all_books
    • lib/sentinel.sh 提供 .story-deployed 字段读取
  • 只需对 .claude/hooks/*.sh 设置执行权限(chmod +x);lib/*.sh 由 hook source,不要求可执行位
2.3 部署 Rules
  • 读取 skills/story-setup/references/templates/rules/ 下所有 .md 文件
  • 复制到用户项目的 .claude/rules/ 目录
2.4 部署 Agents
  • 读取 skills/story-setup/references/templates/agents/ 下所有 .md 文件
  • 复制到用户项目的 .claude/agents/ 目录
  • Agent 文件属于 story-setup 管理文件,可安全覆盖;版本升级时按 UPGRADING.md 的版本检测结果重新部署
2.4.1 Agent 兼容性处理
  • Agent frontmatter 以 Claude Code 为主;OpenClaw/qclaw 等只要支持 AgentSkills,未知字段(如 memory、skills、disallowedTools)应被忽略。若目标工具报 frontmatter 错误,保留 name、description、tools 三项,删除不支持字段后再部署。
  • 部署到项目后,agent 内引用的参考资料必须走 story-setup/references/agent-references/*.md 这一本 skill 内复制路径;不要跨 skill 引用其他 skill 的 references。若全局安装路径不同,优先用项目内 .claude/skills/ 或 skills/ 作为规范路径前缀,其次用工具的 skill 搜索能力,不要假定固定绝对路径。
2.4.2 部署 Agent References
  • 将 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/ 主路径
  • 校验:凡 agent 或 reference 中出现 story-setup/references/agent-references/<file>.md,源包与目标包都必须存在 <file>.md
2.5 部署 Session State 模板
  • 读取 skills/story-setup/references/templates/上下文.md.tmpl
  • 仅当已识别为长篇书目且 {书名}/追踪/ 已存在时,创建缺失的 {书名}/追踪/上下文.md
  • 如果目标文件已存在,不覆盖;短篇项目不得因此创建 追踪/ 目录
2.6 合并 Hooks 注册到 settings.local.json

兼容性说明: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(如存在)
  • 合并 hooks 配置(按「settings-hooks.json 合并算法」处理)
  • 写入 .claude/settings.local.json
2.7 创建部署标记
  • 创建 .story-deployed 文件(sentinel file)
  • 写入以下字段(YAML key: value 格式,hook 用 references/templates/hooks/lib/sentinel.sh 读取):
    deployed_at: <date -u +"%Y-%m-%dT%H:%M:%SZ">
    agents_version: 10
    setup_skill_version: 1.1.1
    target_cli: claude-code
    resolver_strategy: project-local-skill-reference
    references_dir: .claude/skills/story-setup/references/agent-references
  • 此文件供 session-start.sh 和写作 skill 检测部署状态,避免重复提示
  • 如果 .story-deployed 已存在但无 agents_version 或版本 < 10,提示用户重新运行 story-setup 以更新 hooks/agents/rules/reference bundle(具体变更见 UPGRADING.md)
Show full SKILL.md (247 more words)Show less

Phase 3:验证安装

  1. 验证 hooks 注册:
    • 检查 .claude/settings.local.json 中的 hooks 字段是否正确
    • 检查 .claude/hooks/ 下的脚本是否存在且有执行权限
    • 检查 .claude/hooks/lib/common.sh 与 .claude/hooks/lib/sentinel.sh 是否存在
  2. 验证 rules 路径:
    • 检查 .claude/rules/ 下的规则文件是否存在且包含 paths frontmatter
  3. 验证 agents:
    • 检查 .claude/agents/ 下的 7 个 agent 定义文件是否存在
  4. 验证 agent reference bundle:
    • 检查 .claude/skills/story-setup/references/agent-references/ 下 reference 文件完整
    • 检查所有 story-setup/references/agent-references/<file>.md 都能解析到 deployed bundle
  5. 验证部署标记:
    • 检查 .story-deployed 是否存在且包含时间戳、agents_version: 10、setup_skill_version: 1.1.1、target_cli、resolver_strategy、references_dir
  6. 输出安装报告:
    • 列出所有已部署的文件
    • 列出需要注意的事项(如已有配置已合并)
    • 提示用户可以开始使用 /story-long-write 或 /story-short-write

模板占位符

占位符替换规则示例
{项目名}用户项目名称或目录名《剑来》、《暗卫》
{书名}书名目录名(与目录一致)与 {项目名} 相同,或用户自定义
{目标平台}目标发布平台起点、番茄、晋江、知乎盐言
{作者名}用户笔名或昵称未指定时用「作者」

替换时去掉花括号。如果用户未指定项目名,用当前目录名。未指定的占位符保留原样不替换。

CLAUDE.md 合并策略

用户已有 CLAUDE.md 时,按 marker/section 合并:

  1. 优先识别 story-setup 管理块标记(如果旧项目已有标记,只替换标记内内容)
  2. 无标记时,读取用户现有 CLAUDE.md,按 ## 标题切分为 section map
  3. 读取模板 CLAUDE.md.tmpl,同样切分
  4. 模板中的标准 section(Skill 路由表、文件结构、协作规则、Context Recovery、语言)覆盖用户同名 section
  5. 用户独有的 section(自定义内容)保留不动
  6. 未知冲突用 AskUserQuestion 让用户选择保留哪个版本

settings-hooks.json 合并算法

hooks 注册合并按 command 字段去重:

  1. 读取用户现有 .claude/settings.local.json(如存在),提取 hooks 部分
  2. 读取 settings-hooks.json 模板,提取要注册的 hooks
  3. 对每个 hook event(SessionStart、PreToolUse 等):
    • 用户已有的 hook command → 保留,不重复添加
    • 模板中的新 hook command → append 到对应 event 的 hooks 数组
    • 用户独有的其他配置(permissions、env 等)→ 完整保留
  4. 写入合并后的完整 settings.local.json

重新部署

  • .story-deployed 不存在 → 全新安装,Phase 2 全部执行
  • .story-deployed 存在且 agents_version: 10 → 提示已部署,AskUserQuestion 确认是否重新部署
  • .story-deployed 存在但 agents_version < 10 → 提示需要更新,重新执行 Phase 2 覆盖 agents/hooks/rules/reference bundle,CLAUDE.md 和 settings.local.json 走合并策略

参考资料

文件用途
references/templates/CLAUDE.md.tmpl项目根 CLAUDE.md 模板
references/templates/hooks/6 个 hook 脚本模板 + lib/common.sh/lib/sentinel.sh
references/templates/rules/4 条 path-scoped 规则模板
references/templates/agents/7 个 agent 定义模板(story-architect, character-designer, narrative-writer, consistency-checker, story-researcher, story-explorer, chapter-extractor)
references/agent-references/Agent 模板自带的参考资料副本;部署到 .claude/skills/story-setup/references/agent-references/,避免跨 skill references
references/templates/settings-hooks.jsonhooks 注册 JSON 片段
references/templates/上下文.md.tmpl写作上下文模板

流程衔接

流水线: 部署 位置: 初始化(最前置)

时机跳转到命令
部署完成,开始写作story-long-write / story-short-write/story-long-write 或 /story-short-write
导入已有小说做拆解story-import/story-import
需要浏览器登录态(扫榜/拆文取原文)browser-cdp/browser-cdp

© uu201, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 54 other files (references) in resources/skills/oh-story-claudecode/story-setup of uu201/character-arc.

  • SKILL.md
  • UPGRADING.md
  • references/agent-references/anti-ai-writing.md
  • references/agent-references/banned-words.md
  • references/agent-references/character-basics.md
  • references/agent-references/character-design-methods.md
  • references/agent-references/character-relations.md
  • references/agent-references/dialogue-mastery.md
  • references/agent-references/emotional-arc-design.md
  • references/agent-references/emotional-methods.md
  • references/agent-references/format-and-structure.md
  • references/agent-references/genre-catalog.md
  • references/agent-references/genre-core-mechanics.md
  • references/agent-references/genre-readers.md
  • references/agent-references/genre-writing-formulas.md
  • references/agent-references/hooks-chapter.md
  • references/agent-references/hooks-suspense.md
  • references/agent-references/opening-design.md
  • references/agent-references/outline-conflict.md
  • … and 36 more

Open the folder on GitHubat commit 2943d80

Compare with similar skills

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.

Story Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Story Setup this skilluu201/character-arc579—~2kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills103k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.7k2 repos~627Automated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k19 repos~2.7kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~12kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    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.

    103k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.7k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 19 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    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.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~12k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed

More from uu201/character-arc

All 26 skills in this repo
  • Web Novel Ranking Scanner

    uu201/character-arc

    Analyzes ranking charts from Chinese web novel platforms such as Qidian, Fanqie and Jinjiang to spot market trends and promising genres, with scraper scripts per site.

    579 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Web Novel AI-Flavor Remover

    uu201/character-arc

    Finds and rewrites AI-sounding passages in Chinese web novel text, changing as few words as possible while keeping plot, characters and names intact.

    579 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • Short Web Fiction Writer

    uu201/character-arc

    Walks an agent through writing a complete short web novel in Chinese, starting from the emotion the reader should feel and building around one twist.

    579 GitHub stars~3.7k tokensUpdated 5 days ago
    Auto-check passed
  • Polishes AI-generated web novel text to remove machine-sounding patterns, with rewriting strategies, instruction templates, style techniques and before-and-after examples.

    579 GitHub starsUsed in 1 repo~508 tokens
    Auto-check passed
  • Story Long Write

    uu201/character-arc

    长篇网文写作。从大纲到正文,辅助长篇网络小说的创作,包括世界观、人物、情节线管理. An agent skill from uu201/character-arc.

    579 GitHub stars~5.2k tokensUpdated 5 days ago
    Auto-check passed
  • Novel Tools

    uu201/character-arc

    网文创作工具与生产流程。当用户需要使用AI辅助写作工具、设计提示词模板、规划写作工作流、选择码字工具、制定发布与数据分析策略时触发。覆盖DeepSeek/ChatGPT/Claude/豆包等AI工具应用、提示词工程、工作流设计、发布运营。

    579 GitHub starsUsed in 1 repo~574 tokens
    Auto-check passed

Categories

Questions about Story Setup

What does Story Setup do?

网文写作工具集基础设施部署。将 hooks/rules/agents/CLAUDE.md 等基础设施部署到用户项目目录。. Story Setup is an agent skill from uu201/character-arc.

When should I use Story Setup?

Story Setup fits situations like: tasks that involve Agent instruction files.

How do I install Story Setup in Claude Code?

Run `npx skills add uu201/character-arc --skill story-setup -a claude-code`. Or copy the skill folder (resources/skills/oh-story-claudecode/story-setup in uu201/character-arc) into .claude/skills/story-setup in your project. Claude Code loads it when a task matches its description.

How do I install Story Setup in Codex?

Run `npx skills add uu201/character-arc --skill story-setup -a codex`. Or copy the skill folder (resources/skills/oh-story-claudecode/story-setup in uu201/character-arc) into .agents/skills/story-setup in your project. Codex loads it when a task matches its description.

Can I use Story Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add uu201/character-arc --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.

What does Story Setup need to run?

SKILL.md names no scripts, command-line tools or credentials: Story Setup is instructions for the agent only.

Does Story Setup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Story Setup safe to install?

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.

What licence does Story Setup use?

Story Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Story Setup use?

About 2k tokens (SKILL.md is roughly 8.2k 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 119k tokens, read only when the agent opens those files.

What are the alternatives to Story Setup?

Skills that share tags, products or a category with Story Setup: Using Agent Skills (addyosmani/agent-skills, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Writing For Agents (bestofjs/bestofjs, 3.1k 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.

Who maintains Story Setup?

uu201 (a GitHub user) maintains it in uu201/character-arc, which has 579 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 3, 2026.

Source: uu201/character-arc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.