creating-skills
关于
This Claude Skill generates new Agent Skills with proper YAML frontmatter, progressive disclosure architecture, and best practices. Use it when developers need to create skill templates, build custom capabilities, or scaffold new skills. It includes comprehensive resources like templates, examples, documentation, and a validation tool.
技能文档
Creating Skills
This skill helps you create new Claude Agent Skills following Anthropic's official specifications and best practices.
This skill includes comprehensive resources:
- BEST_PRACTICES.md: Detailed authoring guidelines
- REFERENCE.md: Technical specifications and detailed examples
- README.md: Overview and quick start guide
- templates/: Ready-to-use skill templates
- examples/: Sample skills for reference
- scripts/validate_skill.py: Skill validation tool
When to Use This Skill
Invoke this skill when the user:
- Asks to create a new Claude skill
- Wants to generate a skill template
- Needs help structuring a custom capability
- Requests skill scaffolding or boilerplate
- Wants to validate an existing skill
Skill Creation Workflow
Step 1: Gather Requirements
Ask the user for:
-
Skill name: What should the skill be called?
- Lowercase letters, numbers, hyphens only
- Maximum 64 characters
- Use gerund form (e.g., "processing-data", "analyzing-logs")
- Avoid vague names like "helper" or "utils"
-
Skill description: What does the skill do and when should it be used?
- Maximum 1024 characters
- Write in third person
- Include specific triggers
- Format: "[What it does]. Use when [conditions]."
-
Skill complexity: Simple or complex?
- Simple: Single SKILL.md file (under 300 lines)
- Complex: SKILL.md + REFERENCE.md + FORMS.md + scripts
-
Core functionality: What are the main tasks?
Step 2: Choose and Copy Template
Simple Template (for focused, single-file skills):
cp -r templates/simple-skill-template/ ../your-skill-name/
Complex Template (for multi-file skills with extensive docs):
cp -r templates/complex-skill-template/ ../your-skill-name/
See REFERENCE.md section "Template Selection Guide" for detailed criteria.
Step 3: Customize the Template
Edit SKILL.md frontmatter:
---
name: your-skill-name
description: What it does. Use when triggers.
---
Fill in required sections:
- When to Use This Skill
- Core functionality with steps
- Common patterns
- Error handling
- Examples
- Validation checklist
For Complex Skills:
- Edit REFERENCE.md for technical details
- Edit FORMS.md for output templates
- Create scripts for automation
See REFERENCE.md section "Customization Guide" for detailed instructions.
Step 4: Validate the Skill
Run the validation script:
python scripts/validate_skill.py ../your-skill-name/SKILL.md --strict
The validator checks:
- YAML frontmatter syntax and fields
- Name format (lowercase-with-hyphens, ≤64 chars, gerund form)
- Description (≤1024 chars, includes triggers)
- No reserved words ("anthropic", "claude")
- File structure and references
- Best practices compliance
See REFERENCE.md section "Validation Tool" for detailed usage.
Step 5: Review Best Practices
Before finalizing:
cat BEST_PRACTICES.md
Key principles:
- Conciseness: Only include non-standard information
- Progressive Disclosure: Keep SKILL.md under 500 lines
- Freedom Levels: Match specificity to task fragility
- Consistent Terminology: Use same terms throughout
- Validation Steps: Include checklists for complex workflows
See BEST_PRACTICES.md for complete guidelines.
Frontmatter Requirements
Every SKILL.md must start with:
---
name: skill-name
description: Clear description. Use when triggers.
---
Quick Rules:
name: lowercase-with-hyphens, ≤64 chars, gerund formdescription: ≤1024 chars, includes "Use when..."- No XML tags or reserved words
See REFERENCE.md section "Frontmatter Specifications" for complete rules and examples.
Progressive Disclosure
Skills load in three levels:
Level 1 - Metadata (~100 tokens, always loaded):
- YAML frontmatter for skill discovery
Level 2 - Instructions (<5,000 tokens, triggered):
- Main SKILL.md content
Level 3 - Resources (on-demand):
- REFERENCE.md, FORMS.md, scripts
- Load only when referenced
Example:
## Basic Processing
[Instructions for common case]
## Advanced Techniques
See REFERENCE.md section "Advanced Methods" for details.
Example Skills
Simple Skill: Code Reviewer (examples/simple-skill-example/)
- Single SKILL.md file
- Clear workflow with checklists
- ~350 lines
Complex Skill: Data Analyzer (examples/complex-skill-example/)
- SKILL.md + REFERENCE.md + FORMS.md + scripts
- Statistical methods in REFERENCE.md
- Report templates in FORMS.md
View examples:
cat examples/simple-skill-example/SKILL.md
cat examples/complex-skill-example/SKILL.md
Quick Start
1. Choose template based on complexity:
- Simple: Single focused task, <300 lines
- Complex: Multiple features, needs extensive docs
2. Copy template:
cp -r templates/simple-skill-template/ ../my-skill/
3. Edit frontmatter and fill sections:
- Replace all [placeholders]
- Add specific examples
- Create validation checklist
4. Validate:
python scripts/validate_skill.py ../my-skill/SKILL.md --strict
5. Review BEST_PRACTICES.md and test
Validation Checklist
Before using a new skill:
Frontmatter:
- Valid name (gerund form, ≤64 chars)
- Description with triggers (≤1024 chars)
- No prohibited content
Content:
- "When to Use This Skill" section
- Core functionality with steps
- Examples included
- Validation checklist
- Concise (no unnecessary info)
Structure:
- Progressive disclosure applied
- SKILL.md under 500 lines (or split)
- Referenced files exist
Testing:
- Passed validator
- Functionally tested
- Works as expected
Common Patterns
Pattern 1: Simple Single-File Skill
- Use simple-skill-template
- Focus on one capability
- Include 2-3 examples
- Add validation checklist
Pattern 2: Complex Multi-File Skill
- Use complex-skill-template
- SKILL.md: High-level workflow with references
- REFERENCE.md: Technical details, algorithms
- FORMS.md: Output templates
- scripts/: Automation utilities
Pattern 3: Skill with Automation
- Include scripts/ directory
- Document script usage in SKILL.md
- Scripts execute without loading to context
- Use only pre-installed packages
Runtime Constraints
Remember when designing skills:
- ❌ No network access or external API calls
- ❌ No runtime package installation
- ✅ Only pre-installed packages
- ✅ Scripts execute via bash without context loading
- ✅ Progressive disclosure minimizes context usage
Error Handling
Common Issue: Validation Fails
- Check YAML syntax
- Verify name format (lowercase-with-hyphens)
- Ensure description includes "Use when..."
- Remove any reserved words
Common Issue: Skill Too Long
- Split into SKILL.md + REFERENCE.md
- Move technical details to REFERENCE.md
- Move templates to FORMS.md
- Keep SKILL.md under 500 lines
Common Issue: References Not Found
- Ensure referenced files exist
- Use relative paths
- Check file names match exactly
Additional Resources
Internal:
REFERENCE.md: Technical specs, detailed examples, troubleshootingBEST_PRACTICES.md: Complete authoring guidelinesREADME.md: Quick start and overviewtemplates/: Ready-to-use templatesexamples/: Working sample skills
External:
Getting Help
Review templates:
cat templates/simple-skill-template/SKILL.md
cat templates/complex-skill-template/SKILL.md
Study examples:
cat examples/simple-skill-example/SKILL.md
cat examples/complex-skill-example/SKILL.md
Read best practices:
cat BEST_PRACTICES.md
Check technical specs:
cat REFERENCE.md
Validate your skill:
python scripts/validate_skill.py ../your-skill/SKILL.md --strict
For detailed technical specifications, troubleshooting, and comprehensive examples, see REFERENCE.md.
快速安装
/plugin add https://github.com/jesseotremblay/claude-skills/tree/main/skill-creator在 Claude Code 中复制并粘贴此命令以安装该技能
GitHub 仓库
相关推荐技能
langchain
元LangChain是一个用于构建LLM应用程序的框架,支持智能体、链和RAG应用开发。它提供多模型提供商支持、500+工具集成、记忆管理和向量检索等核心功能。开发者可用它快速构建聊天机器人、问答系统和自主代理,适用于从原型验证到生产部署的全流程。
project-structure
元这个Skill为开发者提供全面的项目目录结构设计指南和最佳实践。它涵盖了多种项目类型包括monorepo、前后端框架、库和扩展的标准组织结构。帮助团队创建可扩展、易维护的代码架构,特别适用于新项目设计、遗留项目迁移和团队规范制定。
issue-documentation
元该Skill为开发者提供标准化的issue文档模板和指南,适用于创建bug报告、GitHub/Linear/Jira问题等场景。它能系统化地记录问题状况、复现步骤、根本原因、解决方案和影响范围,确保团队沟通清晰高效。通过实施主流问题跟踪系统的最佳实践,帮助开发者生成结构完整的故障排除文档和事件报告。
llamaindex
元LlamaIndex是一个专门构建RAG应用的开发框架,提供300多种数据连接器用于文档摄取、索引和查询。它具备向量索引、查询引擎和智能代理等核心功能,支持构建文档问答、知识检索和聊天机器人等数据密集型应用。开发者可用它快速搭建连接私有数据与LLM的RAG管道。
