Files are cited in code, not links
Markdown link checkers follow [text](path) links and HTML hrefs. Skills cite their files in inline code or prose, so this is invisible to them:
references/rates.md for the tax rates.Open source CLI for Claude Code
A linter and a map for the references between your Claude Code skills, agents, commands and plugins. Catch what breaks before it ships.
$ uvx --from git+https://github.com/albertnahas/skillmap skillmap
No install, no dependencies, no AI. Python 3.10 or newer.
How it works
Skills call other skills, send users elsewhere and read bundled files. Rename one and every caller breaks silently.
Point it at a marketplace, a plugin folder or a GitHub repo. With no arguments it reads your Claude home: every plugin you installed, your personal skills, agents and commands, and the current project.
Every Skill() call, plugin:skill name, /command, sub-agent and file cited in a code span becomes a link. You get one interactive HTML map, one disc per plugin. No server, works offline.
Calls to skills that no longer exist, missing bundled files, call loops, near-duplicates and skills that compete for the same requests. It also catches calls to other plugins that are not declared as dependencies. Each one with its file and line, and skillmap fix repairs the ones with exactly one clear target.
In CI it compares the graph before and after the change, and reports what the change broke and what it fixed. It fails only on new errors, annotates the diff and keeps one summary comment up to date.
Why link checkers miss these
skillmap resolves skill names across plugins (plugin:skill, /command, Skill() calls, sub-agents) and paths written in code spans, scripts included.
Markdown link checkers follow [text](path) links and HTML hrefs. Skills cite their files in inline code or prose, so this is invisible to them:
references/rates.md for the tax rates.plugin:skill and /command are names, not links. Resolving them needs the marketplace's list of plugins. This broke silently when the command was renamed core:archive:
/core:archive-old when done.A note deep inside a skill that cites a reference means the skill's own references/ folder, or ${CLAUDE_PLUGIN_ROOT}, not a folder next to the note:
references/rates.mdOne run on a private marketplace of about 1,000 skills, agents and commands in 140 plugins
The 10 errors: 8 calls to skills or commands that no longer exist under that name (4 with the fix ready: 3 moved to another plugin, 1 renamed), a reference/ folder that is really references/, and a missing reference document.
A miss becomes an error only when a rule proves it: the skill moved to exactly one other plugin (also in code examples, which then went stale), it was renamed to one close name, the reference/ vs references/ typo, or a document missing from a shipped references/ folder. Everything else stays a warning. For frontmatter and schema checks, run claude-skill-lint and claude plugin validate alongside.
Real output
This is the check run on a small example marketplace with two plugins.
$ skillmap check .
skillmap: 3 skills, 1 agents, 1 commands in 2 plugins, 7 links
3 errors, 5 warnings, 2 info
✖ error broken-dependency billing:invoice-writer: billing declares a dependency on ledger, which no marketplace lists
✖ error broken-file-ref billing:invoice-writer: Refers to file references/terms.md, which was not found (plugins/billing/skills/invoice-writer/SKILL.md:17)
✖ error broken-skill-ref billing:invoice-writer: Refers to skill core:archive-old, which was not found (plugins/billing/skills/invoice-writer/SKILL.md:15)
▲ warning near-duplicate billing:invoice-writer: Very similar text to other skills: 2 skills
▲ warning possible-broken-file billing:invoice-writer: Refers to file ../customers/acme.md, which was not found (plugins/billing/skills/invoice-writer/SKILL.md:19)
▲ warning skill-cycle core:proofreader: 2 skills call each other in a loop
▲ warning trigger-overlap billing:invoice-writer: Competes with other skills for the same requests: 2 skills
▲ warning undeclared-plugin-dep billing:invoice-writer: billing uses core without declaring it in plugin.json
$
broken-skill-ref calls a skill, agent or command that does not existbroken-file-ref points to a bundled file that is missingbroken-dependency depends on a plugin no marketplace listsskill-cycle skills call each other in a loopundeclared-plugin-dep calls another plugin without declaring itambiguous-bare-ref a bare name that several plugins havehub many plugins depend on it, so renaming it breaks themisolated nothing links to it and it links to nothingexternal-ref refers to a plugin that was not scannedUse it everywhere
The same check runs wherever skills change, for you and for the agents that edit them.
Checks every pull request. Reports what the change broke and what it fixed, fails only on new errors, annotates the diff, suggests one-click fixes and sends the findings to code scanning.
on: pull_request
permissions:
contents: read
pull-requests: write
security-events: write # for sarif: true
jobs:
skillmap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: albertnahas/skillmap@v0.2.1
with:
sarif: true
Stops a commit that breaks a skill link. --changed reports only what your changes break, including callers in files you did not touch.
repos:
- repo: https://github.com/albertnahas/skillmap
rev: v0.2.1
hooks:
- id: skillmap
#!/bin/sh
skillmap check . --changed
The same check on every merge request, compared with the target branch.
skillmap:
image: python:3.12-slim
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- apt-get update -qq && apt-get install -yqq git > /dev/null
- pip install -q git+https://github.com/albertnahas/skillmap@v0.2.1
- git fetch -q origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
- skillmap check . --base "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
Install it once, then run /skillmap from inside Claude Code to map or check the skills you are working on. It ships the edit hook built in, so Claude fixes what its own edits break.
/plugin marketplace add albertnahas/skillmap
/plugin install skillmap@skillmap
After Claude edits a skill, agent, command or plugin manifest, the hook lints what the change broke anywhere in the repo and hands the findings back, so Claude fixes them itself. The Stop hook checks once more before Claude finishes. Save check-skill-edit.sh next to your project first.
{
"hooks": {
"PostToolUse": [{"matcher": "Edit|MultiEdit|Write",
"hooks": [{"type": "command", "command": "./check-skill-edit.sh"}]}],
"Stop": [{"hooks": [{"type": "command", "command": "./check-skill-edit.sh --stop"}]}]
}
}
JSON or SARIF for scripts, or one combined fix prompt that Claude can act on. Exit codes: 0 clean, 1 findings, 2 usage error.
# Full report for scripts and agents
skillmap check . --format json
skillmap check . --format sarif
# One fix prompt, straight into Claude
skillmap check . --format prompt | claude -p
core:archiveDemo
The map, a renamed skill breaking its callers, and the pull request check. With captions.
$ uvx --from git+https://github.com/albertnahas/skillmap skillmap
Want a permanent command? pipx install git+https://github.com/albertnahas/skillmap
skillmap: 2 new errors, 0 new warnings
3 skills, 1 agents, 1 commands in 2 plugins; 3 errors and 5 warnings in total.
broken-skill-refRefers to skill core:archive-old, which was not foundbroken-file-refRefers to file references/terms.md, which was not found