Best for
- Use when creating a skill, reviewing skill quality, debugging why a skill won't trigger, structu
tenequm/skills/skills/skills-best-practices/SKILL.md
Build high-quality Agent Skills for any agent - opinionated best practices distilled from the Agent Skills spec, official Anthropic guidance, and production experience. Covers SKILL.md structure, frontmatter, description writing, single-file vs references/ layout, progressive disclosure, testing, patterns, troubleshooting, and distribution across all surfaces (Claude.ai, Claude Code, API, Agent SDK). Use when creating a skill, reviewing skill quality, debugging why a skill won't trigger, structu
Decision brief
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) conta…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/tenequm/skills --skill "skills/skills-best-practices"Inspect the Agent Skill "skills-best-practices" from https://github.com/tenequm/skills/blob/9b9fb5a29c103ed207dc255d753939e4e2ed29f5/skills/skills-best-practices/SKILL.md at commit 9b9fb5a29c103ed207dc255d753939e4e2ed29f5. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
A minimal skill is a directory with a SKILL.md file:
Claude is smart. Only add context it doesn't already have:
[Route to the right approach based on task type]
[Step-by-step for each workflow]
Review the “Sequential Workflow” section in the pinned source before continuing.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
with pdfplumber.open("file.pdf") as pdf:The documentation asks the agent to run terminal commands or scripts.
uvx --from skills-ref agentskills validate path/to/skillEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 35 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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.
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.
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:
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) | ~100 tokens | 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)
Skills work alongside other skills. Don't assume yours is the only one loaded.
Skills work across Claude.ai, Claude Code, API, and Agent SDK without modification (if dependencies are available).
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.
# GOOD - specific, actionable, includes triggers
description: Extract text and tables from PDF files, fill forms, merge
documents. Use when working with PDF files or when the user mentions
PDFs, forms, or document extraction.
# BAD - too vague
description: Helps with documents.
# BAD - missing triggers
description: Creates sophisticated multi-page documentation systems.
When a skill overtriggers, add boundaries directly in the description:
description: Advanced data analysis for CSV files. Use for statistical
modeling, regression, clustering. Do NOT use for simple data
exploration (use data-viz skill instead).
A skill with disable-model-invocation: true never auto-triggers - its description shows only in the / menu, so trigger phrases do nothing for it. Write a plain one-line summary and skip the trigger-tuning.
| Field | Rules |
|---|---|
name | Kebab-case, max 64 chars, lowercase + numbers + hyphens only. No "claude" or "anthropic" |
description | Non-empty, max 1024 chars, no XML tags. WHAT + WHEN |
The agentskills.io standard and the Claude API require both fields. Claude Code is more lenient: name falls back to the directory name, and description falls back to the first markdown paragraph. Write both anyway for portability.
The spec also defines optional license, compatibility, and metadata fields. compatibility is capped at 500 characters and states environment requirements (intended product, system packages, network access).
| Field | Purpose |
|---|---|
argument-hint | Autocomplete hint, e.g. [issue-number] |
when_to_use | Extra trigger context, appended to description in the skill listing |
arguments | Named positional arguments for $name substitution (space-separated string or list) |
disable-model-invocation | true = only user can invoke (for deploy, commit) |
user-invocable | false = hidden from / menu (background knowledge) |
allowed-tools | Pre-approves tools (no permission prompt) for the current turn; space-separated, e.g. Read Grep Glob. In the spec allowlist but tagged (Experimental) |
disallowed-tools | Removes tools from Claude's pool while the skill is active; clears on your next message |
model | Override model for this skill; accepts inherit. Lasts the current turn only |
effort | Override effort level: low, medium, high, xhigh, max |
context | fork = run in isolated subagent |
agent | Subagent type when context: fork (e.g. Explore, Plan) |
background | false opts a forked skill out of background execution (v2.1.218+) |
shell | bash (default) or powershell |
hooks | Hooks scoped to this skill's lifecycle |
paths | Glob patterns limiting when skill activates |
Publishing caveat: every field above except
allowed-toolsis Claude Code-specific. They work in Claude Code at runtime, but the officialagentskills validatespec validator rejects them - it allows onlyname,description,license,compatibility,metadata,allowed-tools, with no relax flag. If your repo or CI runs that validator (most ClawHub-publishing repos do), a skill using these fields fails validation unless you strip them from the copy you validate/publish. The ClawHub registry itself tends to tolerate extra top-level fields on publish, but the reference validator in your pipeline will not. See Validate Against the Spec.
The name (and its folder) must: be 1-64 chars; use only lowercase letters, numbers, and hyphens; not start or end with a hyphen; not contain consecutive hyphens (--); and match the parent directory name. Anthropic surfaces also reject the reserved words claude and anthropic.
Prefer gerund form for clarity:
processing-pdfs, analyzing-spreadsheets, managing-databasespdf-processing, process-pdfshelper, utils, tools, documentsOfficial docs cover most Claude Code skill behavior: the skills docs (invocation control, argument substitution, discovery and priority, tool permissions, skillOverrides, context budget), the commands reference for the current bundled-skills roster (it churns every few releases - never hardcode it), and the settings reference. Below is only what those docs miss or what bites in practice.
Claude Code preprocesses SKILL.md at load: an exclamation mark immediately touching a backticked command executes that command before Claude sees the content (dynamic context injection). The preprocessor is not markdown-aware:
KEY= before the ! leaves it literal)! right after the backticks is the multi-line form and is equally livereferences/ files are read with the Read tool and never preprocessed - the only safe home for live examples. In a SKILL.md, break the !-to-backtick adjacency instead (wrap the ! in its own code span, as this section does)"disableSkillShellExecution": true in settings disables execution for user/project/plugin skillsdisplay-name, default-enabled, and fallback frontmatter keys exist but are absent from the official frontmatter tableyes/no/on/off/1/0 (v2.1.218+)context: fork skills run in the background by default since v2.1.218 (background: false opts out); backgrounded forks get a narrower tool set and their edits bypass checkpoints, so /rewind cannot undo them. Explore/Plan forks skip CLAUDE.md and git status; since v2.1.198 Explore inherits the session model/skill-a /skill-b args in one message loads up to six skills (v2.1.199+)permissions.additionalDirectories does not load skills from those directories - only the --add-dir flag and /add-dir command doallowed-tools grant lasts the current turn - it clears when the user sends their next message, not when the skill "finishes"/command name comes from the skill's directory; frontmatter name is only a display label (plugin skills excepted). Nested skills are invocable by qualified name, e.g. /apps/web:deploy/doctor; tune via skillListingBudgetFraction, skillListingMaxDescChars, or SLASH_COMMAND_TOOL_CHAR_BUDGETClaude is smart. Only add context it doesn't already have:
# GOOD (~50 tokens)
## Extract PDF text
Use pdfplumber for text extraction:
```python
import pdfplumber
with pdfplumber.open("file.pdf") as pdf:
text = pdf.pages[0].extract_text()
PDF files are a common file format containing text and images. To extract text, you need a library. There are many available...
### Avoid Too Many Options
Don't present multiple approaches unless necessary. Give one default with an escape hatch:
```markdown
# BAD: "Use pypdf, or pdfplumber, or PyMuPDF, or pdf2image..."
# GOOD: "Use pdfplumber for text extraction. For scanned PDFs needing
# OCR, use pdf2image with pytesseract instead."
# Skill Name
## Quick start
[Minimal working example]
## Workflow Decision Tree
[Route to the right approach based on task type]
## Detailed Instructions
[Step-by-step for each workflow]
## Examples
[Concrete input/output pairs]
## Troubleshooting
[Common errors and fixes]
Keep references one level deep from SKILL.md. "Depth" means the reference chain (a file linking to a file linking to a file), not filesystem nesting - a references/ subdirectory is fine. In a chain, Claude may preview files with partial reads (head) and miss content.
# BAD: Too deep
SKILL.md -> advanced.md -> details.md -> actual info
# GOOD: One level
SKILL.md -> advanced.md (contains the info directly)
SKILL.md -> reference.md (contains the info directly)
For reference files >100 lines, include a table of contents at the top. Watch file size too: a single reference of many hundreds of lines defeats progressive disclosure even at one level deep, because Claude loads the whole file for any subtopic. Split large references by subtopic so each task pulls only what it needs.
## Step 1: Analyze input
Run: `python scripts/analyze.py input.pdf`
## Step 2: Validate
Run: `python scripts/validate.py fields.json`
Fix any errors before continuing.
## Step 3: Execute
Run: `python scripts/process.py input.pdf fields.json output.pdf`
## Workflow Decision Tree
**Creating new content?** -> Follow "Creation workflow"
**Editing existing content?** -> Follow "Editing workflow"
**Reviewing content?** -> Follow "Review workflow"
1. Make edits
2. Validate: `python scripts/validate.py`
3. If validation fails -> fix issues -> go to step 2
4. Only proceed when validation passes
Copy this checklist and track progress:
- [ ] Step 1: Analyze input
- [ ] Step 2: Create plan
- [ ] Step 3: Validate plan
- [ ] Step 4: Execute
- [ ] Step 5: Verify output
For skills documenting a CLI tool: keep SKILL.md as one file next to the CLI source, compile it into the binary (go:embed, Rust include_str!, or equivalent), and add a <tool> skill subcommand that prints it. The printed guide always matches the installed version, and one command fetches the whole doc - playwright-cli, browser-use (browser-use skill show), and agent-browser (agent-browser skills get core) all converge on this shape. Never split such a skill into references/; condense carefully instead.
MCP provides tool access; skills provide the workflow knowledge for using those tools well. Reference MCP tools by qualified name (BigQuery:bigquery_schema, GitHub:create_issue). Skills are portable expertise; subagents are isolated execution - in Claude Code, context: fork frontmatter runs a skill inside a subagent.
Build skills with two Claude instances: Claude A helps design and refine (it knows the format and what agents need); Claude B is a fresh instance with the skill loaded, tested on real tasks. Notice what context you repeatedly supply during normal work, have A capture it as a skill, test with B, bring B's specific failures back to A ("it forgot to filter test accounts"), and repeat. Iterate on observed behavior, not assumptions. For output-style skills, input/output example pairs communicate the desired style better than any description.
When your skill includes executable code:
analyze.py" (execute) vs "See analyze.py" (read as reference)Create evaluations before writing extensive instructions - this proves the skill solves a real problem. Run Claude on representative tasks without the skill and document the failures; build ~3 scenarios that test those gaps; measure a baseline; then write the minimum instructions needed to pass. Iterate against the baseline.
Should trigger:
- "Help me set up a new project in [Service]"
- "I need to create a project" (paraphrased)
Should NOT trigger:
- "What's the weather?" (unrelated)
- "Write Python code" (too generic)
Test normal operations, edge cases, and out-of-scope requests. Run the same request 3-5 times to check consistency.
Ask Claude: "When would you use the [skill-name] skill?" - it quotes the description back. Adjust based on what's missing.
Run the official Agent Skills validator before publishing:
uvx --from skills-ref agentskills validate path/to/skill
Exit 0 means valid. It checks SKILL.md format and enforces the spec's strict frontmatter allowlist (name, description, license, compatibility, metadata, allowed-tools). Most registries (e.g. ClawHub) and CI gates run this, so validating locally catches failures early. If you rely on Claude Code-only frontmatter (see the publishing caveat under Frontmatter Reference), strip those fields from the copy you validate.
Calibrate to scope: for a project-local or single-user skill, skip the triggering-accuracy and distribution-hygiene items.
name kebab-case and matching; file is exactly SKILL.mdwc -c)| Symptom | Cause | Fix |
|---|---|---|
| Skill never loads | Description too vague | Add specific triggers and key terms |
| Skill loads for wrong tasks | Description too broad | Add negative triggers, be more specific |
| Instructions not followed | Too verbose or buried | Put critical instructions at top, use headers |
| Slow/degraded responses | SKILL.md too large | Condense first; split to references/ only if content is conditionally loaded (see Single File vs. references/) |
| "Could not find SKILL.md" | Wrong filename | Must be exactly SKILL.md (case-sensitive) |
| "Invalid skill name" | Spaces or capitals | Use kebab-case: my-skill-name |
| Whole skill silently skipped at load | Description exceeds 1024 chars | Trim it - the loader rejects the file, not just the description |
| Frontmatter fails to parse | Triggers: (colon-space) or straight "quotes" inside an unquoted description value | Quote the whole value or remove the colon/quotes |
| A doc example runs a shell command | A ! directly touching a backticked command executes on load, even inside a code fence | Move the example to references/ or break the !-backtick adjacency (see Dynamic-Injection Footgun) |
| Surface | How to Deploy |
|---|---|
| Claude.ai | Settings > Features > Upload zip |
| Claude Code (personal) | ~/.claude/skills/<name>/SKILL.md |
| Claude Code (project) | .claude/skills/<name>/SKILL.md |
| Claude Code (plugin) | <plugin>/skills/<name>/SKILL.md |
| API | Upload via the Skill Management API, use via the Messages API |
| Enterprise | Managed settings (org-wide) |
Skills don't sync across surfaces - deploy separately to each.
Custom skills are uploaded through the Skill Management API; anthropic-type skills are pre-built by Anthropic. Both are used identically - pass them in the Messages API container parameter, each as {type, skill_id, version} where type is anthropic or custom. Up to 8 Skills per request, 30 MB max upload (all files combined), and all files must share a common root directory. Requires the code execution tool and the beta headers code-execution-2025-08-25 and skills-2025-10-02 (plus files-api-2025-04-14 for file upload/download).
Network access differs by surface. The API code execution environment has no network access and no runtime package installation - bundle dependencies or use pre-installed packages. On claude.ai, by contrast, Skills can install packages from npm and PyPI and pull from GitHub.
Also: a pause_turn stop reason signals a long-running Skill operation; reuse containers across turns via container.id; generated files come back via the Files API; changing the Skills list breaks prompt caching; Skills are not ZDR-eligible.
Frequently asked questions
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) conta…
The source record exposes this install command: npx skills add https://github.com/tenequm/skills --skill "skills/skills-best-practices". Inspect the command and pinned source before running it.
The pinned source record declares support for: claude code.
Static rules flagged read-files, exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
narrative-io/narrative-skills-marketplace
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
yonatangross/orchestkit
Grade work that already exists and decide whether it can merge. Runs the project's current unit, integration, and E2E suites plus security scanning and type checking, scores every dimension 0-10, and returns a merge verdict with a VERIFIED-vs-CLAIMED evidence manifest. Writes no test files and edits no source. Use when verifying changes are ready to merge. Use /ork:cover instead when the tests still have to be written.
PramodDutta/qaskills
Generate optimized test combinations using pairwise (all-pairs) testing algorithms to achieve maximum coverage with minimum test cases across multiple input parameters