kgrag-usage

Query multiple registered knowledge graphs with kind-based filtering for code, docs, and metadata.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

KGRAG solves the problem of searching and extracting useful snippets across multiple knowledge graphs consistently, even when they span different repositories and KG kinds.

Core Features & Use Cases

  • Cross-KG querying: Perform natural-language search across all registered CodeKG/DocKG/MetaKG instances and filter by kind (code, doc, meta) to find relevant implementations, docs, and conceptual descriptions.
  • Multi-KG snippet packing: Extract graph-grounded passage packs or source-context snippets suitable for LLM inputs by collecting the right results across KGs.
  • Registry management and initialization: Initialize repositories (auto-detect layers), register/unregister KGs, and audit health so queries run against the correct indexed datasets.

Quick Start

Use KGRAG to search for implementations by running kgrag query "API authentication" --kind code.

Frequently Asked Questions about kgrag-usage

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

FAQPage Schema
How do I search for code snippets across multiple knowledge graphs simultaneously?

Federated retrieval across multiple registered knowledge graphs enables simultaneous code and documentation snippet extraction by querying a central KG registry with kind-based filtering to return deterministic packaged results.

What is the best way to pack context from different repositories for LLM inputs?

Multi-KG snippet packing collects graph-grounded passage packs and source-context snippets across different repositories, filtering by kind (code, doc, meta) to produce deterministic packaged results suitable for LLM context.

How do I initialize and register a new repository index for federated search?

Automated initialization detects repository layers to build the index, then registers the new knowledge graph in the central KG registry so cross-KG queries can access the dataset alongside existing instances.

Can I filter federated knowledge graph queries by specific content kinds?

Kind-based filtering allows queries to target specific content kinds (code, doc, meta), so users can isolate relevant implementations, documentation, or conceptual descriptions across all registered CodeKG, DocKG, and MetaKG instances.

Why are my cross-repo pattern discovery queries returning inconsistent results?

Cross-repo pattern discovery requires querying an aggregated registry state to ensure deterministic packaged results; inconsistent outputs often indicate the central KG registry needs a health audit to verify queries run against correct indexed datasets.