Validation - PomPrompt Guides
SKILL.md Validation Errors: Causes and Fixes
Diagnose and repair Agent Skill frontmatter problems, folder mismatches, and common structural validation errors.
A SKILL.md file can look fine in an editor and still fail validation. The usual causes are malformed YAML frontmatter, missing metadata, an invalid Skill name, or a folder that does not match the name declared inside the file. Start with the error category, correct that specific requirement, and validate the directory again.
Not every warning is a format failure. A missing reference file, a host-specific setting, and a Skill that never activates call for different fixes. This guide makes those distinctions with before-and-after examples and findings from a limited, reproducible local test suite.
Table of contents
- Diagnose the error before editing
- Validate the Skill directory
- Fix broken YAML frontmatter
- Repair missing or empty fields
- Correct Skill names and folder mismatches
- Fix description and metadata limits
- Understand host-specific fields
- Check missing supporting files
- What the local tests found
- What passing validation does not prove
- Final validation checklist
- Frequently asked questions
- Sources and verification notes
1. Diagnose the error before editing
The Agent Skills specification defines a Skill as a directory containing a file named SKILL.md. The file starts with YAML frontmatter and continues with Markdown instructions. Directories such as scripts/, references/, and assets/ are optional.
A simple instruction-only Skill could look like this:
documentation-quality-review/
└── SKILL.md
Its SKILL.md could begin:
---
name: documentation-quality-review
description: Reviews technical guides for unclear steps. Use when asked to audit a README.
---
# Documentation Quality Review
Review the supplied guide and identify missing prerequisites.
Use this table to choose the right starting point.
| Symptom | Likely cause | First fix |
|---|---|---|
| Missing SKILL.md | Wrong filename or missing file | Create or rename the file |
| Invalid YAML | Broken delimiter, quotation, or syntax | Repair the frontmatter |
| Missing name or description | Required field is absent or empty | Add a nonempty string |
| Invalid Skill name | Uppercase, underscores, or malformed hyphens | Correct the identifier |
| Folder mismatch | Declared name differs from its directory | Make them match |
| Overlong metadata | Specified character limit exceeded | Shorten the field |
| Unexpected field | Unsupported top-level metadata | Check the validation profile |
| Broken reference | Supporting file is missing | Add the file or repair its path |
| Skill does not activate | Discovery, invocation, or trigger issue | Test in the intended host |
A parser failure means the metadata cannot be read. A specification failure means an explicit format rule is violated. A broken resource is generally a package-integrity problem, while activation must be investigated in the agent itself.
Infographic: SKILL.md validation errors at a glance
Use this visual alongside the diagnostic table to review the error categories before working through the individual fixes.
Download the SKILL.md validation infographic.
2. Validate the Skill directory
The Agent Skills project publishes a Python reference library called skills-ref. To use its command-line validator, install Python and Git, then clone the repository:
git clone https://github.com/agentskills/agentskills.git
cd agentskills/skills-ref
On macOS or Linux:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
On Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .
With the environment active, run:
skills-ref validate /path/to/documentation-quality-review
Replace the example path with the directory that contains SKILL.md, not a path to a random YAML fragment. The reference library README calls skills-ref a demonstration implementation and explicitly says it is not meant for production use. A passing result covers the checks implemented there, not every possible package or runtime issue.
3. Fix broken YAML frontmatter
Frontmatter must start with a line containing three hyphens and end with another such line. The content between those markers must parse as YAML. The Markdown instructions follow the closing marker.
Missing opening and closing delimiters
Incorrect:
name: documentation-quality-review
description: Reviews technical documentation.
Corrected:
---
name: documentation-quality-review
description: Reviews technical documentation.
---
# Documentation Quality Review
Review the supplied document.
An opening marker without a closing marker also fails. If the first line is ---, make sure a second delimiter comes before the instructions.
A colon inside an unquoted description
YAML permits ordinary colons in many places, but a colon followed by a space can break an unquoted value. This example is invalid:
---
name: documentation-quality-review
description: Reviews documents: identifies unclear steps.
---
Quoting the value resolves the ambiguity:
---
name: documentation-quality-review
description: "Reviews documents: identifies unclear steps."
---
The malformed version failed parsing with PyYAML 6.0.3 in the local tests. That observation is a PyYAML result, not an error message captured from the official skills-ref command. If parsing still fails after the correction, check indentation and unclosed quotation marks before changing individual fields.
4. Repair missing or empty required fields
The open specification requires nonempty name and description strings. A field that is present but empty does not satisfy the rule.
Missing name
Incorrect:
---
description: Reviews technical guides for unclear setup steps.
---
Corrected:
---
name: documentation-quality-review
description: Reviews technical guides for unclear setup steps.
---
Empty description
Incorrect:
---
name: documentation-quality-review
description:
---
Corrected:
---
name: documentation-quality-review
description: Reviews technical guides for missing prerequisites. Use when asked to audit a README or installation guide.
---
A description like Helps with documents. may satisfy the nonempty requirement, but it says little about when the Skill should be selected. That is a writing-quality concern rather than automatically a specification failure. If you need to rebuild the file from a complete example, see the SKILL.md creation guide, which uses the same documentation-review task.
5. Correct invalid names and directory mismatches
The name is an identifier, not a headline. Under the specification it must be between 1 and 64 characters, use permitted lowercase alphanumeric characters and hyphens, avoid leading or trailing hyphens and consecutive hyphens, and match the parent directory.
| Invalid name | Problem | Corrected name |
|---|---|---|
Documentation-Review | Uppercase characters | documentation-review |
documentation--review | Consecutive hyphens | documentation-review |
-documentation-review | Leading hyphen | documentation-review |
documentation-review- | Trailing hyphen | documentation-review |
documentation_review | Underscore | documentation-review |
When the declared name does not match the folder
Suppose the files are stored in:
documentation-review/
└── SKILL.md
But SKILL.md declares:
---
name: documentation-quality-review
description: Reviews technical documentation.
---
Either change the frontmatter name to documentation-review, or rename the folder to:
documentation-quality-review/
└── SKILL.md
Then recheck any other references to the old folder path.
Names longer than 64 characters
A name can contain only permitted characters and still exceed the limit. A deliberately generated 65-character name in the local fixtures produced Name too long: 65 characters. The corrected fixture used documentation-quality-review with a matching directory.
Unicode and filename capitalization
The specification describes Unicode lowercase alphanumeric characters, although its examples use familiar ASCII identifiers. The inspected reference validator also performs Unicode-aware checks. It is therefore too broad to say that every non-ASCII name violates the format. Lowercase ASCII letters, digits, and single hyphens remain a conservative choice when portability matters; test other identifiers in the intended hosts.
The required filename is written SKILL.md. The inspected reference parser also looks for lowercase skill.md, but that is an implementation-specific allowance. Use the documented uppercase spelling rather than depending on that exception.
6. Fix description and metadata constraints
Some metadata limits are fixed by the specification. A generic YAML parser does not necessarily check them.
| Field | Required? | Constraint |
|---|---|---|
name | Yes | 1 to 64 characters |
description | Yes | Nonempty; at most 1,024 characters |
compatibility | No | At most 500 characters |
license | No | License name or reference |
metadata | No | Mapping with string keys and string values |
allowed-tools | No | Space-separated string; experimental |
Description longer than 1,024 characters
The description should explain what the Skill does and when to use it, not reproduce the complete procedure. Our local fixture with 1,025 characters produced Description too long: 1025 characters. After shortening the description, the corrected fixture passed the local checks.
Keep the selection guidance in frontmatter and the detailed steps below it:
---
name: documentation-quality-review
description: Reviews technical guides for missing prerequisites and unclear steps. Use when asked to audit a README.
---
# Documentation Quality Review
## Required input
An existing document or identified excerpt.
## Review procedure
1. Identify missing prerequisites.
2. Check the order of instructions.
3. Report contradictions with supporting evidence.
The optional compatibility field has a separate 500-character limit. A 501-character fixture was also flagged in the local tests.
Metadata is a list instead of a mapping
Incorrect:
metadata:
- author
- version
Corrected:
metadata:
author: "example-org"
version: "1.0"
Quoting a version-like value helps preserve its string type. There is a subtle implementation difference here: the specification requires string keys and values, but the inspected reference validator does not explicitly enforce every nested metadata-type rule. Passing a particular implementation's checks is not evidence that every specification requirement was evaluated.
7. Understand unsupported fields and host-specific settings
A Skill can include a setting supported by one host but rejected by a strict, portable-format checker. For example:
---
name: documentation-quality-review
description: Reviews technical guides.
disable-model-invocation: true
---
Claude Code documents disable-model-invocation as a host-specific control. It is not one of the standard top-level fields accepted by the inspected reference validator.
Our local strict-profile check reported:
Unsupported top-level keys in strict profile: disable-model-invocation
A portable version omits the field:
---
name: documentation-quality-review
description: Reviews technical guides.
---
If you are specifically building for Claude Code and need that control, consult the Claude Code Skills documentation rather than deleting a setting you actually intend to use. Moving it into the general metadata mapping does not make the host honor it.
Claude Code also documents different handling for some missing or malformed frontmatter. By contrast, OpenAI's Skills documentation requires name and description for the SKILL.md format used in ChatGPT and Codex. A host may load a file that fails strict validation, or reject a file for reasons unrelated to the open-format rules. Record the host and validation profile before treating the difference as a contradiction.
8. Check missing references and incomplete packages
A structurally valid SKILL.md can still refer to a file that was not included in its directory. Suppose the instructions say:
# Documentation Quality Review
Read `references/review-checklist.md` before reviewing the document.
The intended package is:
documentation-quality-review/
├── SKILL.md
└── references/
└── review-checklist.md
If review-checklist.md is missing, add it or change the reference to the correct location. The supplementary local package checker reported Referenced resource not found: references/review-checklist.md for this case. Adding the file resolved that warning.
This is a package-integrity check, not automatically a frontmatter specification failure. The inspected skills-ref validator does not comprehensively resolve every resource mentioned in the Markdown body. When distributing a Skill, check relative paths, filename capitalization, and the availability of the resources its instructions actually require.
9. What the local validation tests found
The examples above draw on an original set of 20 deliberately invalid fixtures, corrected versions of those fixtures, and one valid baseline. The suite was checked on October 29, 2026 using Python 3.13.5, PyYAML 6.0.3, and an independent script covering selected structural rules and referenced-file existence.
The script was rerun against the supplied collection. All 20 invalid fixtures produced their expected local findings; the corrected versions and valid baseline passed the implemented checks. Selected findings are shown below.
| Fixture | Problem | Recorded local finding |
|---|---|---|
| F03 | Missing frontmatter | Missing opening YAML frontmatter delimiter |
| F05 | Malformed YAML | YAML parsing failed |
| F06 | Missing name | Missing or empty required field: name |
| F08 | Empty description | Missing or empty required field: description |
| F10 | Consecutive hyphens | Name has consecutive hyphens |
| F14 | Directory mismatch | Declared name does not match parent directory |
| F15 | Overlong name | Name too long: 65 characters |
| F16 | Overlong description | Description too long: 1025 characters |
| F18 | Metadata list | Metadata must map string keys to string values |
| F19 | Host-specific field | Unsupported top-level keys in strict profile: disable-model-invocation |
| F20 | Missing reference | Referenced resource not found: references/review-checklist.md |
These messages belong to the independent local checker, not to the official skills-ref CLI. The suite was not run inside Claude Code, Codex, or Cursor, and it does not establish successful activation, task quality, or security. The results support the specified local checks and no broader guarantee.
10. What a passing validation result does not prove
Even a structurally valid Skill can fail to activate. Its host might not discover the directory, an invocation setting may block selection, or the description may be too vague to match the request. Consider the difference between Helps with documentation. and Reviews existing installation guides for missing prerequisites. Use when asked to audit a README. The second description gives more useful selection information, but neither syntax nor wording guarantees activation.
Test the Skill in the intended host with relevant requests, unrelated requests, and missing-input cases. Record what actually happened. If the Skill uses scripts, credentials, network access, or external dependencies, inspect those separately before execution. A structural validator cannot certify their safety.
| Check | What it establishes | What it does not guarantee |
|---|---|---|
| YAML parsing | Frontmatter is syntactically readable | Agent Skills compliance |
| Format validation | Implemented structural checks pass | Every possible rule was checked |
| Package review | Inspected resources are available | Successful task execution |
| Host testing | Observed behavior under stated conditions | Universal compatibility |
| Security review | Risks within a defined review scope | Absolute safety |
11. Final SKILL.md validation checklist
- Confirm that the file is named SKILL.md and sits inside the intended Skill directory.
- Check the opening and closing YAML frontmatter delimiters.
- Confirm that the YAML parses into the expected metadata mapping.
- Supply nonempty name and description strings.
- Check name characters, hyphen placement, the 64-character limit, and the directory match.
- Keep description within 1,024 characters and optional compatibility within 500 characters.
- Check optional metadata types and host-specific fields against the applicable rules.
- Confirm that referenced supporting files exist.
- Revalidate after making corrections.
- Test actual host discovery, activation, and task results separately.
- Review untrusted scripts, dependencies, and permissions before running them.
PomPrompt's AI Skill Creator and Validator is the companion destination for creating and checking Skill files. Use whichever validation features are available there, and interpret the findings according to the checks the tool actually performs.
A useful repair leaves you knowing which requirement failed, how it was corrected, and what still needs testing before the Skill can be relied on.
Frequently asked questions
Can SKILL.md pass YAML parsing but still be invalid?
Yes. YAML parsing checks syntax, not all Agent Skills requirements. A file can parse successfully while missing a required field, using an invalid name, or declaring a name that does not match its directory.
Why does Claude Code accept a Skill that a strict validator rejects?
Claude Code documents additional frontmatter fields and more permissive handling of some metadata problems. A file accepted by one host is not automatically compliant with every rule checked by a strict, portable-format validator.
Are scripts, references, and assets required?
No. The specification requires a Skill directory with SKILL.md; supporting directories are optional. However, if the instructions refer to a supporting file, that file must be available for the intended workflow.
Does passing SKILL.md validation guarantee that the agent will use it?
No. The host still needs to discover, select, and execute the Skill under suitable conditions. Test those behaviors separately from structural validation.
Sources and verification notes
Technical documentation was reviewed on October 29, 2026. The official specification and vendor guides are living documents, and the cited reference implementation was inspected on its main branch rather than pinned to a release.
Agent Skills, Specification. Primary source for required fields, naming, frontmatter, and metadata constraints.
Agent Skills, skills-ref README. Reference validator command and its demonstration-only limitations.
Agent Skills, reference validator source and reference parser source. Implementation evidence for the described checks, metadata handling, and filename lookup.
Anthropic, Claude Code Skills; OpenAI, Build Skills. First-party documentation for host-specific metadata and invocation behavior.
Original local fixture evidence, October 29, 2026. Twenty intentionally invalid fixtures, their corrected counterparts, one valid baseline, a Python verification script, and recorded local results. Tests used Python 3.13.5 and PyYAML 6.0.3. They were not official skills-ref CLI runs or live host tests.
Use this in your own Skill.
Draft a SKILL.md file, check basic structure and download the source. Test real host behavior before shipping a Skill.
Try the AI Skill Creator