Skip to content

feat(skill-manage): add 'lint' — library audit + promotion gate (composes skill-librarian)#18

Open
LeoLin990405 wants to merge 1 commit into
mainfrom
feat/skill-librarian-lint-gate
Open

feat(skill-manage): add 'lint' — library audit + promotion gate (composes skill-librarian)#18
LeoLin990405 wants to merge 1 commit into
mainfrom
feat/skill-librarian-lint-gate

Conversation

@LeoLin990405

Copy link
Copy Markdown
Owner

What

Adds skill-manage.sh lint — the library-health check the forge → candidate → install path was missing — by composing with the standalone skill-librarian linter (not merging: grimoire stays the create/install side, skill-librarian stays the tiny vendor-neutral audit tool).

The linter is vendored as one file, scripts/lib/skill_lint.py (Python; stdlib + optional PyYAML, degrades to a regex parser when PyYAML is absent — consistent with the python3 already used in doctor).

Two modes

  • skill-manage.sh lint [--index] — audit the canonical library: dup / near-dup / name-collision / dead [[wiki]] link / description-quality / stub / orphan. --index rewrites INDEX.md.
  • skill-manage.sh lint --pack <dir>promotion gate: check a candidate skill pack for name/content collisions against the library before installing it. Non-zero exit = do not promote.

Verified locally

lint --pack <colliding "pdf" candidate>   → ❌ 与库中已有 skill 同名: pdf   → exit 1
lint --pack <unique candidate>            → 0 error                        → exit 0
lint (audit ~/.claude/skills, 358 skills) → 0 error / 95 warn / 4 info      → exit 0

bash -n clean. No new hard deps.

Not a merge

skill-librarian keeps its own repo (broad, single-file, vendor-neutral); grimoire just vendors + calls it at the gate. Unix-compose, not one big熔炉.

Composes with the standalone skill-librarian linter (vendored single file at
scripts/lib/skill_lint.py). Two modes:
  skill-manage.sh lint [--index]   → audit the canonical library
  skill-manage.sh lint --pack <d>  → gate a candidate pack vs the library
                                      (non-zero exit = collision → don't promote)

Fills the quality check the forge → candidate → install path lacked. Python
stdlib + optional PyYAML (regex fallback when absent), consistent with the
existing python3 usage in 'doctor'.
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