/armory:kg-builderfrom armory
Designs and builds knowledge graphs from documents: ontology modeling, entity/relation/event extraction, entity resolution, provenance, and GraphRAG serving.
Ships in armory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A knowledge graph is a product with a schema, not a pile of triples. Quality comes from pipeline order: model the domain before extracting, validate during extraction, fuse before storing, and attach provenance to every fact from the first write.
This skill covers the full build — value test, ontology, extraction, quality gate, entity resolution, serving, and maintenance — plus the boundary question that decides whether the result is trustworthy: which stages are deterministic code and which are LLM judgment.
Scope note. This is about knowledge graphs — what an agent remembers. It is not about task graphs, agent orchestration, or multi-agent topology.
| File | Contents | Load When |
|---|---|---|
references/ontology-design.md | Competency questions, entity/relation types, domain/range, storage choice | Phase 1 |
references/extraction.md | Source routing, NER/RE/EE prompt patterns, validation, failure modes | Phase 2 |
references/fusion.md | Blocking, matching layers, merge policy, threshold bands | Phase 3 |
references/serving.md | GraphRAG retrieval, path queries, community summaries, query layer | Phase 4 |
references/provenance-and-supersession.md | Claim model, append-only updates, contradiction handling, audit trail | Phase 1 and Phase 4 |
Decide this before writing code. Code owns control flow, identity, validation, and merges. The model gets contained judgments behind a typed interface, each with a measured baseline.
| Stage | Deterministic (code) | LLM judgment (measure it) |
|---|---|---|
| Source routing | format detection, structured mapping | — |
| Entity extraction | span capture, type validation, dictionary matching | "what entities are in this text" |
| Relation extraction | domain/range enforcement, endpoint checks | "which relation does this sentence assert" |
| Quality gate | sampling, scoring, thresholds | — |
| Blocking | key generation, candidate pairing | — |
| Matching | string/attribute/structure scoring | ambiguous middle band only |
| Merge | canonical selection, edge union, lineage | — (never let a model own a merge) |
| Serving | traversal, subgraph selection, serialization | the agent's own reasoning |
Measure every LLM surface against a prompt-only baseline before trusting it. This is not theoretical caution. In a pre-registered real-model evaluation of an LLM-adjudicated dedup and contradiction loop, the loop trailed a plain prompt-only baseline by 0.28–0.33 on detection and safety across every provider cell tested. Adjudication that is not measured is decoration.
ACQUIRED, DEPENDS_ON) — never RELATED_TO. Keep it in
ontology.yaml as the single source of truth; every extraction prompt embeds it verbatim.Validate the schema before extracting anything:
uv run scripts/validate_ontology.py ontology.yaml
OWNS).J. Smith nodes sharing three coauthors
and an affiliation are one person; identical names with disjoint neighborhoods are not);
merge policy is deterministic code that keeps the canonical name, unions aliases and edges,
preserves conflicting values with provenance, and records merged_from for undo.
An erroneous merge is far more damaging than a missed one — it silently fuses two entities'
entire edge sets. Auto-merge only above the high band; queue the middle for review.Check the blocking strategy against labeled pairs before running it at scale:
uv run scripts/blocking_report.py candidates.jsonl --labels matches.jsonl
(head)-[REL {time, source}]->(tail) lines grouped by head. For multi-hop questions retrieve
paths between the query's entities, not neighborhoods around each — the path is the answer
skeleton. Cluster and pre-summarize for "what are the themes" questions.status, supersedes, and validity interval. When a new fact contradicts a stored one, keep
both with time and provenance and prefer the newer at retrieval. Re-run fusion periodically —
unmaintained memory graphs rot exactly like unfused extractions.Deliver these artifacts, in this order:
| Artifact | Contents |
|---|---|
competency.md | The 10–20 questions, each marked answerable or blocked |
ontology.yaml | Entity types, relation types with domain/range, event argument schemas |
extraction/ | Per-source-type prompts and deterministic mappings |
quality-report.md | Sampled entity and relation precision, with sample size and method |
fusion-report.md | Blocking reduction ratio, pair recall, merge counts per band |
| The graph | Nodes and edges, every one carrying source, extracted_at, confidence |
Report precision as a sampled estimate with its sample size. A precision number without a stated sampling method is a vibe.
source, extracted_at, confidence. Non-negotiable; fusion and
trust both depend on it.| Symptom | Cause | Fix |
|---|---|---|
Graph full of Concept/Thing nodes | Extracted without an ontology | Phase 1 first, then re-extract |
| Same person appears as four nodes | No canonical-form rule; fusion skipped | Define the rule in ontology.yaml; run Phase 3 |
| Confident but wrong relations | Co-occurrence treated as assertion | Require evidence quotes; enforce domain/range in code |
| Events flattened into edge soup | No event argument schema | Promote events to first-class nodes with typed arguments |
| Precision collapses as sources grow | One prompt drifting across document types | Per-source-type prompts; run the quality gate per source |
| Fusion merges two real entities | Threshold too low; no structural layer | Raise the auto-merge band; add neighborhood comparison; undo via merged_from |
| Multi-hop answers are wrong but fluent | Unfused duplicates break paths | Re-run fusion; paths cannot cross duplicate boundaries |
| GraphRAG returns noise | Hop expansion too wide | Cap at 2 hops, or re-rank; retrieve paths, not neighborhoods |
| Retrieval is stale after updates | Facts overwritten instead of superseded | Adopt the claim model in references/provenance-and-supersession.md |
evals/cases.yaml (opens in a new tab)references/extraction.md (opens in a new tab)references/fusion.md (opens in a new tab)references/ontology-design.md (opens in a new tab)references/provenance-and-supersession.md (opens in a new tab)references/serving.md (opens in a new tab)scripts/blocking_report.py (opens in a new tab)scripts/validate_ontology.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
knowledge-graph, ontology, entity-resolution, graphrag, provenance
npx claudepluginhub mathews-tom/armory --plugin armory94 skills in this plugin
/adr-writerGenerates Architecture Decision Records capturing context, rationale, alternatives, and consequences in numbered status-tracked format. Triggers on: "write an ADR", "document this decision", "architecture decision record", "decision record", "design decision", "ADR for"./agent-builderBuild AI agents and automate Claude Code programmatically via the Claude Agent SDK and headless CLI mode. Covers Python SDK, claude -p, SDK MCP servers, hooks, sessions. Triggers on: "build an agent", "agent SDK", "headless mode", "automate Claude", "programmatic agent"./animateCreate Manim (Python) animated explainers: algorithm step-throughs, math and equation walkthroughs, pipeline and data-flow diagrams, comparisons and timelines, rendered to MP4, WebM or GIF with optional audio overlay. Includes a template path that renders validated config data with no model call, plus output checks (ffprobe duration, fps, dimensions, full decode, sampled-frame review receipt). Use when asked to "create a video", "animate this", "make an explainer", "manim animation", "animate this algorithm", or "motion graphic". NOT for HTML/CSS/GSAP or Hyperframes video, NOT for React or Remotion video, and NOT for a launch or promo video of the user's own project, use launch-video./api-docs-generatorAudits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec. Triggers on: "generate API docs", "document this API", "OpenAPI for", "FastAPI docs", "document endpoints", "swagger docs"./appraiseEvidence-based competency and seniority appraisal of a software engineer from one or more Git repositories: attributes authorship with git blame, separates fork and upstream code, verifies every cited line, and calibrates technical, scope and overall levels with explicit uncertainty, a development plan and targeted questions. Use this skill when asked to "appraise this developer", "calibrate my seniority", "assess this candidate from their GitHub", "what level am I based on my repos", "review this engineer's contributions", "build a promotion evidence pack", or "how can I grow as an engineer from my code". Covers candidate review, self-appraisal, promotion packs, manager or mentor appraisals with consent, progress over time and recalibration after interview answers. Not for code review of a diff, repository tutorials, or architecture reviews./architecture-diagramGenerate architecture diagrams as fully editable SVG with native AWS, Azure, and GCP icons for cloud diagrams, or hand-drawn generic icons for everything else. Optionally deliver a self-contained editable draw.io mxGraph companion. Deterministic layout computes zone nesting and orthogonal routing instead of hand-placed coordinates. Triggers on: "architecture diagram", "infra diagram", "system diagram", "deployment diagram", "topology diagram", "draw architecture", "AWS diagram", "Azure diagram", "GCP diagram", "cloud infrastructure diagram", "VPC diagram", "draw my AWS setup". Use when a user wants a static architecture diagram they can still edit afterward in Figma, Illustrator, Inkscape, or draw.io. NOT for architecture reviews, use architecture-reviewer.Other plugins' skills for the same job