Guide · Agent skill
How to use the Citation Fixer agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Citation Fixer is an agent skill: a folder of instructions that teaches an AI agent a specific, repeatable task. This one tells the agent to audit a set of knowledge pages, check that each fact carries an inline source citation in the standard format, and repair citations where it can. This guide covers what the skill does, how to install it, how to trigger it, what it depends on, and the safety limits to know before running it on real content.
Quick start
- 1Download the ZIP. Download the citation-fixer ZIP from this page and unzip it. Confirm the folder contains SKILL.md.
- 2Place the folder. Move the citation-fixer folder to ~/.claude/skills/ for all projects, or to a project's .claude/skills/ folder for one project.
- 3Or upload in the apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP instead.
- 4Confirm your requirements. Check that gbrain brain-page tools and the listed convention files are available, and that the X integration is configured if you need tweet resolution.
- 5Test on a sample. Ask the agent to check citations on a few pages and review the report and every changed page before going further.
- 6Run the audit. Ask for a citation audit on a wider scope, such as pages updated this week, and review the remaining-gaps list afterwards.
What the Citation Fixer skill makes the agent do
The skill is written for a gbrain-style knowledge base, where facts live on brain pages and each fact should carry an inline citation such as [Source: ...] with a date and source type. The agent scans pages and flags facts without citations, citations missing a date or source type, and citations in the wrong format. Malformed citations are rewritten to match the standard in conventions/quality.md.
Where a post or tweet is mentioned without a link, the skill tries to find the original through the host's X/Twitter API integration and then patches the page with a verified https://x.com/<handle>/status/<id> link. Unsourced facts are flagged, not invented. At the end it reports pages scanned, citations found, issues fixed, tweet links resolved and remaining gaps.
- Flags facts with no citation and reports the location
- Rewrites malformed citations to the standard format
- Resolves tweet references lacking URLs through the X API
- Reports counts: pages scanned, issues fixed, remaining gaps
Install the Citation Fixer skill from ZIP
Download the citation-fixer ZIP from this page and unzip it. Put the resulting citation-fixer folder, which contains SKILL.md, in one of two places: ~/.claude/skills/ to make it available across your projects, or a project's .claude/skills/ folder to limit it to that project.
If you use the Claude apps instead, upload the ZIP under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/citation-fixer/
- Project install: .claude/skills/citation-fixer/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Trigger the skill with natural requests
You do not need a special command. The skill's documented triggers are phrases such as "fix citations", "fix broken citations", "citation audit", "check citations" and "citation fixer". Use one of these, and name the scope: a single page or a batch of pages.
The skill can also be called by other skills, such as enrich or media-ingest, before they commit output.
- "Check citations on this page"
- "Run a citation audit across the brain"
- "Fix broken citations on the pages updated this week"
- "Find tweets on these pages that have no x.com link"
Understand what a run looks like
A run follows five phases: scan the pages, identify issues, fix format problems, resolve tweet references through the X integration, and report results. For batch work the source suggests a target of about 50 pages per run, with 1-3 API calls per page and commits every 10-20 pages so a failure does not lose progress.
The source gives this report layout:
- Pages scanned
- Citations found
- Issues fixed
- Tweet links resolved
- Remaining gaps (pages with uncitable facts)
Citation Audit Report
=====================
Pages scanned: N
Citations found: N
Issues fixed: N
Tweet links resolved: N
Remaining gaps: N (pages with uncitable facts)Find pages with tweet references that lack links
For batch sweeps, the skill includes a shell loop that lists Markdown files mentioning tweets or posts but containing no x.com status links. It uses find and grep, so you need a shell environment with those tools. Review the list before any fixes are made.
Prioritise pages recently created or updated, then high-traffic pages, then everything else.
- Requires find and grep in the shell
- Excludes node_modules directories
- Lists candidates only; it does not edit files
for f in $(find . -name "*.md" -not -path "./node_modules/*"); do
refs=$(grep -ci "tweet\|posted\|x post\|RT\|retweet\|said on X" "$f")
links=$(grep -c "x.com/.*/status/" "$f")
if [ "$refs" -gt 2 ] && [ "$links" -eq 0 ]; then
echo "$f"
fi
doneSafety notes: scripts, network and page edits
This skill runs scripts and uses the network. The batch loop runs shell commands, and tweet resolution calls the X API through an integration your host has configured. The skill is marked as mutating: it rewrites brain pages. The source warns that the skill rewrites pages and cannot be trusted to get every fix right, so check a sample before any bulk run.
The skill also sets rules: never compose tweet URLs by guessing the tweet id, never delete facts that lack citations, and never overwrite a page with an older copy after a revision_conflict. If get_page returns page_not_found for a cited source, the citation is marked unresolvable rather than rewritten to a guessed slug.
- Test on a sample of pages first (see conventions/test-before-bulk.md)
- Keep backups or version history of your pages before a batch run
- Respect the X API tier limits configured by your host
- Review the remaining-gaps list by hand
Check what you need before running it
The skill depends on several things that are not included in the provided files. You need gbrain brain-page tools (search, get_page, put_page, list_pages), the convention files the skill references, an X/Twitter API integration configured by your host for tweet resolution, and a shell with find and grep for batch mode.
Without the gbrain tools and conventions, the skill has no pages to read or standard to match. Without the X integration, the tweet-resolution step cannot run, but the format checks still apply.
- gbrain tools: search, get_page, put_page, list_pages
- Conventions: conventions/quality.md, _output-rules.md, agent-operator-protocol.md, test-before-bulk.md
- X/Twitter API integration (recipe under recipes/x-api/)
- Shell with find and grep for batch mode
What people use it for
- Keeping citation format consistent across a gbrain knowledge base maintained by a team
- Adding verified x.com links to tweets that a researcher quoted without a URL
- Running a periodic batch cleanup of citation quality across many pages
- Finding facts with no citation so an editor can source or remove them
Frequently asked questions
How do I install the citation-fixer skill?
Download the citation-fixer ZIP from this page and unzip it. Place the citation-fixer folder, which contains SKILL.md, in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
Is the citation-fixer skill free to use?
The source material provided for this page is MIT licensed. It does not state any price, so check the repository for licence details before relying on it commercially.
What does the citation-fixer skill need to run?
It needs gbrain brain-page tools (search, get_page, put_page, list_pages) and the convention files it references. Tweet resolution also needs an X/Twitter API integration configured by your host, and batch mode needs find and grep in a shell.
Will the skill invent sources for facts that have none?
No. The skill says to flag unsourced facts rather than invent or guess citations, and it does not delete facts that lack citations.
Can I use this skill outside a gbrain knowledge base?
The skill is specific to gbrain. Its conventions and page tools are tied to that system, so it is not designed for single documents outside a brain-page setup.
Why should I test before running a bulk fix?
The skill rewrites pages and its own guidance says it cannot be trusted to get every fix right. Check a sample first, following conventions/test-before-bulk.md, and review changes before committing a large batch.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
The Citation Fixer suits maintainers of a gbrain-style knowledge base who want consistent citations and verifiable X links, and teams that run periodic cleanups. It is a poor fit if you want an agent to fill in missing sources, if your content is not in brain pages, or if you want unreviewed bulk edits. Choose a different tool for general reference checking outside gbrain.
Download the skill