Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

citation-graph-ingest

Skill by garrytan

Builds a typed citation graph over a document corpus already ingested into gbrain. It classifies relations such as overrules, distinguishes and relies_on, then writes them as queryable edges. Aimed at law, academic, patent and regulatory document sets.

  • Score 93
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install citation-graph-ingest

Built from the published package, never by AI.

git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/citation-graph-ingest ~/.claude/skills/citation-graph-ingest

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install citation-graph-ingest in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The citation-graph-ingest skill builds a typed reference graph over documents already ingested into gbrain as a source. It first detects mentions between documents with mechanical patterns, then uses model judgment to classify each edge type, such as overrules, distinguishes, relies_on, extends or supersedes. Low-confidence edges are dropped, and each surviving edge is written with the gbrain link command.

The skill writes no pages. Its only durable writes are typed edges stamped with the citation-graph link source. A run ends with a graph-query walk that must return the written edges before it counts as successful. The source says it targets cite-heavy corpora such as law, academic papers, patents, regulatory filings and book bibliographies. Its validation so far uses a synthetic four-document fixture.

Written from the project's SKILL.md and checked against it.

What it can do

  • Detect candidate mentionsFinds places where one document textually references another, using markdown links, titles and citation strings.
  • Classify edge typesUses model judgment on the citation context to pick one edge type or reject the mention as incidental.
  • Write typed edgesCreates typed edges with gbrain link, stamped with the citation-graph link source.
  • Verify the graph walkRuns gbrain graph-query on a hub document to confirm the written typed edges are returned.
  • Hygiene checksRuns gbrain link-sources and gbrain check-backlinks to confirm edge counts and find orphaned references.

What you need

  • gbrain with the link and graph-query commands
  • A corpus ingested as a gbrain source
  • gbrain sources add and gbrain sync, or gbrain import, to create slugs

Try asking

  • Build a typed citation graph over my ingested corpus source
  • Show incoming overrules edges for doc-a-foundation
  • Run the verification walk and report the edges written

Good to know

  • Natural-language gbrain query does not walk citation edge types yet.
  • Validated only on a synthetic four-document fixture, not a large production corpus.
  • Edges below the confidence floor, 0.5 by default, are dropped.
  • Edges must be written and queried under one source scope.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/citation-graph-ingest/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB
  • routing-eval.jsonl1 KB

Alternatives to citation-graph-ingest

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

citation-graph-ingest: common questions

What does citation-graph-ingest do that similarity search cannot?

The source says flat similarity retrieval cannot tell that document A overrules B or relies_on D. The skill writes typed edges so graph-query can walk those relations.

Does this skill change the pages in my brain?

No. The source says it writes no pages and its only durable writes are typed edges in the links table.

Can I ask gbrain query whether a case is still authoritative?

Not yet. The source says natural-language relational recall does not walk citation edge types, so explicit graph-query commands are the supported route.

How do I install citation-graph-ingest?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is citation-graph-ingest free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is citation-graph-ingest safe to use?

It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to citation-graph-ingest?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

citation-graph-ingest Install

Add to stack

Loading.