关于 skill-creator
Skill Creator 是用于按既定结构和规范创建 Claude Code 技能的技能,指导作者完成分类、SKILL.md、示例、参考文件和质量检查。
主要功能
- 01定义技能用途与类别
- 02提供 SKILL.md 前置信息及内容模板
- 03规划可选参考文件结构
- 04指导编写可用于生产的示例
- 05提供完整性与一致性检查清单
适用场景
- 01创建新的 Claude Code 技能
- 02按类别目录组织技能
- 03依据格式规范检查技能
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ patricio0312rev/ skills --skill skill-creator安装后在 Claude Code 中输入/skill-creator确认已加载。
详细介绍
技能创建器
按照既定约定生成可用于生产环境的 Claude Code 技能。
核心工作流
- 定义技能用途:明确名称、描述和使用场景
- 确定类别:放入正确的文件夹(foundation、frontend、backend 等)
- 创建 SKILL.md:包含 frontmatter 和内容的主技能文件
- 添加参考文件:可选的 templates.md、conventions.md 或 patterns.md
- 包含示例:可用于生产环境的代码示例
- 编写检查清单:输出验证检查清单
技能类别
| 类别 | 路径 | 用途 |
|---|---|---|
| 基础 | foundation/ | 项目设置、开发环境、git、文档 |
| 前端 | frontend/ | React、Vue、UI 组件、样式、UX |
| 后端 | backend/ | API、身份验证、服务器逻辑、服务 |
| AI 工程 | ai-engineering/ | 大模型、RAG、Agent、提示词 |
| 架构 | architecture/ | 系统设计、ADR、技术决策 |
| CI/CD | ci-cd/ | 自动化、部署、流水线 |
| 数据库 | database-management/ | 迁移、查询、数据工程 |
| 测试 | testing/ | 单元测试、集成测试、端到端测试、模拟对象 |
| 安全 | security/ | 漏洞、身份验证、加固 |
| 性能 | performance/ | 可观测性、监控、优化 |
SKILL.md 模板
---
name: skill-name-in-kebab-case
description: One-line description of what the skill does and when to use it. Include trigger phrases like "use when users request X, Y, or Z".
---
# Skill Title
Brief tagline explaining the skill's value proposition.
## Core Workflow
1. **Step one**: Description
2. **Step two**: Description
3. **Step three**: Description
...
## [Main Content Sections]
### Section with Code Examples
\`\`\`typescript
// Production-ready code example
\`\`\`
### Patterns / Templates
Document reusable patterns with examples.
## Best Practices
- Practice one
- Practice two
- Practice three
## Output Checklist
Every output should include:
- [ ] Item one
- [ ] Item two
- [ ] Item three
参考文件结构
当技能需要补充文档时:
skill-name/
├── SKILL.md # Main skill file (required)
└── references/ # Optional reference materials
├── templates.md # Code/file templates
├── conventions.md # Standards and conventions
└── patterns.md # Reusable patterns
Frontmatter 要求
---
name: kebab-case-skill-name # Must match folder name
description: >
Clear description including:
- What the skill does
- When to use it
- Trigger phrases ("use when X", "create Y", "generate Z")
---
内容指南
代码示例
- 必须可用于生产环境,而非伪代码
- 适用时包含 TypeScript 类型
- 提供完整且可运行的示例
- 使用现代语法和最佳实践
应包含的章节
- 核心工作流:使用该技能的编号步骤
- 主要内容:模式、模板、示例
- 最佳实践:经过业界验证的建议
- 输出检查清单:验证事项
写作风格
- 使用主动语态和祈使语气
- 格式简洁,便于快速浏览
- 使用表格进行结构化比较
- 所有技术内容均使用代码块
技能质量标准
完整性
- 解决具体且定义清晰的问题
- 包含可运行的代码示例
- 描述中包含明确的触发短语
- 提供输出验证检查清单
一致性
- 遵循命名约定(kebab-case)
- 使用标准章节标题
- 与现有技能格式一致
- 放入正确的类别文件夹
实用性
- 示例可直接复制粘贴使用
- 覆盖常见使用场景
- 考虑边缘情况
- 在有帮助时引用外部文档
示例:创建新技能
第 1 步:定义技能
Name: api-rate-limiter
Category: backend
Purpose: Implement rate limiting for APIs
Triggers: "add rate limiting", "protect API", "throttle requests"
第 2 步:创建文件夹结构
mkdir -p backend/api-rate-limiter
touch "backend/api-rate-limiter/SKILL.md"
第 3 步:编写 SKILL.md
---
name: api-rate-limiter
description: Implements rate limiting for APIs using token bucket, sliding window, or fixed window algorithms. Use when users request "add rate limiting", "protect API from abuse", or "throttle requests".
---
# API Rate Limiter
Protect your APIs from abuse with production-ready rate limiting.
## Core Workflow
...
第 4 步:添加参考文件(如需要)
mkdir -p backend/api-rate-limiter/references
touch backend/api-rate-limiter/references/algorithms.md
输出检查清单
创建新技能时:
- 技能名称采用 kebab-case
- 描述中包含触发短语
- 放入正确的类别文件夹
- SKILL.md 遵循模板结构
- 代码示例可用于生产环境
- 包含“核心工作流”章节
- 包含“输出检查清单”章节
- 如有需要,添加参考文件
评论
支持 Markdown