Agent skill

how-to-create-claude-code-skill

A guide to creating Claude Code Skills.

Stars 232
Forks 15

Install this agent skill to your Project

npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/claudecode-npc/how-to-create-claude-code-skill

SKILL.md

Skills的文件结构有以下几种组织方式:

基本Skill结构 每个Skill都需要一个SKILL.md文件,包含YAML前置元数据1:


name: Your Skill Name description: Brief description of what this Skill does and when to use it

Your Skill Name

Instructions

[Clear, step-by-step guidance for Claude to follow]

Examples

[Concrete examples of using this Skill] 完整的Skill目录结构 随着Skill复杂性的增长,可以包含额外的支持文件2:

my-skill/ ├── SKILL.md (required) ├── reference.md (optional documentation) ├── examples.md (optional examples) ├── scripts/ │ └── helper.py (optional utility) └── templates/ └── template.txt (optional template) 渐进式披露模式示例 文档展示了一个PDF处理Skill的完整结构3:

pdf/ ├── SKILL.md # Main instructions (loaded when triggered) ├── FORMS.md # Form-filling guide (loaded as needed) ├── reference.md # API reference (loaded as needed) ├── examples.md # Usage examples (loaded as needed) └── scripts/ ├── analyze_form.py # Utility script (executed, not loaded) ├── fill_form.py # Form filling script └── validate.py # Validation script Skill存储位置 在Claude Code中,Skills可以存储在不同位置2:

个人Skills:

mkdir -p ~/.claude/skills/my-skill-name 项目Skills:

mkdir -p .claude/skills/my-skill-name 文件引用方式 在SKILL.md中可以引用其他文件2:

For advanced usage, see reference.md.

Run the helper script:

bash
python scripts/helper.py input.txt

## 技术要求

- 保持SKILL.md主体内容在500行以下以获得最佳性能[(4)](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices#technical-notes)
- YAML前置元数据字段限制:`name`最多64字符,`description`最多1024字符[(4)](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices#technical-notes)
- 避免深层嵌套引用,保持引用深度在一级以内[(3)](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices#skill-structure)

Claude只在需要时读取这些文件,使用渐进式披露来高效管理上下文[(1)](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview#skill-structure)。

## 其他要求

推荐的命名示例(动名词形式):

"Processing PDFs"
"Analyzing spreadsheets"
"Managing databases"
"Testing code"
"Writing documentation"
避免的命名方式:

模糊名称:"Helper"、"Utils"、"Tools"
过于通用:"Documents"、"Data"、"Files"
Skills的组织结构
对于包含多个相关Skills的项目,可以按功能域组织:

.claude/skills/
├── pdf-processing/
│   └── SKILL.md
├── excel-analysis/
│   └── SKILL.md
├── git-workflow/
│   └── SKILL.md
└── code-review/
    └── SKILL.md
这样的组织方式使得Skills更容易引用、讨论和维护6。

Expand your agent's capabilities with these related and highly-rated skills.

aiskillstore/marketplace

perigon-backend

Perigon ASP.NET Core + EF Core + Aspire conventions

232 15
Explore
aiskillstore/marketplace

perigon-agent

Pointers for Copilot/agents to apply Perigon conventions

232 15
Explore
aiskillstore/marketplace

perigon-angular

Angular 21+ standalone/Material/signal conventions for Perigon WebApp

232 15
Explore
aiskillstore/marketplace

fastapi-mastery

Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.

232 15
Explore
aiskillstore/marketplace

context7-efficient

Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

232 15
Explore
aiskillstore/marketplace

browser-use

Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.

232 15
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results