feat: add lint command to validate skills against spec#68
Merged
Conversation
Adds a 'skillserver lint <path>' command that validates skill directories against the AgentSkills.io specification without requiring server auth. Checks: - YAML frontmatter exists - Required 'name' and 'version' fields present - Name format (lowercase alphanumeric with hyphens) - Name matches directory name (warning) - Semantic version format (warning) - Description present (warning) - Body content after frontmatter (warning) Returns exit code 1 on errors, 0 on warnings-only — suitable for CI. Motivated by a real bug where 3 skills were silently skipped during publish-all because they were missing the required 'version' field. Includes 34 unit tests covering validation logic and CLI integration.
The lint command operates entirely on local files and was already
exempted from the auth check, but the unconditional SKILLSERVER_URL
check ran first and caused failures in CI environments that do not
configure a server URL (which is the intended use case for lint).
Dispatches 'lint' alongside 'config' before config resolution so it
behaves consistently with the --help text ("no auth required"). Removes
the now-unreachable switch arm in DispatchAsync.
Adds a subprocess-level regression test that runs the CLI binary with
SKILLSERVER_URL/API_KEY cleared from the environment, asserting that
'lint' succeeds with exit 0 and 'list' still fails with the expected
error.
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.
Adds a
skillserver lint <path>command that validates skill directories against the AgentSkills.io specification without requiring server auth.Motivation: 3 skills (git, email-writing, textforge) were silently skipped during
publish-allbecause they were missing the requiredversionfield. CI showed "0 published, 11 skipped, 0 failed" with zero indication that 3 skills had been rejected.What it checks:
nameandversionfields presentExit codes:
1on errors (missing required fields, bad format) — fails CI0on warnings-only — passes CI0on helpNext step: Update the
petabridge-skillsCI workflow to useskillserver lint ./skillsinstead of just--dry-runonpublish-all.