doc-xref
User-invoked as /doc-xref <target>. Finds every inbound reference to a doc path, heading/anchor, or code symbol - across docs/ AND src/ docstrings and comments - so a rename, move, split, or reworded
SKILL.md.claude/skills/doc-xref/SKILL.md
GitHubDoc Cross-Reference
Find and update everything that points at $ARGUMENTS (a doc path, a heading
text/anchor, or a public symbol). Complements /link-check, which validates a
file's outbound links; this finds inbound references so a change propagates
instead of leaving stale pointers.
examples/rename-propagation.md is a full worked sweep (rename a spec + a heading, update every inbound hit across docs and code).
Steps
Prerequisite — linkify bare mentions so prose references become discoverable links before the inbound search runs:
python scripts/linkify_doc_mentions.pyEnumerate inbound references across both trees:
- Docs: links
](<path-or-anchor>), bare path mentions, and prose mentions of the heading/title indocs/**, repo-root*.md, and.claude/**. - Code: docstring / comment pointers in
src/**andtests/**(e.g.See docs/specs/PRODUCTION_DESIGN_SPEC.md §6.4), plus the symbol name itself when the target is a symbol.
git grep -nF "<target>" # exact path / anchor / symbol; repeat for old name + anchor- Docs: links
Rename/move: update every hit to the new path/anchor;
git mvwhen renaming a whole file so history follows.Reworded section: update mentions whose surrounding text now misstates the section (registry descriptions, "see X" summaries, titles).
Update the
docs/README.mdregistry line if a file was added/renamed/removed.Verify with
/link-check(orpython scripts/check_doc_links.py).
Output
List each reference updated (file:line, old → new) and confirm /link-check
passes. Flag any reference you could not safely auto-update for human review.
Complement: /link-check validates outbound links from any file you edited -
doc-xref covers inbound, link-check covers outbound. Run both after a rename.
Completion checklist
- Every hit from
git grepis updated - file:line list provided in output - Any reference not safely auto-updated is explicitly flagged for human review
-
docs/README.mdregistry line updated if the file was renamed or moved -
/link-checkexits 0 after all edits