Agent skill

kg-extract

Extract entities and relations from source files to build a knowledge graph

rUv72,748★ · +654/wk · 4 repos on radarProfile →
claude-codecodexcan modify filesMIT
Install
npx skills add ruvnet/ruflo --skill kg-extract --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Allowed tools: ReadGlobGrepmcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-storemcp__plugin_ruflo-core_ruflo__agentdb_causal-edgemcp__plugin_ruflo-core_ruflo__agentdb_pattern-storemcp__plugin_ruflo-core_ruflo__embeddings_generateBash
Path: plugins/ruflo-knowledge-graph/skills/kg-extract/SKILL.md
Open the folder on GitHub →
Where it comes from
Source: ruvnet/ruflo
Stars: 67,015 · +629 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 1. **Scan files** -- use `Glob` and `Read` to enumerate and read source files at the given path 2. **Identify entities** -- extract classes, functions, modules, types, and config references from each file 3. **Map relations** -- for each entity, determine its relations to other entities. **Critical: TypeScript `import type` and inline `type` specifiers (`import { type Foo, bar }`) are erased at compile time and MUST NOT be counted as value imports** -- they're a separate, weaker relation. Misclassifying them produces phantom runtime cycles (see ruvnet/ruflo#2049). - `imports`: value imports (`import { x } from '...'`, `require(...)`) -- weight `0.9` - `type-depends-on`: TypeScript type-only imports (`import type { Foo } from '...'` and `import { type Foo, value } from '...'`)

What's inside
Steps it walks through
  1. When to use
  2. Steps
  3. CLI alternative
Commands it runs
npx @claude-flow/cli@latest memory store --namespace knowledge-graph --key "entity-NAME" --value "METADATA_JSON"
npx @claude-flow/cli@latest memory search --query "entities in auth module" --namespace knowledge-graph
More from ruflo
All skills →
About this skill
What does the kg-extract skill do?

Extract entities and relations from source files to build a knowledge graph

How do I install it?

Run `npx skills add ruvnet/ruflo --skill kg-extract --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ruvnet/ruflo, a repository with 67,015 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going