Expand description
The skillpack verify subcommand: load the generated distribution files
and run discovery + invocation checks against them.
Design §5.2. verify works even on hand-written plugin files (not just
init output) — see §4.2 — so the loader is tolerant of missing pieces and
each check degrades gracefully.
Re-exports§
pub use self::result::VerifyReport;
Modules§
- discovery
- Discovery checks — structural validation against the documented Claude Code
plugin schema. Pure functions over their inputs: file reads of the committed
artifacts plus the
repo_urlthe caller threads in (so the URL-drift check stays free of git subprocess spawns we’d otherwise own here). Seecrate::verify::schemafor the cited source of each rule. - fix
verify --fix: typed fix actions + appliers for mechanical drift.- invocation
- Invocation checks — actually run the documented CLI and catch drift between
what
SKILL.mdadvertises and what--helpactually offers. - result
- The result of a single
verifycheck. - schema
- The Claude Code schema constants that
verifyenforces.
Structs§
- Verify
Input - Where the invocation stage should look for skill text. Passed in so the
dispatcher owns the single
find_skill_filecall.
Enums§
- Output
Format - How
verifypresents its results (Improvement B). The human format is the default;jsonis for CI gating / scripting and uses the machine-readablecheck_ids already on eachCheckResult.
Functions§
- render
- Pretty-print a report as the human-facing output (design §5.2 step 4). Returns a single string the CLI writes to stdout.
- render_
github_ annotations - Render the report as GitHub Actions workflow commands (
::error/::warning). Emitted to stdout so a CI step likeskillpack verify --format githubannotates the PR diff inline. EachErrormaps to::error, eachWarnto::warning;file/lineare threaded from the result’slocation(absent when the check has no file location). Newlines in messages are flattened to spaces — a workflow command is a single line. - render_
json - Render the report as a stable JSON object for CI / scripting. Shape:
{ "ok": bool, "discoverability_score": u8, "counts": {pass,warn,fail,skip}, "results": [ {check_id, check_name, severity, message, suggestion?, location?} ... ] }. The score weights Pass=1.0, Warn=0.5, Error=0; Skipped excluded from the denominator. - render_
junit - Render the report as JUnit XML (xUnit-style) for CI dashboards that
consume test-report artifacts (GitLab CI, Jenkins, CircleCI). Each result
becomes a
<testcase name="<check_id>">;Errorseverities are<failure>elements (counted infailures),Warnseverities attach the message + suggestion as a<system-out>note on an otherwise-passing case, andSkippedemit a<skipped/>marker. - render_
sarif - Render the report as SARIF 2.1.0 for GitHub Code Scanning upload-sarif.
Only
WarnandErrorresults are emitted (SARIF reports failures, not passes). Each result mapsruleId→check_id,level→"warning"or"error",message→ CheckResult message,locations→ file + line when available. Pass/Skipped results are omitted. - run
- Run the full verify suite against
root, returning the aggregate report.