Skip to content

Citation Fixer

Audits brain pages for citation format and resolves broken tweet references to real X links

Repository
garrytan/gbrain
Stars
31,447
Licence
MIT
Files
1 file

What it does

This skill teaches an AI agent to review a set of knowledge pages (a 'brain' of notes) and check that every fact carries an inline source citation in a standard format, with a date and source type. Where a citation is malformed, the agent rewrites it to match the standard; where a post or tweet is mentioned without a link, the agent tries to find the original through the host's X/Twitter API integration and adds a verified x.com link. It then reports counts of pages scanned, issues fixed and remaining gaps.

Great for

  • Maintainers of a gbrain-style knowledge base who want consistent source citations
  • Researchers or writers who reference social media posts and need verifiable links
  • Teams running a periodic batch cleanup of citation quality across many pages

Skip it if

  • Users who want the agent to invent or fill in missing sources: the skill says to flag unsourced facts, not guess them, and guessing would create false citations
  • Single documents outside a brain-page system, since the conventions and page tools it relies on are specific to gbrain
  • Bulk edits run without review: the skill itself recommends checking a sample first, because it rewrites pages and cannot be trusted to get every fix right

Try asking

  • “Fix citations on this page”
  • “Run a citation audit across my brain pages and report the gaps”
  • “Resolve the broken tweet references on the pages I edited this week”
  • “Check citations on the pages that mention posts from X but have no links”
Step-by-step guide: how to use Citation FixerInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    citation-fixer.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip citation-fixer.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip citation-fixer.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run on a small sample of pages first and review the rewritten citations before any batch run, as the skill advises.
  • Check that the X API credentials and rate limits are set up by your host before starting, since tweet resolution depends on them.
  • Keep a backup or version history of the brain pages, because the skill rewrites pages (marked mutating: true) and resolves conflicts by re-reading them.

What's inside

  • SKILL.md

Redistributed unmodified from garrytan/gbrain under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.