skills-best-practices
БесплатноБез исполняемых скриптовНе проверенOpinionated best practices for building Agent Skills - SKILL.md structure, frontmatter, description writing, progressive disclosure, testing, distribution…
от tenequm2 590 установок в других каталогахОб этом скилле
Skills Best Practices
Opinionated guide to building Agent Skills for any agent - distilled from the Agent Skills open standard, Anthropic's official guidance, and production experience, with deviations from the official line marked where they occur. Skills are folders (often just a single file) containing instructions, scripts, and resources that teach an agent how to handle specific tasks.
Quick Start
A minimal skill is a directory with a SKILL.md file:
my-skill/
├── SKILL.md # Required - instructions with YAML frontmatter
├── references/ # Optional - detailed docs loaded on demand
├── scripts/ # Optional - executable code
└── assets/ # Optional - templates, fonts, icons
Minimal SKILL.md:
---
name: my-skill-name
description: What it does. Use when [specific triggers].
---
# My Skill Name
[Instructions here]
Only name and description are required in frontmatter.
Core Design Principles
Single File vs. references/ (Most Important)
Default to a single SKILL.md. One file can be pasted to a person, gisted, embedded in a CLI binary, and printed by a <tool> skill subcommand - a directory cannot. Split into references/ only when both hold:
- Conditional loading: a meaningful chunk of content is needed by only a subset of invocations (e.g. a tracked-changes doc most DOCX tasks never touch). If every invocation reads everything anyway, splitting adds Read round-trips and costs shareability while saving nothing.
- Size pressure: the body exceeds the recommended budget below.
Distribution is a veto. If the skill must travel as one file - shipped inside a CLI, printed by a command, shared by paste - stay single-file regardless of size and condense instead. Condensing means cutting redundancy, filler, and over-explanation while preserving every load-bearing instruction; losing substance to hit a line count is the failure mode, not the fix. See the single-file CLI-embedded pattern under Patterns.
Size guidance (opinionated thresholds drawn from experience, not enforced spec limits) - measure with wc -c SKILL.md. Chars track token cost closely (~4 chars per token); line counts are not a metric - identical content varies 2x in lines by formatting style:
| Tier | Chars | Beyond it |
|---|---|---|
| Recommended | 25k | Condense carefully; split only if the conditional-loading test passes |
| Hard ceiling | 50k | Must condense or split |
Official Anthropic guidance says to split at 500 lines. That advice assumes registry-installed skills with rarely-needed subtopics, and measures size in a unit that formatting distorts - this skill deliberately deviates on both.
When a skill does split, information loads in three levels:
| Level | When Loaded | Token Cost | Content |
|---|---|---|---|
| 1: Metadata | Always (startup) | ~`chars / 4 + 25` - see Length | name + description from frontmatter |
| 2: Instructions | When skill triggers | <5k tokens (recommended) | SKILL.md body |
| 3: Resources | As needed | Effectively unlimited | Bundled files, scripts |
Reference detail files from SKILL.md so they load only when the task requires them:
## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md)
- **API reference**: See [reference.md](reference.md)
Composability
Skills work alongside other skills. Don't assume yours is the only one loaded.
Portability
Skills work across Claude.ai, Claude Code, API, and Agent SDK without modification (if dependencies are available).
Writing the Description (Critical)
The description is the single most important field - it determines when your skill activates. Claude uses it to decide relevance from potentially 100+ available skills.
Rules
- Write in third person ("Processes files..." - first or second person breaks discovery)
- Include WHAT it does + WHEN to use it
- No XML angle brackets; see Length for the size target
- Be slightly "pushy" - Claude tends to undertrigger rather than overtrigger
- Include specific trigger phrases users would naturally say, plus file types where relevant
- Write natural prose, not keyword dumps - matching is semantic, so a long "Triggers on X, Y, Z..." list adds little over a clear sentence
- If the skill depends on an MCP server, name it ("...via MCP. Requires Linear MCP server connected.")
Length
Target 250 characters. The spec's 1024 is a ceiling, not a budget. The description is the only part of a skill that costs tokens on every turn of every session, whether or not the skill ever fires. Past ~250 chars you are diluting the trigger, not sharpening it: descriptions are dispatch signals, not summaries.
Compressing an over-long description, in the order that usually pays:
- Cut stack enumerations restated in prose. Listing the stack once is e
Установить skills-best-practices в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл skills-best-practices?
Opinionated best practices for building Agent Skills - SKILL.md structure, frontmatter, description writing, progressive disclosure, testing, distribution. Use when creating or reviewing a skill, or debugging why one will not trigger.
Как установить скилл skills-best-practices?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл skills-best-practices запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic