Agent skill

audit-crossrefs

Phase 7: Convert hardcoded cross-references to auto-updating NOTEREF fields

Stars 6
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/edwinhu/workflows/tree/main/skills/bluebook-audit/skills/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

  1. Scan footnotes for supra note N and infra note N patterns
  2. Add bookmarks to target footnoteReferences in document.xml
  3. Replace hardcoded numbers with NOTEREF field codes
  4. Preserve existing NOTEREFs and bookmarks

Script

bash
# Preview changes
python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/create_crossrefs.py" --docx <path> --dry-run

# Apply (creates .bak backup)
python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/create_crossrefs.py" --docx <path>

Workflow

  1. Dry run first — review the cross-reference map and bookmark plan
  2. Apply — the script backs up the original before writing
  3. Verify in Word — open the DOCX, press Ctrl+A then F9 to update all fields
  4. Spot-check — confirm 5-10 supra references display the correct numbers
  5. 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

Expand your agent's capabilities with these related and highly-rated skills.

edwinhu/workflows

audit-fix-loop

This skill should be used when the user asks to 'iteratively improve', 'audit and fix', 'hill-climb quality', 'grade and improve', 'score and fix', 'audit loop', 'quality loop', or needs structured iterative improvement of an artifact using scored independent audits. Also use when the user invokes a ralph loop for quality improvement rather than task completion.

6 1
Explore
edwinhu/workflows

ds-spec-reviewer

Internal skill used by ds-brainstorm at Phase 1 exit gate. Dispatches a reviewer subagent to verify SPEC.md completeness before planning. NOT user-facing.

6 1
Explore
edwinhu/workflows

pptx-render

Use when the user asks to "render pptx", "show pptx slide", "compare with pptx", "pptx to image", "export pptx slide", "original slide", "show me the original", "what does the pptx look like", or needs to extract a specific PPTX slide's content for visual comparison.

6 1
Explore
edwinhu/workflows

obsidian-organize

Organize Obsidian notes according to clawd's preferences. Use when user asks to "organize notes", "move notes to right folder", "clean up vault", "tidy vault", "file this note", or when creating new notes in the Obsidian vault. Also use when moving, renaming, or categorizing notes, or when the vault root has stray files.

6 1
Explore
edwinhu/workflows

dev-verify

This skill should be used when the user asks to 'verify completion', 'check that tests pass', 'confirm feature works', or REQUIRED Phase 7 of /dev workflow (final). Enforces fresh runtime evidence before claiming completion.

6 1
Explore
edwinhu/workflows

dev

This skill should be used when the user asks to 'start a feature', 'build a feature', 'implement a feature', 'develop', 'new feature', or needs the full 7-phase development workflow with TDD enforcement.

6 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results