mcpField
C
create-agent-skills

create-agent-skills

github.com/glittercowboyAgent 工作流2.0k503 次安装30 周前更新
代码仓库

关于 create-agent-skills

create-agent-skills 指导 Claude 用户设计和维护基于文件系统的技能,涵盖结构、路由、渐进式披露,以及创建、审查和扩展流程。

主要功能

  1. 01技能结构与 XML 规范
  2. 02基于路由的工作流选择
  3. 03渐进式披露指导
  4. 04创建、审查与更新流程

适用场景

  1. 01构建任务执行技能
  2. 02审查或修改现有技能
  3. 03添加工作流、参考资料、模板或脚本

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/glittercowboy/taches-cc-resources --skill create-agent-skills

安装后在 Claude Code 中输入/create-agent-skills确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.DS_Store
references/
api-security.md
be-clear-and-direct.md
common-patterns.md
core-principles.md
executable-code.md
iteration-and-testing.md
recommended-structure.md
skill-structure.md
use-xml-tags.md
using-scripts.md
using-templates.md
workflows-and-validation.md
templates/
router-skill.md
simple-skill.md
workflows/
add-reference.md
add-script.md
add-template.md
add-workflow.md
audit-skill.md
create-domain-expertise-skill.md
create-new-skill.md
get-guidance.md
upgrade-to-router.md
verify-skill.md

详细介绍

<essential_principles>

技能的工作方式

技能是基于文件系统的模块化能力,可按需提供领域专业知识。本技能介绍如何创建有效的技能。

1. 技能就是提示词

所有提示词最佳实践都适用。表达清晰、直接,并使用 XML 结构。假设 Claude 很聪明——只补充 Claude 尚不了解的上下文。

2. SKILL.md 始终会加载

调用技能时,Claude 会读取 SKILL.md。利用这一保证:

  • 将核心原则放入 SKILL.md(不可跳过)
  • 将工作流专属内容放入 workflows/
  • 将可复用知识放入 references/
3. 复杂技能的路由器模式
skill-name/
├── SKILL.md              # Router + principles
├── workflows/            # Step-by-step procedures (FOLLOW)
├── references/           # Domain knowledge (READ)
├── templates/            # Output structures (COPY + FILL)
└── scripts/              # Reusable code (EXECUTE)

SKILL.md 询问“你想做什么?”→ 路由到工作流 → 工作流指定要读取哪些参考资料。

各文件夹的用途:

  • workflows/ - Claude 遵循的多步骤流程
  • references/ - Claude 用于获取上下文的领域知识
  • templates/ - Claude 可复制并填写的统一输出结构(计划、规范、配置)
  • scripts/ - Claude 可原样运行的可执行代码(部署、设置、API 调用)
4. 纯 XML 结构

技能正文中不要使用 Markdown 标题(#、##、###)。请使用具有语义的 XML 标签:

<objective>...</objective>
<process>...</process>
<success_criteria>...</success_criteria>

在内容中保留 Markdown 格式(粗体、列表、代码块)。

5. 渐进式披露

SKILL.md 不超过 500 行。将详细内容拆分到参考文件中。仅加载当前工作流所需的内容。 </essential_principles>

你想做什么?
  1. 创建新技能
  2. 审查/修改现有技能
  3. 添加组件(工作流/参考资料/模板/脚本)
  4. 获取指导

请等待回复后再继续。

| 回复 | 下一步操作 | 工作流 | |----------|-------------|----------| | 1、"create"、"new"、"build" | 询问:“要创建任务执行型技能,还是领域专业知识型技能?” | 路由到相应的创建工作流 | | 2、"audit"、"modify"、"existing" | 询问:“技能路径是什么?” | 路由到相应的工作流 | | 3、"add"、"component" | 询问:“要添加什么?(workflow/reference/template/script)” | workflows/add-{type}.md | | 4、"guidance"、"help" | 提供常规指导 | workflows/get-guidance.md |

选项 1(创建)的渐进式披露:

  • 如果用户选择“任务执行型技能”→ workflows/create-new-skill.md
  • 如果用户选择“领域专业知识型技能”→ workflows/create-domain-expertise-skill.md

选项 3(添加组件)的渐进式披露:

  • 如果用户指定 workflow → workflows/add-workflow.md
  • 如果用户指定 reference → workflows/add-reference.md
  • 如果用户指定 template → workflows/add-template.md
  • 如果用户指定 script → workflows/add-script.md

基于意图的路由(如果用户表达了明确意图,但未选择菜单选项):

  • “审查此技能”、“检查技能”、“评审”→ workflows/audit-skill.md
  • “验证内容”、“检查是否为最新”→ workflows/verify-skill.md
  • “创建领域专业知识”、“详尽的知识库”→ workflows/create-domain-expertise-skill.md
  • “为 X 创建技能”、“构建新技能”→ workflows/create-new-skill.md
  • “添加工作流”、“添加参考资料”等 → workflows/add-{type}.md
  • “升级为路由器”→ workflows/upgrade-to-router.md

阅读工作流后,请严格遵循其中的说明。

<quick_reference>

技能结构速查

简单技能(单文件):

---
name: skill-name
description: What it does and when to use it.
---

<objective>What this skill does</objective>
<quick_start>Immediate actionable guidance</quick_start>
<process>Step-by-step procedure</process>
<success_criteria>How to know it worked</success_criteria>

复杂技能(路由器模式):

SKILL.md:
  <essential_principles> - Always applies
  <intake> - Question to ask
  <routing> - Maps answers to workflows

workflows/:
  <required_reading> - Which refs to load
  <process> - Steps
  <success_criteria> - Done when...

references/:
  Domain knowledge, patterns, examples

templates/:
  Output structures Claude copies and fills
  (plans, specs, configs, documents)

scripts/:
  Executable code Claude runs as-is
  (deploy, setup, API calls, data processing)

</quick_reference>

<reference_index>

领域知识

均位于 references/:

结构: recommended-structure.md、skill-structure.md 原则: core-principles.md、be-clear-and-direct.md、use-xml-tags.md 模式: common-patterns.md、workflows-and-validation.md 资源: using-templates.md、using-scripts.md 进阶: executable-code.md、api-security.md、iteration-and-testing.md </reference_index>

<workflows_index>

工作流

全部位于 workflows/ 中:

工作流用途
create-new-skill.md从头构建技能
create-domain-expertise-skill.md为 build/ 构建详尽的领域知识库
audit-skill.md根据最佳实践分析技能
verify-skill.md检查内容是否仍然准确
add-workflow.md向现有技能添加工作流
add-reference.md向现有技能添加参考资料
add-template.md向现有技能添加模板
add-script.md向现有技能添加脚本
upgrade-to-router.md将简单技能转换为路由器模式
get-guidance.md帮助确定要构建哪种技能
</workflows_index>

<yaml_requirements>

YAML Frontmatter

必填字段:

---
name: skill-name          # lowercase-with-hyphens, matches directory
description: ...          # What it does AND when to use it (third person)
---

命名约定:create-*、manage-*、setup-*、generate-*、build-* </yaml_requirements>

<success_criteria> 结构良好的技能:

  • 具有有效的 YAML Frontmatter
  • 使用纯 XML 结构(正文中不含 Markdown 标题)
  • 在 SKILL.md 中内联包含必要原则
  • 根据用户意图直接路由到适当的工作流
  • SKILL.md 少于 500 行
  • 仅在确有必要时提出最少的澄清问题
  • 已通过实际使用进行测试 </success_criteria>

评论

支持 Markdown