crombieman/undercurrent-cortex/validate-refs
Claude Code and agent skill by crombieman/undercurrent-cortex
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
This skill should be used to validate the knowledge graph health — checks broken links, orphaned files, stale code paths, canonical violations, and directive contradictions across reference files.
Install
npx vskill@latest install crombieman/undercurrent-cortex/validate-refsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as crombieman/undercurrent-cortex/validate-refs.
Validate References
TL;DR: Run health checks on the reference file knowledge graph. Catches broken links, orphans, stale paths, canonical drift, and contradictions.
When to Use
- After creating or modifying reference files
- Before major releases or deploys
- When reference staleness warnings appear in session-start
- Periodically as a maintenance check
Checks (run all)
1. Broken See Also Links
For every references/*.md file, extract all See Also links. Verify:
- Target file exists
- If link has
#anchor, verify the heading exists in the target file - Report:
BROKEN: scoring.md links to signals.md#nonexistent-section
2. Orphaned Reference Files
For every file in references/, check if at least one other file links to it (via See Also or @import in CLAUDE.md).
- Report:
ORPHAN: references/orphaned-file.md has zero inbound links
3. Stale Code Path References
For every code path mentioned in reference files (matching src/ or supabase/ patterns), verify the path exists in the filesystem.
- Report:
STALE PATH: database.md references src/lib/supabase/old-file.ts (not found)
4. Canonical Violations
For each [canonical] marker in reference files, grep all OTHER reference files for the same fact stated without a (see X.md#section) reference.
- Example: scoring weights appear in both scoring.md (canonical) and pipeline.md (without reference) = violation
- Report:
CANONICAL DRIFT: "33/33/33 weights" found in pipeline.md without reference to scoring.md#scoring-weights
5. Directive Contradictions
Extract all directive lines from reference files (lines containing "always", "never", "must", "must not", "use", "prefer", "avoid"). Group by topic keywords. Flag contradictions.
- Report:
CONTRADICTION: scoring.md says "always use config.invert" but database.md says "use INVERTED_SUB_FACTORS"
6. Frontmatter Completeness
Every reference file should have YAML frontmatter with: title, tokens, last-verified, canonical, triggers, governed-by.
- Report:
MISSING FRONTMATTER: api-routes.md missing "triggers" field
7. Last-Verified Staleness
Check last-verified date in frontmatter. Flag files not verified in 30+ days.
- Report:
STALE: pipeline.md last verified 2026-02-15 (32 days ago)
Output Format
Execution
Run each check using Grep, Glob, and Read tools. Do NOT use bash grep — use the dedicated Grep tool for reliability. Present the full report to the user.
See Also
- plan-audit — Gates 14-15 check reference coverage during planning [workflow]
- pre-commit-checklist — Domain-to-reference mapping warns on stale refs [workflow]
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/validate-refs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crombieman/undercurrent-cortex/validate-refs)