.agents/skills/validate-skill-spec/SKILL.md
Validates a skill directory against the Agent Skills specification (agentskills.io/specification). Checks file reference consistency, frontmatter compliance, progressive disclosure, and structural correctness. Triggers when asked to validate a skill against the spec, check skill references, verify spec compliance, audit a skill's structure, or confirm a skill is ready for distribution. Also triggers on phrases like "is this skill valid," "check spec compliance," "validate file references," "verify the skill structure," or "does this skill follow the spec." Use this skill to catch structural issues, broken references, and spec violations in any skill directory.
npx skillsauth add milanhorvatovic/skill-system-foundry validate-skill-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validates a skill directory against the Agent Skills specification (agentskills.io/specification). Checks file reference consistency, frontmatter compliance, progressive disclosure, and structural correctness.
This skill provides a manual validation workflow that complements automated validation scripts. It covers checks that scripts may not fully enforce — particularly file reference consistency per the spec's file-references rules.
SKILL.md or any referenced fileDetermine the skill directory to validate. The skill root is the directory containing SKILL.md. All file references are resolved relative to this root.
If validation scripts are available (e.g., validate_skill.py from this repository), run them from within the skill-system-foundry/ directory:
cd skill-system-foundry
python scripts/validate_skill.py <skill-path> --verbose
If the skill uses nested references intentionally, add --allow-nested-references. If the scripts report failures, fix them before proceeding to the manual checks below.
Read the SKILL.md and check its YAML frontmatter against the spec:
| Field | Required | Rule |
|---|---|---|
| name | Yes | Max 64 chars. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen. Must not contain consecutive hyphens. Must match the parent directory name |
| description | Yes | Max 1024 chars. Non-empty. Must describe what the skill does AND when to use it |
| license | No | License name or reference to a bundled license file |
| compatibility | No | Max 500 chars. Environment requirements |
| metadata | No | Arbitrary key-value map (string keys to string values) |
| allowed-tools | No | Space-delimited list of pre-approved tools |
Check each required field against its constraints. For optional fields, verify they meet their limits if present.
The spec defines file reference rules at agentskills.io/specification#file-references. Every file reference in the skill must comply.
Read SKILL.md and extract every reference to a file:
[text](path) where path is not a URL or anchor/ and point to skill-internal filesFilter out:
http://, https://, or protocol-relative //)#section)< or >)For each extracted reference, resolve it relative to the skill root (the directory containing SKILL.md). Strip any fragment (#section), query string, or title annotation before resolving.
Verify that each resolved path:
Report any reference that does not resolve to an existing file.
List all files in the skill's subdirectories (references/, scripts/, assets/, and any other directories). Compare against the references extracted from SKILL.md.
An unreferenced file means agents do not know it exists and cannot load it on demand. Every bundled file should be linked from SKILL.md with a description of what it contains and when to use it.
Report any file that exists in the skill directory but is not referenced from SKILL.md.
All file references must comply with these rules:
SKILL.md/ or a drive letter (e.g., C:\) is a violation../ that escape the skill root are invalid as internal references/, not \. This is a cross-platform portability requirementThe spec says: "Keep file references one level deep from SKILL.md. Avoid deeply nested reference chains."
SKILL.md references files in references/, scripts/, assets/ (valid)For each file referenced from SKILL.md, read it and check whether it contains its own file references. If it does, report the nesting. Deep reference chains risk partial reads by agents, breaking progressive disclosure.
Check that the skill follows progressive disclosure:
SKILL.md should stay under 500 lines. Count the lines and report if the limit is approached or exceeded. When approaching the limit, detailed material should be moved to references/ files.
Any referenced file over 100 lines should include a table of contents at the top to help agents navigate.
The description field is the primary trigger mechanism. Check:
The skill may contain these optional directories:
scripts/ — executable codereferences/ — additional documentationassets/ — templates and static resourcesVerify that files are organized in the appropriate directories. Scripts should not live in references/, documentation should not live in scripts/.
Structure the output:
## Skill Validation Report
**Skill:** <skill-name>
**Path:** <skill-directory-path>
### Frontmatter
- name: (valid/invalid — details)
- description: (valid/invalid — length, quality assessment)
- optional fields: (list any issues)
### File Reference Consistency
- Missing targets: (list or "None")
- Unreferenced files: (list or "None")
- Invalid paths: (list or "None")
- Forward-slash violations: (list or "None")
- Nested references: (list or "None — intentional/unintentional")
### Content Structure
- Line count: X/500
- Files over 100 lines without ToC: (list or "None")
- Description quality: (assessment)
### Overall
(Clean / Issues found — with summary of what to fix)
tools
Greets a recipient through one of two registered tones — formal or casual — by dispatching to a dedicated capability. Activates when the conversation asks for a tone-specific welcome or a switch between formal and casual greetings; use when comparing the two styles. Demonstrates the router pattern in the Skill System Foundry — a thin SKILL.md entry point routing to capability files, with allowed-tools declared in frontmatter so capability shell fences pass validation.
testing
Greets a single recipient with a friendly welcome message rendered in a formal or casual tone. Activates when the conversation asks to say hello or welcome someone; use when a minimal standalone skill is needed. Demonstrates the smallest valid standalone skill in the Skill System Foundry — required name and description frontmatter plus an optional metadata block — and how its layout passes validation.
testing
Designs and evolves AI-agnostic skill systems. Triggers on skill/capability creation, role definition, or router migration; use when auditing consistency or improving token efficiency.
development
Governs the configuration.yaml file that serves as the single source of truth for all validation rules in the Skill System Foundry. Triggers when adding, modifying, or reviewing validation rules, limits, patterns, or reserved words. Also triggers when working with constants.py, yaml_parser.py, or any code that reads from configuration.yaml. Use this skill when asked to add a new validation check, change a limit or threshold, update reserved word lists, add SPDX license identifiers, modify regex patterns, or troubleshoot why a validation rule is not working as expected. Activates on mentions of configuration, validation rules, constants, thresholds, or pattern definitions.