/aiwg-dev:link-checkfrom aiwg-dev
Verifies @file references in AIWG skills and agents against the linking contract, with per-file or corpus-wide scanning and optional auto-fix for legacy bare refs.
Ships in aiwg-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You verify every @file reference in AIWG distributable skills and agents against the full linking contract, producing a structured PASS/WARN/FAIL report per reference. You can run against a single file, a directory, or the full agentic/code/ corpus, and optionally auto-migrate legacy bare refs to the @$AIWG_ROOT/ prefix.
/link-check [path] [options]
| Argument | Default | Description |
|---|---|---|
| path | current file or agentic/code/ | File or directory to check |
| --fix | off | Auto-migrate @agentic/code/, @src/, @docs/, @tools/ → @$AIWG_ROOT/ |
| --report | off | Output structured JSON report instead of human-readable |
| --aiwg-only | off | Check only .aiwg/ refs (skip bare-core and forbidden checks) |
| --fail-on-warn | off | Treat WARN as FAIL (useful for CI) |
Each @<path> reference is classified per the AIWG linking contract:
| Pattern | Result | Reason |
|---|---|---|
@$AIWG_ROOT/<path> | PASS | AIWG core file, install-relative |
@$TOKEN/<path> — TOKEN set in env | PASS | Registered corpus token |
@$TOKEN/<path> — TOKEN NOT set | WARN | Unknown token — add to .env or export |
@.aiwg/<path> — in Tier 1/2 allowlist | PASS | Normalized project memory |
@.aiwg/<path> — not in allowlist | FAIL | Repo-local only — silently fails in user projects |
@.claude/<path> | FAIL | Deployment target — forbidden in distributable source |
@agentic/code/<path> | WARN | Legacy bare ref — use @$AIWG_ROOT/agentic/code/ |
@src/<path> | WARN | Legacy bare ref — use @$AIWG_ROOT/src/ |
@docs/<path> | WARN | Legacy bare ref — use @$AIWG_ROOT/docs/ |
@tools/<path> | WARN | Legacy bare ref — use @$AIWG_ROOT/tools/ |
| Relative path within component | PASS | Local ref |
agentic/code/manifest.json files under agentic/code/; collect memory.creates[*].path; add Tier 1 entries@$TOKEN/ classification)@<path> refs — regex: @[\$\.]?[a-zA-Z0-9_/.\-]+ in each .md file--fix: rewrite WARN-classified bare legacy refs in-place:
@agentic/code/ → @$AIWG_ROOT/agentic/code/@src/ → @$AIWG_ROOT/src/@docs/ → @$AIWG_ROOT/docs/@tools/ → @$AIWG_ROOT/tools/Link Check: ${CLAUDE_PLUGIN_ROOT}/skills/dev-doctor/SKILL.md
PASS $AIWG_ROOT/${CLAUDE_PLUGIN_ROOT}/rules/addon-boundaries.md
PASS .aiwg/AIWG.md (Tier 1, always present)
WARN ${CLAUDE_PLUGIN_ROOT}/rules/skill-placement.md
→ legacy bare ref; use $AIWG_ROOT/agentic/code/... prefix
FAIL .aiwg/planning/issue-driven-ralph-loop-design.md
→ non-normalized .aiwg/ path (repo-local only)
Result: 2 issues (1 WARN, 1 FAIL)
When run against a directory:
Link Check: agentic/code/ (corpus-wide)
Files checked: 247
References found: 1,341
PASS: 1,337
WARN: 3
FAIL: 1
Violations:
WARN agentic/code/addons/my-addon/skills/my-skill/SKILL.md:42
agentic/code/... (bare ref) → add $AIWG_ROOT/ prefix
FAIL agentic/code/addons/my-addon/skills/my-skill/SKILL.md:89
.aiwg/planning/my-design.md → non-normalized (repo-local only)
Overall: WARN (3 warnings, 1 failure)
Run with --fix to auto-migrate WARN refs.
--report){
"target": "agentic/code/",
"timestamp": "2026-04-01T04:48:00Z",
"summary": { "files": 247, "refs": 1341, "pass": 1337, "warn": 3, "fail": 1 },
"violations": [
{
"file": "agentic/code/addons/my-addon/skills/my-skill/SKILL.md",
"line": 42,
"ref": "${CLAUDE_PLUGIN_ROOT}/rules/skill-placement.md",
"result": "WARN",
"message": "legacy bare ref — add $AIWG_ROOT/ prefix",
"fix": "$AIWG_ROOT/${CLAUDE_PLUGIN_ROOT}/rules/skill-placement.md"
}
]
}
--fix)Only WARN-classified legacy bare refs are auto-fixed. FAIL refs (repo-local .aiwg/ paths, .claude/ refs) are never auto-fixed — they require a human decision:
memory.createsAfter --fix, report how many refs were migrated and re-run the check to confirm the result.
Use --report --fail-on-warn for CI:
# Fails if any FAIL or WARN refs found
aiwg link-check agentic/code/ --report --fail-on-warn > link-report.json
Exit codes:
0 — all PASS1 — WARN found (only if --fail-on-warn)2 — FAIL foundUser: "check links in the dev-doctor skill"
Action: Run link-check on ${CLAUDE_PLUGIN_ROOT}/skills/dev-doctor/SKILL.md.
User: "any bad links in the corpus?"
Action: Run link-check on agentic/code/ and summarize violations.
User: "link check --fix"
Action: Run link-check on agentic/code/, migrate all bare legacy refs, report how many were fixed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
link-check, aiwg, file-references, linking-contract, auto-fix
npx claudepluginhub jmagly/aiwg --plugin aiwg-dev13 skills in this plugin
/devkit-create-commandAlias of add-command — Create a command inside an addon or framework./devkit-create-extensionAlias of scaffold-extension — Create an extension inside a parent framework.Other plugins' skills for the same job