feat(skills): add /skill validate for skill-file linting#175
Merged
emal-avala merged 2 commits intomainfrom Apr 23, 2026
Merged
feat(skills): add /skill validate for skill-file linting#175emal-avala merged 2 commits intomainfrom
emal-avala merged 2 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Catches the common authoring mistakes before they ship as a skill:
missing description, empty whenToUse on user-invocable skills,
narrative first-person bodies ("let me…", "I will…"), oversize
descriptions, empty bodies, too-short bodies, non-kebab-case
filenames, malformed frontmatter, and fenced shell blocks that will
get stripped under `disable_skill_shell_execution`.
New `validate_skill_file(path) -> Vec<Finding>` returns ordered
findings with severity (Error / Warning / Info). `/skill validate
<path>` accepts a file or a directory (walks .md files), prints
per-file findings, and ends with an aggregate summary.
SKILL.md (directory-based skill layout) gets a filename-check
exemption since the skill name comes from the containing directory.
Errors like missing description or broken frontmatter are returned
as findings rather than `Result::Err` so the validator can report
everything in one pass.
2cd489e to
b455ac5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds `/skill validate ` (also `/skill lint`) and the underlying `skills::validate_skill_file` function. Lints skill files and reports findings grouped by severity.
What it catches:
Accepts a file or a directory; for a directory, walks all `.md` entries and prints per-file findings plus an aggregate summary.
Why
We've been shipping bundled skills at a rapid clip and the pattern is already drifting in tiny ways — some skills have empty `whenToUse`, some drift into first-person narrative, some have descriptions too long to display in `/help`. A linter keeps the house style enforceable both for bundled additions and for user-authored skills.
Implementation
Errors returned as findings, not `Result::Err` — the validator reports everything in one pass rather than stopping at the first problem.
Test plan