create-repo-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate a repo skill
创建仓库Skill
The layout (invariants)
目录结构(不变规则)
- is the only canonical home for every skill — public product skills (SEO workflows customers install) and internal repo skills (agent workflows like
.agents/skills/<kebab-name>/SKILL.md,merge-ready, this one) alike. Users install from this tree viapapercuts.npx skills add every-app/open-seo - contains only symlinks into
.claude/skills/— one per skill that Claude Code agents working in this repo should auto-load. Never copy files:.agents/skills/is prettier-ignored (vendored skills are hash-pinned) while.agents/skills/is not, so a copy gets reformatted on the.claude/skills/side and the trees drift — this happened to three skills before symlinks became the rule..claudedoes not descend into the symlinks, so a symlink stays byte-identical to its canonical source by construction.prettier --check . - Vendored skills (external origin) are hash-pinned in (currently only
skills-lock.json, fromwebapp-testing). Never hand-edit a vendored skill's content; re-vendor with theanthropics/skillsCLI so the lock hash stays valid.skills - is part of the review control plane (see
.agents/skills/**): changes require explicit maintainer review via CODEOWNERS. Make the change on a branch and call it out in the PR — never treat skill edits as incidental.AGENTS.md
- 是所有Skill的唯一规范存储位置——无论是公开产品Skill(客户可安装的SEO工作流)还是内部仓库Skill(如
.agents/skills/<kebab-name>/SKILL.md、merge-ready以及本Skill这类Agent工作流)。用户可通过papercuts从该目录安装Skill。npx skills add every-app/open-seo - 仅包含指向
.claude/skills/的符号链接——每个链接对应仓库中Claude Code agents应自动加载的Skill。切勿复制文件:.agents/skills/已被prettier忽略(第三方Skill采用哈希固定版本),而.agents/skills/未被忽略,因此复制的文件会在.claude侧被格式化,导致两个目录内容不一致——在采用符号链接规则前,已有三个Skill出现过这种情况。.claude/skills/不会遍历符号链接,因此符号链接会与规范源文件保持完全一致。prettier --check . - 第三方Skill(外部来源)在中采用哈希固定版本(目前仅有来自
skills-lock.json的anthropics/skills)。切勿手动编辑第三方Skill的内容;请使用webapp-testingCLI重新引入,以确保锁定哈希值有效。skills - 属于审核控制平面(详见
.agents/skills/**):修改需通过CODEOWNERS获得维护者的明确审核。请在分支上进行修改,并在PR中说明——切勿将Skill编辑视为附带操作。AGENTS.md
Creating a skill
创建Skill
-
and write
mkdir .agents/skills/<kebab-name>with frontmatter:SKILL.mdmarkdown--- name: <kebab-name> # must match the directory name description: <what it does + explicit "use when ..." triggers> metadata: internal: true # ONLY for internal repo skills — omit for product skills --- -
Decide which kind it is:
-
Internal repo skill (agent/dev workflow): set. Do NOT register it on any public surface. If repo agents should auto-load it, add the mirror symlink:
metadata.internal: truebashln -s ../../.agents/skills/<name> .claude/skills/<name> -
Public product skill (a customer-facing SEO workflow): noflag, usually no
internalsymlink (repo agents don't need customer workflows). Register it everywhere users discover skills:.claude/skills- — docs page (mirror a sibling like
web/content/docs/skills/<name>.mdx: what it does, when to use it, what you get back, how to get the best result)competitor-analysis.mdx - — bullet in the right workflow section
web/content/docs/skills/index.md - — nav entry
web/content/docs/skills/meta.json - — one line in the "What each workflow does" roster
.agents/skills/seo-coach/SKILL.md - Optional: and
web/src/lib/feature-pages.tsif it deserves marketing/setup placementweb/content/docs/skills/setup.md
-
-
If the skill references MCP tools, use exact tool names and keep them in sync with— the tool names in skills are load-bearing for agents following them.
src/server/mcp/server.ts -
(covers the docs pages;
pnpm format:writeitself is intentionally untouched), then commit. Skill prose follows.agents/skillsstandards when public.openseo-review-web-content
-
并编写带前置元数据的
mkdir .agents/skills/<kebab-name>:SKILL.mdmarkdown--- name: <kebab-name> # 必须与目录名称一致 description: <功能描述 + 明确的“适用场景...”触发条件> metadata: internal: true # 仅适用于内部仓库Skill——产品Skill请省略 --- -
确定Skill类型:
-
内部仓库Skill(Agent/开发工作流):设置。无需在任何公开平台注册。若仓库agents需自动加载该Skill,请添加镜像符号链接:
metadata.internal: truebashln -s ../../.agents/skills/<name> .claude/skills/<name> -
公开产品Skill(面向客户的SEO工作流):无标记,通常无需在
internal中创建符号链接(仓库agents无需使用客户工作流)。需在所有用户发现Skill的渠道进行注册:.claude/skills- —— 文档页面(可参考同类文档如
web/content/docs/skills/<name>.mdx:包含功能、适用场景、返回结果、优化技巧)competitor-analysis.mdx - —— 在对应工作流章节添加项目符号
web/content/docs/skills/index.md - —— 导航条目
web/content/docs/skills/meta.json - —— 在“各工作流功能”列表中添加一行描述
.agents/skills/seo-coach/SKILL.md - 可选:若需营销/安装引导,可更新和
web/src/lib/feature-pages.tsweb/content/docs/skills/setup.md
-
-
若Skill引用MCP工具,请使用精确的工具名称,并与保持同步——Skill中的工具名称对执行该Skill的agents至关重要。
src/server/mcp/server.ts -
执行(会格式化文档页面;
pnpm format:write本身有意不被处理),然后提交代码。公开Skill的文案需遵循.agents/skills标准。openseo-review-web-content
Sync check (run when in doubt, and after any skill change)
同步检查(存疑时或任何Skill修改后执行)
bash
for d in .claude/skills/*/; do n=$(basename "$d")
[ -L "${d%/}" ] || echo "DRIFT RISK — not a symlink: $n"
[ -e ".agents/skills/$n" ] || echo "BROKEN — no canonical source: $n"
doneAnything flagged: move the canonical content to (reconciling differences deliberately — diff both sides first, newest intent wins), delete the copy, and replace it with the symlink.
.agents/skills/<name>/.claudebash
for d in .claude/skills/*/; do n=$(basename "$d")
[ -L "${d%/}" ] || echo "DRIFT RISK — not a symlink: $n"
[ -e ".agents/skills/$n" ] || echo "BROKEN — no canonical source: $n"
done任何被标记的项:将规范内容移至(需先对比两侧差异,保留最新的意图),删除.claude侧的副本,替换为符号链接。
.agents/skills/<name>/