Skip to content
ruvnet avatar

Kg Extract

Extracts entities and weighted relations from source files into an AgentDB knowledge graph for dependency analysis.

CCM score
67 of 100
skills.sh installs
731
GitHub stars
82.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers scanning, entity identification, relation mapping, storage, and a summary report of entity and relation counts
  • Maps relations such as imports, extends, implements, depends-on, calls, and references, each with a fixed weight
  • Enforces a rule that TypeScript import type and inline type specifiers become type-depends-on with weight 0.1, excluded from cycle detection
  • Designed for understanding codebase structure, impact assessment, and building or updating graphs from code or docs

Install

$ npx -y skills add ruvnet/ruflo --skill kg-extract -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

KG Extract

Extract entities (classes, functions, modules, types, concepts) and their relations (imports, extends, implements, depends-on, calls) from source files, then store them as a knowledge graph in AgentDB.

When to use

When you need to build or update a knowledge graph from source code or documentation. Useful for understanding codebase structure, dependency analysis, and impact assessment.

Steps

Details

Repository
github.com/ruvnet/ruflo
Categories
Code Review & Quality, Memory & Context
First seen
Jun 3, 2026

Questions

What does the kg-extract skill do?

The kg-extract skill scans source files at a given path and extracts entities such as classes, functions, modules, types and concepts. It maps their relations, including imports, extends, implements, depends-on and calls, then stores them as a knowledge graph in AgentDB.

How do I install the kg-extract skill?

Run npx -y skills add ruvnet/ruflo --skill kg-extract -y in a project to install it. Once installed, the agent can build or update a knowledge graph from source code or documentation.

Which tools does kg-extract need to run?

The skill uses Read, Glob, Grep and Bash, plus AgentDB tools for storing entities, creating causal edges and storing patterns. It also has an embeddings tool for generating vectors and a CLI alternative that uses npx @claude-flow/cli memory commands.

When should I use kg-extract for dependency analysis?

Use kg-extract when you want to understand codebase structure, run dependency analysis or assess impact across modules. It separates TypeScript type-only imports from value imports so that phantom runtime cycles are not counted in impact analysis.

Where does kg-extract stand in the Code Review and Quality category?

kg-extract sits in the Code Review and Quality category on Claude Marketplaces, alongside improve-codebase-architecture, codebase-design, code-review, setup-ts-deep-modules and caveman-review. It focuses on building a queryable knowledge graph of entities and relations rather than reviewing code directly.

More from ruvnet/ruflo

All 236

Similar to Kg Extract

More Code Review & Quality