Skip to content

Citation Graph Ingest

Builds typed citation edges (overrules, relies_on, etc.) across a document corpus in gbrain.

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

What it does

This skill teaches an agent to read a collection of ingested documents, find where one document cites or references another, decide what kind of relationship that is (for example overrules, distinguishes, or relies_on), and store those relationships as typed links in the gbrain knowledge store. Afterwards, you can ask for the chain of references, such as everything a brief relies on that has not since been overruled. The skill is written for a specific tool, gbrain, and does not create new storage on its own.

Great for

  • Teams using gbrain who want to trace legal, academic, patent, or regulatory arguments across many documents
  • Researchers who need to see which papers extend, refute, or supersede others in a corpus
  • Developers building reference-aware retrieval on top of gbrain

Skip it if

  • Users who do not run gbrain, since the skill depends on its link and graph-query commands and will not work otherwise
  • Anyone relying on it for legal or compliance decisions without human review, because edge types are model judgments validated only on a 4-document synthetic fixture
  • Simple similarity search over documents, which the skill does not improve on

Try asking

  • “Build a citation graph over these case law documents and tag which cases overrule others”
  • “Trace the argument through these briefs and show everything this brief relies on”
  • “Create typed reference edges between these regulatory filings using the citation-graph provenance tag”
Step-by-step guide: how to use Citation Graph IngestInstall, 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-graph-ingest.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

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

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip citation-graph-ingest.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 the pipeline on 3-5 edges first and verify a graph-query walk before processing the full corpus
  • Pick one canonical snake_case spelling per relation type, since graph-query matches types exactly
  • Do not expect natural-language gbrain query to follow citation edges yet; use explicit graph-query calls instead

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.