three-graph-router

three-graph-router is a skill for Claude Code, Codex from AnthonyAlcaraz/agentic-graph-rag-skills. It costs 219 tokens per session (2,290 once invoked), scanned A, original, MIT.

A router for separating incoming information into three graphs: trusted domain data, original source text, and facts extracted by a language model. RAG, or retrieval-augmented generation, uses source text to help an agent answer questions.

In plain words
What is it for?
Use it to route databases and curated records, source documents, and model-extracted facts into the right storage layer while preserving provenance and uncertainty.
Why use it?
It prevents uncertain extracted facts from polluting trusted data and preserves where each piece of information came from.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to route databases and curated records, source documents, and model-extracted facts into the right storage layer while preserving provenance and uncertainty.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AnthonyAlcaraz/agentic-graph-rag-skills --skill three-graph-router
Clone the repo
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for three-graph-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router/github.svg)](https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router)
Your own site
<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for three-graph-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/three-graph-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 219 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00219 $0.02290
Opus 5 $0.00110 $0.01145
Sonnet 5 $0.00044 $0.00458
Haiku 4.5 $0.00022 $0.00229

Measured 12d ago against content hash 63c2ed925a90, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

three-graph-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (cli.py, lib.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/knowledge-representation/three-graph-router/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Three-Graph Router

Overview

Real agentic systems integrate trusted structured data (CSVs, databases) with untrusted extracted data (documents, reviews). Merging them into one graph is the failure: unverified information pollutes trusted data, provenance is lost, extraction errors cascade, and validating agent reasoning becomes impossible.

The Three-Graph Architecture solves this by separating knowledge on origin, certainty, and semantic role:

  • Domain graph — trusted, curated, entity-resolved. The canonical product list, the definitive org hierarchy. High certainty, stable IDs, protected from contamination.
  • Lexical graph — original unstructured text in structured form. Document and Chunk nodes, immutable, complete provenance (every chunk links back to its source). This is the "retrieval" in RAG.
  • Subject graph — entities/facts an LLM extracted from the lexical graph, kept SEPARATE from domain until entity resolution establishes confident links. Extraction artifacts with explicit uncertainty (confidence, model version, timestamp).

The router refuses the boundary violations that quietly destroy the architecture: raw text without provenance is refused from the lexical graph, extractions without a confidence score are refused from the subject graph, and an extraction is never written straight into the domain graph. The critical operation is entity resolution: a subject entity links to a domain entity via CORRESPONDS_TO only when similarity clears a confidence threshold (default 0.85; 0.95 high-stakes, 0.75 exploratory). The worked example: a review mentions "the Stockholm chair", the system extracts a Subject_Product, finds Product(PROD_12345, "Stockholm Chair") in the domain graph, and links them if similar enough — enabling the cross-graph query domain -> CORRESPONDS_TO -> subject -> EXTRACTED_FROM -> lexical with full provenance.

When to Use

  • Ingesting mixed structured + unstructured sources into one agent knowledge base
  • Designing the trusted-vs-extracted separation for a graph RAG system
  • Preventing LLM extraction errors from contaminating a system of record
  • Implementing the CORRESPONDS_TO linkage between extracted and canonical entities

Read the full file on GitHub · 156 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 156 lines · 219 tokens per session scan A 63c2ed925a90

Subscribe to this mod's changes

three-graph-router is a skill published in the GitHub repository AnthonyAlcaraz/agentic-graph-rag-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 219 tokens to every session and 2,290 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

graphify

Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community…

Graphify-Labs/graphify · 76 tokens

library

Sync agent memory files to a Cortex knowledge graph for enhanced retrieval, hybrid search (vector + keyword + graph), AI-powered Q&A with agentic deep research, and knowledge graph exploration.

mocaOS/cortex-app · 39 tokens

agent-v3-memory-specialist

Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.

ruvnet/ruflo · 25 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

jetson-inference-mem-tune

Pick the serving stack and per-runtime memory flags (vLLM, SGLang, llama.cpp, TensorRT Edge-LLM) for an LLM/VLM workload on any NVIDIA Jetson.

NVIDIA/skills · 50 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens