skill-authoring
Creates and improves Claude Code Skills (SKILL.md files). Covers frontmatter, descriptions, progressive disclosure, bundled resources, and content guidelines. Follows official Anthropic best practices. USE WHEN: user mentions "create skill", "write skill", "SKILL.md", "skill file", "slash command", "custom command", "extend Claude", "skill description", "skill not triggering", "skill authoring" DO NOT USE FOR: creating agents/subagents - use `agent-authoring`; creating hooks - use `hook-authoring`; creating MCP servers - use `mcp-authoring`; creating plugins - use `plugin-authoring`
What this skill does
# Skill Authoring — Official Best Practices
## File Structure
```
skill-name/
├── SKILL.md # Main instructions (< 500 lines)
├── reference.md # Detailed docs (loaded on demand)
├── examples.md # Usage examples (loaded on demand)
└── scripts/
└── helper.py # Utility scripts (executed, not loaded)
```
## YAML Frontmatter
```yaml
---
name: my-skill # max 64 chars, lowercase + hyphens only
description: | # max 1024 chars, THIRD PERSON, no XML tags
Processes PDF files and extracts text. Use when working with
PDF files or when the user mentions document extraction.
disable-model-invocation: false # true = only user can invoke via /name
user-invocable: true # false = hidden from / menu, Claude-only
allowed-tools: Read, Grep, Glob # restrict tools when skill is active
model: sonnet # model override (sonnet, opus, haiku)
context: fork # run in isolated subagent context
agent: Explore # agent type when context: fork
---
```
Required: only `description` is recommended. `name` defaults to directory name.
## Description — The Most Critical Field
Claude uses the description to decide which skill to load from 100+ available.
**Rules:**
- Write in **third person** ("Processes files", NOT "I can help" or "You can use")
- Include **what** it does AND **when** to use it
- Be "pushy" — mention specific trigger contexts
- Include key terms users would naturally say
**Good:**
```yaml
description: Generates commit messages by analyzing git diffs. Use when
the user asks for help writing commit messages or reviewing staged changes.
```
**Bad:**
```yaml
description: Helps with git stuff
```
## Core Content Principles
### Claude is already smart — only add what it doesn't know
Challenge every line: "Does Claude need this explanation?" Remove basics.
**Good** (~50 tokens):
````markdown
## Extract PDF text
Use pdfplumber:
```python
import pdfplumber
with pdfplumber.open("file.pdf") as pdf:
text = pdf.pages[0].extract_text()
```
````
**Bad** (~150 tokens): explaining what PDFs are, what libraries are, how pip works.
### One recommended approach, not many alternatives
Provide a **default** tool/library. Only mention alternatives when the choice is context-dependent.
### Consistent terminology
Pick one term and use it throughout. Don't mix "endpoint", "URL", "route", "path".
### No time-sensitive information
Don't write "as of 2025" or "before August, use the old API".
## Progressive Disclosure
SKILL.md is a table of contents. Detailed content goes in separate files.
**Pattern 1: References**
```markdown
## Quick start
[essential code here]
## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md)
- **API reference**: See [REFERENCE.md](REFERENCE.md)
```
**Pattern 2: Domain-specific**
```text
bigquery-skill/
├── SKILL.md (overview + navigation)
└── reference/
├── finance.md
├── sales.md
└── product.md
```
**Rules:**
- Keep references **one level deep** from SKILL.md (no nested chains)
- Reference files > 100 lines need a **table of contents** at top
- Claude loads referenced files only when needed — no context penalty
## String Substitutions
| Variable | Description |
|----------|-------------|
| `$ARGUMENTS` | All arguments passed to skill |
| `$ARGUMENTS[N]` or `$N` | Specific argument by index |
| `${CLAUDE_SESSION_ID}` | Current session ID |
| `${CLAUDE_SKILL_DIR}` | Directory containing SKILL.md |
Dynamic injection: `` !`shell command` `` runs before Claude sees the content.
## Invocation Control
| Config | User invokes | Claude invokes |
|--------|-------------|----------------|
| Default | Yes | Yes |
| `disable-model-invocation: true` | Yes | No |
| `user-invocable: false` | No | Yes |
## Workflows & Feedback Loops
For complex tasks, provide a checklist Claude can track:
```markdown
## Deploy workflow
- [ ] Step 1: Run tests
- [ ] Step 2: Build artifacts
- [ ] Step 3: Deploy to staging
- [ ] Step 4: Verify deployment
- [ ] Step 5: Deploy to production
```
Implement validation loops: Run validator → fix → re-validate → proceed only when passing.
## Anti-Patterns to Avoid
| Anti-Pattern | Fix |
|--------------|-----|
| Body > 500 lines | Split into SKILL.md + reference files |
| Deeply nested references (A→B→C) | Keep all refs one level from SKILL.md |
| Too many options | Provide one default, mention alternative only when needed |
| First/second person description | Always third person |
| Vague description | Include what + when + trigger keywords |
| Windows-style paths (`\`) | Always use forward slashes |
| Explaining basics Claude knows | Remove — Claude is already smart |
## Checklist Before Shipping
- [ ] Description is specific, third person, includes trigger terms
- [ ] SKILL.md body < 500 lines
- [ ] Additional details in separate reference files
- [ ] No time-sensitive info
- [ ] Consistent terminology throughout
- [ ] Concrete examples, not abstract
- [ ] References one level deep
- [ ] Tested with at least 3 real scenarios
## Reference
- [Progressive disclosure patterns](quick-ref/progressive-disclosure.md)
- [Writing effective descriptions](quick-ref/description-triggers.md)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.