An Agent Skill for Claude that builds, queries, validates, and reasons over knowledge graphs. Turn unstructured information into structured, queryable, adversarially-validated knowledge.
Built by Swarm Labs USA | GitHub
This skill teaches Claude to work as a knowledge engineer:
- Build structured knowledge graphs from unstructured text, documents, or research
- Query graphs with traversal, path finding, hub detection, and neighbor search
- Validate new facts adversarially against existing knowledge (antonym, negation, consistency, and source checks)
- Reason over graphs using a 6-step deterministic pipeline: OBSERVE > CLASSIFY > HYPOTHESIZE > VERIFY > REFINE > DECOMPOSE
- Maintain graphs with health metrics, automatic splitting, and merge operations
LLMs hallucinate facts. Knowledge graphs don't.
This skill encodes a proven approach: graph + composition + verification beats raw model reasoning. Instead of asking an LLM to remember everything, structure knowledge as nodes and edges, validate every new fact against what's already known, and reason deterministically over the result.
The same principle is proven in the Math Swarm: replacing token prediction with deterministic computation achieves 100% accuracy where a 32B model alone achieves 93%. This skill applies the same principle to knowledge — structured retrieval instead of memorized guessing.
77 knowledge graphs deployed across 69 cluster domains. Measured results:
| Metric | Value |
|---|---|
| Knowledge graphs in production | 77 |
| Cluster domains covered | 69 (from finance to defense to healthcare) |
| Query cost | $0/query — all operations deterministic |
| False positive reduction | 60%+ with two-engine search (0.95 + 0.85 threshold) |
| Validation checks per fact | 4 (antonym, negation, consistency, source credibility) |
| Reasoning pipeline steps | 6 (OBSERVE > CLASSIFY > HYPOTHESIZE > VERIFY > REFINE > DECOMPOSE) |
| Edge types standardized | 10 typed relationships |
| Format | JSON-LD with kg: namespace |
The 77 graphs span: AI/ML, algorithms, ARC reasoning, architecture, blockchain, causal reasoning, chip fabrication, code quality, crypto, finance, game design, healthcare, math olympiad, mathematics, mechanical interpretability, networking, performance engineering, physics, quantum computing, robotics, security, and more.
# From GitHub
/plugin install github:michaelwinczuk/knowledge-graph-reasoning"Build a knowledge graph from these research notes about quantum computing..."
"I have a KG about our microservices architecture. Validate this new fact:
'Service A no longer depends on Service B since the March refactor.'"
"Find the path between 'user_signup' and 'revenue_event' in this graph."
"Run a health check on this knowledge graph."
Every new fact goes through a 4-check pipeline before being added to a graph:
- Antonym detection — "X increases Y" vs existing "X decreases Y"
- Negation detection — "X does not cause Y" vs existing "X causes Y"
- Consistency check — Type mismatches, value range violations, temporal conflicts
- Source credibility — Compares authority and recency of sources
Contradictions are never silently resolved — they're presented to the user with both sources.
Large graphs are searched in two passes:
- Specific first (0.95 threshold) — Exact/near-exact matches
- General fallback (0.85 threshold) — Fuzzy matching if specific returns nothing
Prevents irrelevant results from drowning out precise matches.
The 6-step reasoning pipeline (OBSERVE > CLASSIFY > HYPOTHESIZE > VERIFY > REFINE > DECOMPOSE) produces reproducible analysis over graph data. Confidence scores propagate through inference chains with automatic decay.
| Type | Meaning |
|---|---|
causes |
A leads to B |
requires |
A needs B |
contradicts |
A conflicts with B |
supports |
A provides evidence for B |
contains |
A includes B |
precedes |
A comes before B |
similar_to |
A resembles B |
derived_from |
A was created from B |
influences |
A affects B indirectly |
instance_of |
A is an example of B |
knowledge-graph-reasoning/
├── SKILL.md # Core skill (loaded by Claude)
├── README.md # This file
├── LICENSE # Apache 2.0
├── scripts/
│ ├── validate.py # Adversarial fact validation
│ └── traverse.py # Graph traversal and query engine
├── references/
│ ├── schemas.md # Complete JSON-LD schemas for nodes, edges, graphs
│ └── examples.md # Worked examples with real graphs
└── evals/
└── evals.json # 5 test cases for skill evaluation
| Project | What It Does | Status |
|---|---|---|
| Math Swarm | Zero-hallucination computation. 1,079 tests, 100%, 12 categories, 15 clinical formulas. | 1,079 tests passing |
| Swarm Orchestrator | Multi-agent design patterns, chalkboard protocol, deterministic-first cascade. | 5+ swarms validated |
| PRISM | Reliability primitives — VotingMesh, Sentinel, checkpoint/replay. | 95 tests passing |
| Bastion | Safety kernel — consensus, verification, SHA-256 audit trails. | Rust + Tokio |
| Swarm Labs USA | Autonomous AI systems for government. | Active |
Apache 2.0 — See LICENSE for details.
Built by Michael Winczuk at Swarm Labs USA