# Citation Fixer

> GBrain-inspired citation audit for Codex. Use when the local brain corpus needs citation normalization or a pass over remaining uncited lines.

- Skill: `mphaxise/citation-fixer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mphaxise/citation-fixer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mphaxise/citation-fixer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: mphaxise (https://skillmd.com/u/mphaxise)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mphaxise/citation-fixer

---


# Citation Fixer

Use this skill when the user wants citation cleanup or when a brain-writing change touched enough pages that citation drift is a risk.

This port is adapted from `garrytan/gbrain` at commit `0b47afbf402a4e27a648bb9d131ce584461461ea`.

## Workflow

1. Audit first:
   - `python3 scripts/brain_citations.py --verbose`
2. Normalize formatting when useful:
   - `python3 scripts/brain_citations.py --fix --verbose`
3. Read the remaining gaps manually.
4. Fix missing citations with real sources or leave them explicitly unresolved.

## Current Upstream Coverage

Resolve broken social-post citations by extracting searchable text, locating the canonical post, verifying author/date/content, and patching only after confirmation. In batch mode prioritize missing primary sources, then broken URLs, then weak secondary citations; respect rate limits and report unresolved references.

## Guardrails

- Do not invent citations for unsupported facts.
- Do not bulk-normalize without reading the remaining unresolved lines.
- Treat this as a quality pass, not a reason to rewrite unrelated content.

