Agent skill
audit-crossrefs
Phase 7: Convert hardcoded cross-references to auto-updating NOTEREF fields
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/audit-crossrefs
SKILL.md
Phase 7: Cross-References
Convert hardcoded supra/infra note numbers to NOTEREF field codes that auto-update when footnotes are renumbered.
What This Phase Does
- Scan footnotes for
supra note Nandinfra note Npatterns - Add bookmarks to target footnoteReferences in document.xml
- Replace hardcoded numbers with NOTEREF field codes
- Preserve existing NOTEREFs and bookmarks
Script
BB_SCRIPTS=$(${CLAUDE_PLUGIN_ROOT}/skills/bluebook-audit/scripts)
# Preview changes
python3 "$BB_SCRIPTS/create_crossrefs.py" --docx <path> --dry-run
# Apply (creates .bak backup)
python3 "$BB_SCRIPTS/create_crossrefs.py" --docx <path>
Workflow
- Dry run first — review the cross-reference map and bookmark plan
- Apply — the script backs up the original before writing
- Verify in Word — open the DOCX, press Ctrl+A then F9 to update all fields
- Spot-check — confirm 5-10 supra references display the correct numbers
- Renumber test (optional) — add a footnote before a referenced target and confirm the supra numbers update
What Gets Converted
| Pattern | Example | Result |
|---|---|---|
| Single supra | supra note 42 |
NOTEREF to FN42 bookmark |
| Single infra | infra note 188 |
NOTEREF to FN188 bookmark |
| Range | infra notes 209-210 |
Two NOTEREFs with separator |
| With pincite | supra note 42, at 15 |
NOTEREF + roman , at 15 |
| Existing NOTEREF | (already converted) | Skipped |
What Is NOT Converted (Phase 2 — Future)
- Part/Section references (
supra Section I.A.,infra Part III) - These require a heading-to-bookmark mapping strategy since heading numbering is partially auto-generated
Gate: Exit Cross-References
- Dry run reviewed — cross-reference map is correct
- NOTEREF fields created for all supra/infra note references
- Backup DOCX exists
- Word field update (Ctrl+A, F9) confirms correct numbers
Workflow Complete
Present final summary to user:
- Total formatting corrections applied (from Phase 4)
- Total URLs archived (from Phase 6)
- Total NOTEREF fields created (from Phase 7)
- Final DOCX file path
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?