new-kg-module

Scaffold a KGModule package with extractor, adapter, and test templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This Skill removes the repetitive setup work needed to start a new knowledge-graph module by generating a complete, domain-ready package structure with consistent KGModule patterns and tests.

Core Features & Use Cases

  • KGModule scaffolding: Creates a ready-to-extend package with extractor, module, adapter, and tests for a new knowledge domain.
  • Domain-driven templates: Fills stubs using your answers for node kinds, edge kinds, and KGKind so you replace TODOs with real domain logic quickly.
  • Optional CLI integration: Adds a click-based CLI with build, query/pack, analyze, and snapshot commands to manage and run your KG over time.
  • Config support: Adds configuration loading hooks from pyproject.toml so include/exclude directories are user-controlled rather than hardcoded.

Quick Start

Tell the Skill to scaffold a new module named filetreekg for a doc-style knowledge graph, specifying node kinds ["file","directory"] and edge kinds ["CONTAINS","REFERENCES"] so you can immediately implement extraction and query logic in the generated package.

Frequently Asked Questions about new-kg-module

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

FAQPage Schema
How do I scaffold a new knowledge graph module for a specific domain?

To scaffold a new knowledge graph module, you need to provide a snake_case name along with your domain's node kinds and edge kinds. This generates a complete package structure with extractor, module, adapter, and test templates ready for domain-specific logic.

What is the best way to set up a Python package for building a file-tree knowledge graph?

Setting up a Python package for a file-tree knowledge graph requires creating consistent module patterns for nodes like files and directories. Using a scaffolding tool automates generating the extractor, adapter, and test stubs to accelerate implementation.

Does the generated knowledge graph package include CLI integration for managing builds and queries?

Yes, the generated knowledge graph package can include optional click-based CLI integration. This provides commands for building, querying, packing, analyzing, and snapshotting your knowledge graph directly from the command line.

Can I configure include and exclude directories for my knowledge graph extractor without hardcoding them?

You can configure include and exclude directories for your knowledge graph extractor by using configuration loading hooks. The scaffolded package supports loading these settings directly from your pyproject.toml file.

What components are generated when creating a new domain-specific knowledge graph extractor?

Creating a domain-specific knowledge graph extractor generates a package containing class stubs for the extractor, module, and adapter. It also includes test templates and optional CLI configuration hooks derived from your provided domain name.

Do I need to manually implement extraction logic after scaffolding a knowledge graph module?

Yes, you need to manually implement extraction logic after scaffolding because the tool generates structural templates and stubs. You replace the generated TODOs with real domain logic for your specific node and edge kinds.