Skip to content

fix(pre-commit): silent-pass CWD bug + link/anchor rot cleanup - #100

Merged
potiuk merged 1 commit into
apache:mainfrom
choo121600:fix-skill-validate
May 10, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
choo121600:fix-skill-validate

Conversation

@choo121600

Copy link
Copy Markdown
Member

Summary

  • Fixes a long-standing silent-pass bug in skill-validate.

    which changed the working directory before startup. As a result,
    Path(".claude/skills") resolved inside the validator subtree,
    zero skill files were scanned, and validation falsely reported OK.

    This PR switches to --project and adds repo-root discovery as an
    additional safeguard.

  • Improves validator behavior:

    • ignore <token> placeholder URLs
    • ignore ellipsis/example URLs (..., …)
    • ignore markdown links inside inline/fenced code blocks
    • align repeated-heading anchors with GitHub slug rules
  • Adds missing prek hooks for the validator itself:

    • ruff-check
    • ruff-format
    • mypy
    • pytest
  • Repairs accumulated link rot discovered once validation started
    scanning real files again (134 -> 0 across 14 skill files),
    including moved docs paths, renamed anchors, outdated references,
    and stale heading slugs.

Why

Previous validations reported 0 violations, but that result came from
the silent-pass bug above. Once the validator started scanning actual
skill files again, it surfaced stale link and anchor references that
had accumulated during earlier docs and AGENTS.md restructures.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@potiuk
potiuk merged commit 6aa4bc5 into apache:main May 10, 2026
12 checks passed
@potiuk potiuk added the substrate:framework-dev Tool substrate: build / validate / eval the framework itself label Sep 25, 2026
@zeroshade zeroshade mentioned this pull request Oct 13, 2026
4 of 5 tasks
@potiuk potiuk added capability:authoring Skills that author or maintain other skills: write-skill, optimize-skill capability:fix Implement code change to resolve an issue capability:intake Import external signal + sync tracker state capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement capability:review Deep per-item code review or contributor mentoring capability:triage Sweep + classify + propose disposition family:ci .github workflows, prek, validators family:pr-management pr-management-* skills family:security security-* skills family:tools tools/* family:utilities utilities skills labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:authoring Skills that author or maintain other skills: write-skill, optimize-skill capability:fix Implement code change to resolve an issue capability:intake Import external signal + sync tracker state capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement capability:review Deep per-item code review or contributor mentoring capability:triage Sweep + classify + propose disposition family:ci .github workflows, prek, validators family:pr-management pr-management-* skills family:security security-* skills family:tools tools/* family:utilities utilities skills substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants