scaffold-skill
Guide for creating and registering a new agent skill.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Follow this guide to add a new capability (skill/workflow) to the agent.
Quality Standards
Frontmatter Requirements
- name: Maximum 64 characters, lowercase letters/numbers/hyphens only, must match directory name
- description: Maximum 1024 characters, must describe both what the skill does and when to use it, third-person voice only ("Processes files..." not "I process files...")
Content Structure
- Opening Statement: Brief instruction on what this skill accomplishes
- Numbered Steps: Clear, actionable steps with sub-bullets for details
-
Templates: Reference template files for code generation (e.g.,
templates/Handler.cs) - Token Budget: Keep SKILL.md body under 500 lines; split larger content into separate files
- Progressive Disclosure: Link to detailed files rather than inlining all content
- // turbo Markers: Mark automated steps that can run without user confirmation
- Related Skills Section: Document skill dependencies and relationships
Checklist
- ✅ Description includes both "what" and "when to use"
- ✅ Description uses third-person voice
- ✅ SKILL.md body under 500 lines
- ✅ Clear, actionable steps numbered sequentially
- ✅ Template file references for code artifacts
- ✅ Related Skills section with prerequisites and next steps
- ✅ // turbo markers for automated steps
- ✅ No time-sensitive information
- ✅ Consistent terminology throughout
Steps to Create a Skill
-
Plan
-
Slug: Choose a kebab-case name (e.g.,
scaffold-feature) - Goal: Define what the skill achieves and the steps required
-
Slug: Choose a kebab-case name (e.g.,
-
Create Skill File
- Create directory
.claude/skills/{slug}/ - Create file
.claude/skills/{slug}/SKILL.mdusing templates/SKILL.md - Replace all
{placeholders}with your actual content
- Create directory
-
Create Supporting Resources (If Needed)
- If the skill generates code or other artifacts, create
.claude/skills/{slug}/templates/ -
Source Code Templates: Create
.cs,.razor, or other source files with placeholders- Use placeholders:
{ClassName},{Resource},{Property}, etc. - Examples:
Command.cs,Handler.cs,Endpoint.cs,Page.razor
- Use placeholders:
-
Configuration Templates: Create
.json,.yaml, or config files if needed -
Documentation: Add additional
.mdfiles for complex workflows- Keep references one level deep (link directly from SKILL.md)
- Add table of contents for files over 100 lines
-
Scripts: Include shell scripts or PowerShell for automation steps
- Use forward slashes for paths (Unix-style, works everywhere)
- If the skill generates code or other artifacts, create
-
Register in AGENTS.md
- Add the skill to the root
AGENTS.mdfile under## Agent Skills - Include the
/skill-slugcommand format with brief description
- Add the skill to the root
// turbo 5. Verify
- Check
.claude/skills/{slug}/SKILL.mdfollows the template structure - Ensure all links to related skills and documentation are valid
- Confirm template files use consistent placeholder naming
Related Skills
Prerequisites:
- None - this is a foundational skill
Next Steps:
- Test the skill by invoking it with
/skill-slug
See Also:
- Relevant AGENTS.md files
- Other skills in
.claude/skills/for examples
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!