from line 6
66
77Good Skills are concise, well-structured, and tested with real usage. This guide provides practical authoring decisions to help you write Skills that Claude can discover and use effectively.
88
9For conceptual background on how Skills work, see the [Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
9For conceptual background on how Skills work, see [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
1010
1111## Core principles
1212
1313### Concise is key
1414
15The [context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is a public good. Your Skill shares the context window with everything else Claude needs to know, including:
15The [context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is a public good. Your Skill shares the context window with everything else Claude needs, including:
1616
1717* The system prompt
1818* Conversation history
from line 19
1919* Other Skills' metadata
2020* Your actual request
2121
22Not every token in your Skill has an immediate cost. At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads SKILL.md only when the Skill becomes relevant, and reads additional files only as needed. However, being concise in SKILL.md still matters: once Claude loads it, every token competes with conversation history and other context.
22Not every token in your Skill has an immediate cost. At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads `SKILL.md` only when the Skill becomes relevant, and reads additional files only as needed. However, being concise in `SKILL.md` still matters: once Claude loads it, every token competes with conversation history and other context.
2323
2424**Default assumption:** Claude is already very smart
2525
from line 26
2626Only add context Claude doesn't already have. Challenge each piece of information:
2727
2828* "Does Claude really need this explanation?"
29* "Can I assume Claude knows this?"
29* "Can I assume Claude has this information?"
3030* "Does this paragraph justify its token cost?"
3131
3232**Good example: Concise** (approximately 50 tokens):
from line 162
162162 * Cannot contain XML tags
163163 * Should describe what the Skill does and when to use it
164164
165 For complete Skill structure details, see the [Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#skill-structure).
165 For complete Skill structure details, see [Skill structure](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#skill-structure) in Agent Skills.
166166</Note>
167167
168168### Naming conventions
from line 194
194194Consistent naming makes it easier to:
195195
196196* Reference Skills in documentation and conversations
197* Understand what a Skill does at a glance
197* Understand what a Skill does from its name
198198* Organize and search through multiple Skills
199199* Maintain a professional, cohesive skill library
200200
201201### Writing effective descriptions
202202
203The `description` field enables Skill discovery and should include both what the Skill does and when to use it.
203The `description` field makes Skill discovery possible and should include both what the Skill does and when to use it.
204204
205205<Warning>
206206 **Always write in third person**. The description is injected into the system prompt, and inconsistent point-of-view can cause discovery problems.
from line 212
212212
213213**Be specific and include key terms**. Include both what the Skill does and specific triggers/contexts for when to use it.
214214
215Each Skill has exactly one description field. The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills. Your description must provide enough detail for Claude to know when to select this Skill, while the rest of SKILL.md provides the implementation details.
215Each Skill has exactly one description field. The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills. Your description must provide enough detail for Claude to determine when to select this Skill, whereas the rest of `SKILL.md` provides the implementation details.
216216
217217Effective examples:
218218
from line 234
234234description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
235235```
236236
237Avoid vague descriptions like these:
237Avoid vague descriptions such as these:
238238
239239```yaml
240240description: Helps with documents
from line 250
250250
251251### Progressive disclosure patterns
252252
253SKILL.md serves as an overview that points Claude to detailed materials as needed, like a table of contents in an onboarding guide. For an explanation of how progressive disclosure works, see [How Skills work](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#how-skills-work) in the overview.
253`SKILL.md` serves as an overview that points Claude to detailed materials as needed, like a table of contents in an onboarding guide. For an explanation of how progressive disclosure works, see [How Skills work](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#how-skills-work) in the overview.
254254
255255**Practical guidance:**
256256
257* Keep SKILL.md body under 500 lines for optimal performance
257* Keep `SKILL.md` body under 500 lines for optimal performance
258258* Split content into separate files when approaching this limit
259259* Use the following patterns to organize instructions, code, and resources effectively
260260
261261#### Visual overview: From simple to complex
262262
263A basic Skill starts with just a SKILL.md file containing metadata and instructions:
263A basic Skill starts with just a `SKILL.md` file containing metadata and instructions:
264264
265265<Frame>
266266 
from line 269
269269As your Skill grows, you can bundle additional content that Claude loads only when needed:
270270
271271<Frame>
272 
272 
273273</Frame>
274274
275275The complete Skill directory structure might look like this:
from line 286
286286
287287 * `scripts/`
288288
289 * `analyze_form.py`: Utility script (executed, not loaded)
289 * `analyze_form.py`: Utility script (run, not loaded)
290290 * `fill_form.py`: Form filling script
291291 * `validate.py`: Validation script
292292
from line 316
316316**Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns
317317````
318318
319Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.
319Claude loads `FORMS.md`, `REFERENCE.md`, or `EXAMPLES.md` only when needed.
320320
321321#### Pattern 2: Domain-specific organization
322322
from line 356
356356
357357#### Pattern 3: Conditional details
358358
359Show basic content, link to advanced content:
359Show basic content and link to advanced content:
360360
361361```markdown
362362# DOCX Processing
from line 373
373373**For OOXML details**: See [OOXML.md](OOXML.md)
374374```
375375
376Claude reads REDLINING.md or OOXML.md only when the user needs those features.
376Claude reads `REDLINING.md` or `OOXML.md` only when the user needs those features.
377377
378378### Avoid deeply nested references
379379
380Claude may partially read files when they're referenced from other referenced files. When encountering nested references, Claude might use commands like `head -100` to preview content rather than reading entire files, resulting in incomplete information.
380Claude might partially read files when they're referenced from other referenced files. When encountering nested references, Claude might use commands such as `head -100` to preview content rather than reading entire files, resulting in incomplete information.
381381
382**Keep references one level deep from SKILL.md**. All reference files should link directly from SKILL.md to ensure Claude reads complete files when needed.
382**Keep references one level deep from `SKILL.md`**. All reference files should link directly from `SKILL.md` to ensure Claude reads complete files when needed.
383383
384**Bad example: Too deep**:
384**Bad example: Too deep:**
385385
386386```markdown
387387# SKILL.md
from line 394
394394Here's the actual information...
395395```
396396
397**Good example: One level deep**:
397**Good example: One level deep:**
398398
399399```markdown
400400# SKILL.md
from line 405
405405**Examples**: See [examples.md](examples.md)
406406```
407407
408### Structure longer reference files with table of contents
408### Structure longer reference files with a table of contents
409409
410410For reference files longer than 100 lines, include a table of contents at the top. This ensures Claude can see the full scope of available information even when previewing with partial reads.
411411
from line 430
430430
431431Claude can then read the complete file or jump to specific sections as needed.
432432
433For details on how this filesystem-based architecture enables progressive disclosure, see the [Runtime environment](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#runtime-environment) section later in this guide.
433For details on how this filesystem-based architecture makes progressive disclosure possible, see the [Runtime environment](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#runtime-environment) section later in this guide.
434434
435435## Workflows and feedback loops
436436
from line 549
5495495. Finalize and save the document
550550```
551551
552This shows the validation loop pattern using reference documents instead of scripts. The "validator" is STYLE\_GUIDE.md, and Claude performs the check by reading and comparing.
552This shows the validation loop pattern using reference documents instead of scripts. The "validator" is `STYLE_GUIDE.md`, and Claude performs the check by reading and comparing.
553553
554554**Example 2: Document editing process** (for Skills with code):
555555
from line 614
614614
615615**Bad - Inconsistent:**
616616
617* Mix "API endpoint", "URL", "API route", "path"
618* Mix "field", "box", "element", "control"
619* Mix "extract", "pull", "get", "retrieve"
617* Mix "API endpoint," "URL," "API route," "path"
618* Mix "field," "box," "element," "control"
619* Mix "extract," "pull," "get," "retrieve"
620620
621621Consistency helps Claude parse and follow instructions.
622622
from line 740
740740```
741741
742742<Tip>
743 If workflows become large or complicated with many steps, consider pushing them into separate files and tell Claude to read the appropriate file based on the task at hand.
743 If workflows become large or complicated with many steps, consider pushing them into separate files and tell Claude to read the appropriate file based on the current task.
744744</Tip>
745745
746746## Evaluation and iteration
from line 751
751751
752752**Evaluation-driven development:**
753753
7541. **Identify gaps:** Run Claude on representative tasks without a Skill. Document specific failures or missing context
7552. **Create evaluations:** Build three scenarios that test these gaps
7563. **Establish baseline:** Measure Claude's performance without the Skill
7574. **Write minimal instructions:** Create just enough content to address the gaps and pass evaluations
7585. **Iterate:** Execute evaluations, compare against baseline, and refine
7541. **Identify gaps:** Run Claude on representative tasks without a Skill. Document specific failures or missing context.
7552. **Create evaluations:** Build three scenarios that test these gaps.
7563. **Establish baseline:** Measure Claude's performance without the Skill.
7574. **Write minimal instructions:** Create just enough content to address the gaps and pass evaluations.
7585. **Iterate:** Run evaluations, compare against baseline, and refine.
759759
760This approach ensures you're solving actual problems rather than anticipating requirements that may never materialize.
760This approach ensures you're solving actual problems rather than anticipating requirements that might never materialize.
761761
762762**Evaluation structure:**
763763
from line 775
775775```
776776
777777<Note>
778 This example demonstrates a data-driven evaluation with a simple testing rubric. There is not currently a built-in way to run these evaluations. Users can create their own evaluation system. Evaluations are your source of truth for measuring Skill effectiveness.
778 This example demonstrates a data-driven evaluation with a simple testing rubric. There is not currently a built-in way to run these evaluations. You can create your own evaluation system. Evaluations are your source of truth for measuring Skill effectiveness.
779779</Note>
780780
781781### Develop Skills iteratively with Claude
782782
783The most effective Skill development process involves Claude itself. Work with one instance of Claude ("Claude A") to create a Skill that is used by other instances ("Claude B"). Claude A helps you design and refine instructions, while Claude B tests them in real tasks. This works because Claude models understand both how to write effective agent instructions and what information agents need.
783The most effective Skill development process involves Claude itself. Work with one instance of Claude ("Claude A") to create a Skill that is used by other instances ("Claude B"). Claude A helps you design and refine instructions, whereas Claude B tests them in real tasks. This works because Claude models can both write effective agent instructions and identify what information agents need.
784784
785785**Creating a new Skill:**
786786
from line 793
7937933. **Ask Claude A to create a Skill:** "Create a Skill that captures this BigQuery analysis pattern we just used. Include the table schemas, naming conventions, and the rule about filtering test accounts."
794794
795795 <Tip>
796 Claude models understand the Skill format and structure natively. You don't need special system prompts or a "writing skills" skill to get Claude to help create Skills. Simply ask Claude to create a Skill and it generates properly structured SKILL.md content with appropriate frontmatter and body content.
796 Claude models handle the Skill format and structure natively. You don't need special system prompts or a "writing skills" skill to get Claude to help create Skills. Ask Claude to create a Skill and it generates properly structured `SKILL.md` content with appropriate frontmatter and body content.
797797 </Tip>
798798
7997994. **Review for conciseness:** Check that Claude A hasn't added unnecessary explanations. Ask: "Remove the explanation about what win rate means - Claude already knows that."
from line 806
806806
807807**Iterating on existing Skills:**
808808
809The same hierarchical pattern continues when improving Skills. You alternate between:
809The same hierarchical pattern continues when improving Skills. You alternate among:
810810
811811* **Working with Claude A** (the expert who helps refine the Skill)
812812* **Testing with Claude B** (the agent using the Skill to perform real work)
from line 818
818818
819819 **Example observation:** "When I asked Claude B for a regional sales report, it wrote the query but forgot to filter out test accounts, even though the Skill mentions this rule."
820820
8213. **Return to Claude A for improvements:** Share the current SKILL.md and describe what you observed. Ask: "I noticed Claude B forgot to filter test accounts when I asked for a regional report. The Skill mentions filtering, but maybe it's not prominent enough?"
8213. **Return to Claude A for improvements:** Share the current `SKILL.md` and describe what you observed. Ask: "I noticed Claude B forgot to filter test accounts when I asked for a regional report. The Skill mentions filtering, but maybe it's not prominent enough?"
822822
8234. **Review Claude A's suggestions:** Claude A might suggest reorganizing to make rules more prominent, using stronger language such as "MUST filter" instead of "always filter," or restructuring the workflow section.
8234. **Review Claude A's recommendations:** Claude A might recommend reorganizing to make rules more prominent, using stronger language such as "MUST filter" instead of "always filter," or restructuring the workflow section.
824824
8258255. **Apply and test changes:** Update the Skill with Claude A's refinements, then test again with Claude B on similar requests
826826
from line 828
828828
829829**Gathering team feedback:**
830830
8311. Share Skills with teammates and observe their usage
8311. Share Skills with teammates and observe their usage.
8328322. Ask: Does the Skill activate when expected? Are instructions clear? What's missing?
8333. Incorporate feedback to address gaps in your own usage patterns
8333. Incorporate feedback to address gaps in your own usage patterns.
834834
835**Why this approach works:** Claude A understands agent needs, you provide domain expertise, Claude B reveals gaps through real usage, and iterative refinement improves Skills based on observed behavior rather than assumptions.
835**Why this approach works:** Claude A identifies agent needs, you provide domain expertise, Claude B reveals gaps through real usage, and iterative refinement improves Skills based on observed behavior rather than assumptions.
836836
837837### Observe how Claude navigates Skills
838838
839839As you iterate on Skills, pay attention to how Claude actually uses them in practice. Watch for:
840840
841* **Unexpected exploration paths:** Does Claude read files in an order you didn't anticipate? This might indicate your structure isn't as intuitive as you thought
842* **Missed connections:** Does Claude fail to follow references to important files? Your links might need to be more explicit or prominent
843* **Overreliance on certain sections:** If Claude repeatedly reads the same file, consider whether that content should be in the main SKILL.md instead
844* **Ignored content:** If Claude never accesses a bundled file, it might be unnecessary or poorly signaled in the main instructions
841* **Unexpected exploration paths:** Does Claude read files in an order you didn't anticipate? This might indicate your structure isn't as intuitive as you thought.
842* **Missed connections:** Does Claude fail to follow references to important files? Your links might need to be more explicit or prominent.
843* **Overreliance on certain sections:** If Claude repeatedly reads the same file, consider whether that content should be in the main `SKILL.md` instead.
844* **Ignored content:** If Claude never accesses a bundled file, it might be unnecessary or poorly signaled in the main instructions.
845845
846Iterate based on these observations rather than assumptions. The 'name' and 'description' in your Skill's metadata are particularly critical. Claude uses these when determining whether to trigger the Skill in response to the current task. Make sure they clearly describe what the Skill does and when it should be used.
846Iterate based on these observations rather than assumptions. The `name` and `description` in your Skill's metadata are particularly critical. Claude uses these when determining whether to trigger the Skill in response to the current task. Make sure they clearly describe what the Skill does and when it should be used.
847847
848848## Anti-patterns to avoid
849849
from line 854
854854* ✓ **Good:** `scripts/helper.py`, `reference/guide.md`
855855* ✗ **Avoid:** `scripts\helper.py`, `reference\guide.md`
856856
857Unix-style paths work across all platforms, while Windows-style paths cause errors on Unix systems.
857Unix-style paths work across all platforms, whereas Windows-style paths cause errors on Unix systems.
858858
859859### Avoid offering too many options
860860
from line 936
936936
937937**Benefits of utility scripts:**
938938
939* More reliable than generated code
939* Are more reliable than generated code
940940* Save tokens (no need to include code in context)
941941* Save time (no code generation required)
942942* Ensure consistency across uses
from line 945
945945 
946946</Frame>
947947
948The preceding diagram shows how executable scripts work alongside instruction files. The instruction file (forms.md) references the script, and Claude can execute it without loading its contents into context.
948The preceding diagram shows how executable scripts work alongside instruction files. The instruction file (`forms.md`) references the script, and Claude can run it without loading its contents into context.
949949
950950**Important distinction:** Make clear in your instructions whether Claude should:
951951
952* **Execute the script** (most common): "Run `analyze_form.py` to extract fields"
952* **Run the script** (most common): "Run `analyze_form.py` to extract fields"
953953* **Read it as reference** (for complex logic): "See `analyze_form.py` for the field extraction algorithm"
954954
955955For most utility scripts, execution is preferred because it's more reliable and efficient. See the following [Runtime environment](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#runtime-environment) section for details on how script execution works.
from line 1019
10191019
10201020**Why this pattern works:**
10211021
1022* **Catches errors early:** Validation finds problems before changes are applied
1023* **Machine-verifiable:** Scripts provide objective verification
1024* **Reversible planning:** Claude can iterate on the plan without touching originals
1025* **Clear debugging:** Error messages point to specific problems
1022* **Catches errors early:** Validation finds problems before changes are applied.
1023* **Machine-verifiable:** Scripts provide objective verification.
1024* **Reversible planning:** Claude can iterate on the plan without touching originals.
1025* **Clear debugging:** Error messages point to specific problems.
10261026
10271027**When to use:** Batch operations, destructive changes, complex validation rules, high-stakes operations.
10281028
from line 1035
10351035* **claude.ai:** Can install packages from npm and PyPI and pull from GitHub repositories
10361036* **Claude API:** Has no network access and no runtime package installation
10371037
1038List required packages in your SKILL.md and verify they're available in the [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) documentation.
1038List required packages in your `SKILL.md` and verify they're available in the [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) documentation.
10391039
10401040### Runtime environment
10411041
from line 1045
10451045
10461046**How Claude accesses Skills:**
10471047
10481. **Metadata pre-loaded:** At startup, the name and description from all Skills' YAML frontmatter are loaded into the system prompt
10492. **Files read on-demand:** Claude uses bash Read tools to access SKILL.md and other files from the filesystem when needed
10503. **Scripts executed efficiently:** Utility scripts can be executed through bash without loading their full contents into context. Only the script's output consumes tokens
10514. **No context penalty for large files:** Reference files, data, or documentation don't consume context tokens until actually read
10481. **Metadata pre-loaded:** At startup, the name and description from all Skills' YAML frontmatter are loaded into the system prompt.
10492. **Files read on-demand:** Claude uses bash Read tools to access `SKILL.md` and other files from the filesystem when needed.
10503. **Scripts run efficiently:** Utility scripts can be run through bash without loading their full contents into context. Only the script's output consumes tokens.
10514. **No context penalty for large files:** Reference files, data, or documentation don't consume context tokens until actually read.
10521052
1053* **File paths matter:** Claude navigates your skill directory like a filesystem. Use forward slashes (`reference/guide.md`), not backslashes
1053* **File paths matter:** Claude navigates your skill directory like a filesystem. Use forward slashes (`reference/guide.md`), not backslashes.
10541054
1055* **Name files descriptively:** Use names that indicate content: `form_validation_rules.md`, not `doc2.md`
1055* **Name files descriptively:** Use names that indicate content: `form_validation_rules.md`, not `doc2.md`.
10561056
1057* **Organize for discovery:** Structure directories by domain or feature
1057* **Organize for discovery:** Structure directories by domain or feature.
10581058
10591059 * Good: `reference/finance.md`, `reference/sales.md`
10601060 * Bad: `docs/file1.md`, `docs/file2.md`
10611061
1062* **Bundle comprehensive resources:** Include complete API docs, extensive examples, large datasets; no context penalty until accessed
1062* **Bundle comprehensive resources:** Include complete API docs, extensive examples, and large datasets. These incur no context penalty until accessed.
10631063
1064* **Prefer scripts for deterministic operations:** Write `validate_form.py` rather than asking Claude to generate validation code
1064* **Prefer scripts for deterministic operations:** Write `validate_form.py` rather than asking Claude to generate validation code.
10651065
10661066* **Make execution intent clear:**
10671067
from line 1068
10681068 * "Run `analyze_form.py` to extract fields" (execute)
10691069 * "See `analyze_form.py` for the extraction algorithm" (read as reference)
10701070
1071* **Test file access patterns:** Verify Claude can navigate your directory structure by testing with real requests
1071* **Test file access patterns:** Verify Claude can navigate your directory structure by testing with real requests.
10721072
10731073**Example:**
10741074
from line 1082
10821082 * `sales.md` (pipeline data)
10831083 * `product.md` (usage analytics)
10841084
1085When the user asks about revenue, Claude reads SKILL.md, sees the reference to `reference/finance.md`, and calls bash to read just that file. The sales.md and product.md files remain on the filesystem, consuming zero context tokens until needed. This filesystem-based model is what enables progressive disclosure. Claude can navigate and selectively load exactly what each task requires.
1085When the user asks about revenue, Claude reads `SKILL.md`, finds the reference to `reference/finance.md`, and calls bash to read just that file. The `sales.md` and `product.md` files remain on the filesystem, consuming zero context tokens until needed. This filesystem-based model is what makes progressive disclosure possible. Claude can navigate and selectively load exactly what each task requires.
10861086
10871087For complete details on the technical architecture, see [How Skills work](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#how-skills-work) in the Skills overview.
10881088
from line 1104
11041104* `BigQuery` and `GitHub` are MCP server names
11051105* `bigquery_schema` and `create_issue` are the tool names within those servers
11061106
1107Without the server prefix, Claude may fail to locate the tool, especially when multiple MCP servers are available.
1107Without the server prefix, Claude might fail to locate the tool, especially when multiple MCP servers are available.
11081108
11091109### Avoid assuming tools are installed
11101110
from line 1128
11281128
11291129### YAML frontmatter requirements
11301130
1131The SKILL.md frontmatter requires `name` and `description` fields with specific validation rules:
1131The `SKILL.md` frontmatter requires `name` and `description` fields with specific validation rules:
11321132
11331133* `name`: Maximum 64 characters, lowercase letters/numbers/hyphens only, no XML tags, no reserved words
11341134* `description`: Maximum 1,024 characters, non-empty, no XML tags
11351135
1136See the [Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#skill-structure) for complete structure details.
1136See [Skill structure](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#skill-structure) in Agent Skills for complete structure details.
11371137
11381138### Token budgets
11391139
1140Keep SKILL.md body under 500 lines for optimal performance. If your content exceeds this, split it into separate files using the progressive disclosure patterns described earlier. For architectural details, see the [Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#how-skills-work).
1140Keep `SKILL.md` body under 500 lines for optimal performance. If your content exceeds this, split it into separate files using the progressive disclosure patterns described earlier. For architectural details, see [How Skills work](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#how-skills-work).
11411141
11421142## Checklist for effective Skills
11431143
from line 1147
11471147
11481148* [ ] Description is specific and includes key terms
11491149* [ ] Description includes both what the Skill does and when to use it
1150* [ ] SKILL.md body is under 500 lines
1150* [ ] `SKILL.md` body is under 500 lines
11511151* [ ] Additional details are in separate files (if needed)
11521152* [ ] No time-sensitive information (or in "old patterns" section)
11531153* [ ] Consistent terminology throughout