Skip to content

feat: add lint command to validate skills against spec#68

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:feat/lint-command
May 15, 2026
Merged

feat: add lint command to validate skills against spec#68
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:feat/lint-command

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Contributor

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-all because they were missing the required version field. CI showed "0 published, 11 skipped, 0 failed" with zero indication that 3 skills had been rejected.

What it 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)

Exit codes:

  • 1 on errors (missing required fields, bad format) — fails CI
  • 0 on warnings-only — passes CI
  • 0 on help

Next step: Update the petabridge-skills CI workflow to use skillserver lint ./skills instead of just --dry-run on publish-all.

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.
@Aaronontheweb Aaronontheweb merged commit eb633c8 into netclaw-dev:dev May 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant