dockg

Build a deterministic hybrid knowledge graph from .md and .txt corpora.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Flux-Frontiers/doc_kg --skill dockg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dockg
Source: https://github.com/Flux-Frontiers/doc_kg/tree/main/.claude/skills/dockg
Command: npx skills add https://github.com/Flux-Frontiers/doc_kg --skill dockg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DocKG eliminates the mismatch between fast text search and the need for structurally grounded, source-traceable answers across a document corpus.

Core Features & Use Cases

  • Deterministic hybrid knowledge graph: Indexes documents into a hybrid semantic + structural graph (SQLite + LanceDB) for traceable retrieval instead of embedding-only RAG.
  • Source-grounded passage packs for agents: Uses graph traversal (topics, entities, references, containment, sequencing) to generate packed excerpts that LLM agents can trust.
  • Multipass corpus analysis pipeline: Runs a multi-phase pipeline for sampling, chunking, classification, embedding, and manifold analysis, with structured provenance outputs.
  • MCP tool exposure: Publishes graph tools (e.g., graph_stats, query_docs, pack_docs, get_node) for Claude Code/Kilo Code/Copilot workflows and debugging.

Quick Start

Use this when building an index from a corpus folder by running: dockg build docs

Frequently Asked Questions about dockg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is a deterministic hybrid knowledge graph for document corpora?

A deterministic hybrid knowledge graph indexes documents into a combined semantic and structural graph using SQLite and LanceDB, enabling source-traceable retrieval instead of relying on embedding-only guesses.

How do I build a knowledge graph from markdown and text files?

You can build a knowledge graph from .md and .txt corpora by running a CLI command like 'dockg build docs', which handles chunking, embedding, and indexing into SQLite and LanceDB.

Can I expose graph retrieval functionality through MCP for Claude Code?

Yes, you can expose graph tools like graph_stats, query_docs, pack_docs, and get_node through MCP configs, enabling Claude Code, Kilo Code, or Copilot workflows to access deterministic passage packs.

Does graph-based retrieval provide better source provenance than standard RAG?

Graph-based retrieval applies structural traversal across topics, entities, references, and sequencing to generate packed excerpts, providing structurally grounded provenance that standard embedding-only RAG lacks.

How do I run a multipass analysis pipeline on a document corpus?

You run a multipass analysis pipeline by executing the analyze command, which drives multi-phase sampling, classification, embedding, and manifold analysis to produce structured provenance outputs.

Do I need LanceDB and SQLite to run the document ingestion pipeline?

Yes, the document ingestion pipeline requires both SQLite and LanceDB to construct the hybrid index and satisfy the deterministic provenance constraints defined by the workflow.