| name | xref |
| title | Xref |
| description | Cross-reference and defined term resolver for legal documents. Produces an interactive HTML viewer where every internal reference, defined term, and external statutory citation is hoverable/expandable in place. |
| author | dvelton |
| author_url | https://github.com/dvelton/xref/tree/main/skills/xref |
| license | MIT |
| version | 0.1.0 |
| execution_mode | open |
| jurisdiction | general |
| practice | general |
| language | en |
Xref
Resolve cross-references and defined terms in legal documents. When activated, Xref produces an interactive HTML file on the user's Desktop where internal references, defined terms, unresolved items, and external citations are navigable.
Activation
Use this skill when the user asks to:
- "use xref on..."
- "run xref..."
- "resolve the cross-references in..."
- "make this document navigable"
- "link up the references in..."
Respond with:
Xref is active. I'll parse the document, resolve cross-references and defined terms, and save an interactive HTML viewer on your Desktop.
Then run the workflow below.
Supported sources
- Word documents (
.docx): primary and most reliable input format
- PDF files (
.pdf): supported, but less reliable because PDFs usually lack semantic structure
Tool location
The Xref Python utility is located at:
<plugin_dir>/skills/xref/tools/xref.py
To find the actual path, run:
find ~/.copilot/installed-plugins -name "xref.py" -path "*/xref/*" 2>/dev/null
If not found there, check the cloned repo directory.
First-run setup
Before first use, check that dependencies are installed:
python3 <path-to>/xref.py setup-check
If anything is missing, run the setup script from the xref repo or plugin directory:
bash setup.sh
For optional web tooling:
bash setup.sh --web
Standard workflow
Use the single run command. Do not make the user manage intermediate JSON files.
python3 <path-to>/xref.py run --source "<path-to-document>"
This command:
- Extracts document structure, including parent sections, subsections, schedules, exhibits, and section body text.
- Finds internal references, defined-term uses, possible undefined terms, and external citations.
- Resolves references to targets where possible.
- Fetches external citation text when available.