LLM Extraction & KG Construction

LLM Extraction & KG Construction is a skill for Claude Code, Codex from docxology/template. It costs 23 tokens per session (204 once invoked), scanned A, original, Apache-2.0.

A language-model pipeline that extracts structured claims from ordinary text and stores them as RDF or nanopublications. RDF is a format for linked facts, while a nanopublication packages a claim with its evidence and provenance.

In plain words
What is it for?
It is for building knowledge graphs from documents, creating extraction prompts, filtering low-confidence claims, and saving large result sets incrementally.
Why use it?
It turns unstructured research text into reusable, traceable data and reduces unsupported claims by applying confidence checks and allowing uncertain results.

Skill for Claude CodeCodex

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

Good fit It is for building knowledge graphs from documents, creating extraction prompts, filtering low-confidence claims, and saving large result sets incrementally.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/docxology/template/knowledge_graph
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 docxology/template --skill knowledge_graph
Clone the repo
git clone --depth 1 https://github.com/docxology/template

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 LLM Extraction & KG Construction

README.md
[![agentmods](https://agentmods.dev/badge/skills/docxology/template/knowledge_graph/github.svg)](https://agentmods.dev/skills/docxology/template/knowledge_graph)
Your own site
<a href="https://agentmods.dev/skills/docxology/template/knowledge_graph"><img src="https://agentmods.dev/badge/skills/docxology/template/knowledge_graph/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 LLM Extraction & KG Construction

Your own site · 80×15
<a href="https://agentmods.dev/skills/docxology/template/knowledge_graph"><img src="https://agentmods.dev/badge/skills/docxology/template/knowledge_graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 204 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.00023 $0.00204
Opus 5 $0.00012 $0.00102
Sonnet 5 $0.00005 $0.00041
Haiku 4.5 $0.00002 $0.00020

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

Security

Grade A, and why

LLM Extraction & KG Construction 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 5d ago.

The scan reads SKILL.md. This mod also ships 13 executable files (__init__.py, calibration.py, extraction.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.

projects/templates/template_literature_meta_analysis/src/knowledge_graph/SKILL.md · 15 lines

What it actually says

Instructions

You are interacting with the src/knowledge_graph/ module. This handles the transition from natural language text to structured assertions via Large Language Models.

Agentic Interface (MCP Strategy)

  1. Config-Driven Orchestration: Never hardcode LLM parameters (models, temperature, minimum confidence thresholds) within Python scripts. Bind them tightly to LLMConfig structures derived securely from config.yaml.
  2. Robust Categorization: Respect strict boundaries on confidence gating. When crafting or modifying prompt templates, ensure the extraction schema firmly permits "irrelevant", "neutral", and "don't know" states to neutralize base-model hallucination tendencies.
  3. Streaming Persistence: Assertions must emit safely to disk via incremental JSON Lines or valid TriG records. High-volume document processing should not accumulate global lists in RAM.
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. 5d ago First seen · 15 lines · 23 tokens per session scan A e39c7f58c01d

Subscribe to this mod's changes

LLM Extraction & KG Construction is a skill published in the GitHub repository docxology/template (19 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 204 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

shipjaw-prompt

Turns a rough, messy, or vague product idea into a dense build-ready product prompt and persists it at documentation/product/source-prompt.md for shipjaw-build. Use when the user wants to express/clarify/polish a product before scaffolding, mentions idée vague, brainstorm app, help me write the prompt, notes produit…

XyDisorder/shipjaw · 147 tokens

best-practices

Transforms vague prompts into optimized Claude Code prompts. Adds verification, specific context, constraints, and proper phasing. Invoke with /best-practices.

MoizIbnYousaf/Ai-Agent-Skills · 35 tokens

llm-application-dev

Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.

MoizIbnYousaf/Ai-Agent-Skills · 40 tokens

firebase-ai

Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

evanca/flutter-ai-rules · 30 tokens

coding-agents-prompt-authoring

To author, adapt, review, and validate prompts (skills, agents, workflows, rules, etc.) with brief, contracts, and a validation pack.

griddynamics/rosetta · 39 tokens

thought-based-reasoning

Use when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where simple prompting fails - provides comprehensive guide to Chain-of-Thought and related prompting techniques (Zero-shot CoT, Self-Consistency, Tree of Thoughts…

NeoLabHQ/context-engineering-kit · 85 tokens