$npx -y skills add callstackincubator/agent-skills --skill validate-skillsValidates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.
| 1 | # Validate Skills |
| 2 | |
| 3 | Validate all skills in `skills/` against the agentskills.io spec and Claude Code best practices. |
| 4 | |
| 5 | ## Validation Checklist |
| 6 | |
| 7 | For each skill directory, verify: |
| 8 | |
| 9 | ### Spec Compliance (agentskills.io) |
| 10 | |
| 11 | | Check | Rule | |
| 12 | |-------|------| |
| 13 | | `name` format | 1-64 chars, lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens | |
| 14 | | `name` matches directory | Directory name must equal `name` field | |
| 15 | | `description` length | 1-1024 characters, non-empty | |
| 16 | | Optional fields valid | `license`, `metadata`, `compatibility` if present | |
| 17 | |
| 18 | ### Best Practices (Claude Code) |
| 19 | |
| 20 | | Check | Rule | |
| 21 | |-------|------| |
| 22 | | Description format | Third person, describes what + when to use | |
| 23 | | Body length | Under 500 lines | |
| 24 | | Loading is one-level deep | `SKILL.md` is the only progressive-disclosure entry point: every reference file must be reachable from `SKILL.md`. References may cross-link each other for navigation (see note below). | |
| 25 | | Links are markdown | Use `[text](path)` not bare filenames | |
| 26 | | No redundancy | Don't repeat description in body | |
| 27 | | Concise | Only add context Claude doesn't already have | |
| 28 | |
| 29 | > **One-level-deep vs. cross-linking.** The one-level-deep rule targets *progressive-disclosure loading chains* — a reference that can only be discovered by loading another reference first (`SKILL.md` → `a.md` → `b.md`, where `b.md` is not linked from `SKILL.md`). That is a defect: it hides content from the loader. |
| 30 | > |
| 31 | > It does **not** forbid *navigational* cross-links. Per [AGENTS.md](../../../AGENTS.md), reference files end with a "Related Skills" footer linking sibling references, and this is required. A cross-link is fine as long as both endpoints are also reachable directly from `SKILL.md`. Only flag a reference that is reachable *exclusively* through another reference. |
| 32 | |
| 33 | ## How to Run |
| 34 | |
| 35 | 1. Find all skill directories: |
| 36 | ```bash |
| 37 | fd -t d -d 1 . skills/ |
| 38 | ``` |
| 39 | |
| 40 | 2. For each skill, read `SKILL.md` and check against the rules above |
| 41 | |
| 42 | 3. Report issues in this format: |
| 43 | ``` |
| 44 | ## Validation Results |
| 45 | |
| 46 | ### skills/example-skill |
| 47 | - [PASS] name format valid |
| 48 | - [FAIL] name "example" doesn't match directory "example-skill" |
| 49 | - [PASS] description length OK (156 chars) |
| 50 | ``` |
| 51 | |
| 52 | ## References |
| 53 | |
| 54 | - [agentskills.io spec](https://agentskills.io/specification) |
| 55 | - [Claude Code best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) |