Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extract entities and relations from source files to build a knowledge graph
.claude/skills/ruvnet-kg-extract/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -38% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -34% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -51% | 0% |
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 you need to build or update a knowledge graph from source code or documentation. Useful for understanding codebase structure, dependency analysis, and impact assessment.
Glob and Read to enumerate and read source files at the given pathimport 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.9type-depends-on: TypeScript type-only imports (import type { Foo } from '...' and import { type Foo, value } from '...') -- weight 0.1, never used for cycle detection or runtime impact analysisextends: class inheritance -- weight 0.9implements: interface implementations -- weight 0.7depends-on: constructor dependencies, injected services -- weight 0.8calls: function/method invocations -- weight 0.7references: documentation mentions, comments -- weight 0.3Regex hint for classifying TS imports (so a naive from '...' grep doesn't conflate the two): ^\s*import\s+type\s+ → type-depends-on (entire import is type-only) ^\s*import\s*\{[^}]*\btype\s+\w+ → split: type specifiers → type-depends-on, value specifiers → imports ^\s*import\s+[^{]*\bfrom\s+ → imports (value)
mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store for each entity with metadata (name, type, file, line, description)mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge for each relation with source, target, relation type, and weightbashnpx @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
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 5,397 | 7,081 | +31% | 1 | 1 | 0% | 313 | 1,058 | +238% | 0 | 0 | — |
case-02 | fail→fail | 6,627 | 8,887 | +34% | 1 | 1 | 0% | 201 | 1,600 | +696% | 0 | 0 | — |
case-03 | fail→fail | 31,581 | 4,796 | -85% | 1 | 1 | 0% | 360 | 1,107 | +208% | 0 | 0 | — |
case-04 | pass→pass | 9,990 | 2,308 | -77% | 1 | 1 | 0% | 1,781 | 1,154 | -35% | 0 | 0 | — |
case-05 | fail→pass | 9,505 | 2,218 | -77% | 1 | 1 | 0% | 1,710 | 1,056 | -38% | 0 | 0 | — |
case-06 | fail→pass | 9,804 | 2,088 | -79% | 1 | 1 | 0% | 1,725 | 1,133 | -34% | 0 | 0 | — |
case-07 | pass→pass | 11,192 | 4,345 | -61% | 1 | 1 | 0% | 2,008 | 1,594 | -21% | 0 | 0 | — |
case-12 | fail→pass | 11,954 | 2,120 | -82% | 1 | 1 | 0% | 1,978 | 1,097 | -45% | 0 | 0 | — |
case-08 | pass→pass | 11,798 | 4,595 | -61% | 1 | 1 | 0% | 1,941 | 1,596 | -18% | 0 | 0 | — |
case-09 | fail→pass | 9,025 | 2,167 | -76% | 1 | 1 | 0% | 1,539 | 1,101 | -28% | 0 | 0 | — |
case-10 | fail→pass | 11,437 | 1,567 | -86% | 1 | 1 | 0% | 1,827 | 902 | -51% | 0 | 0 | — |
case-11 | fail→pass | 12,975 | 1,711 | -87% | 1 | 1 | 0% | 2,391 | 1,000 | -58% | 0 | 0 | — |
case-13 | fail→pass | 15,630 | 1,562 | -90% | 1 | 1 | 0% | 2,898 | 974 | -66% | 0 | 0 | — |
case-14 | fail→pass | 8,384 | 2,364 | -72% | 1 | 1 | 0% | 1,596 | 1,119 | -30% | 0 | 0 | — |
case-15 | fail→pass | 10,531 | 3,365 | -68% | 1 | 1 | 0% | 2,094 | 1,329 | -37% | 0 | 0 | — |
case-16 | fail→fail | 10,407 | 1,823 | -82% | 1 | 1 | 0% | 1,895 | 954 | -50% | 0 | 0 | — |
case-17 | fail→fail | 6,948 | 1,858 | -73% | 1 | 1 | 0% | 1,297 | 1,065 | -18% | 0 | 0 | — |
case-18 | fail→fail | 7,855 | 1,695 | -78% | 1 | 1 | 0% | 1,368 | 963 | -30% | 0 | 0 | — |
case-19 | pass→pass | 13,869 | 5,301 | -62% | 1 | 1 | 0% | 2,767 | 1,705 | -38% | 0 | 0 | — |
case-20 | fail→fail | 10,091 | 28,229 | +180% | 1 | 1 | 0% | 2,242 | 1,089 | -51% | 0 | 0 | — |
case-21 | fail→fail | 4,139 | 19,655 | +375% | 1 | 1 | 0% | 327 | 4,986 | +1425% | 0 | 0 | — |
case-22 | fail→fail | 5,376 | 8,670 | +61% | 1 | 1 | 0% | 980 | 2,436 | +149% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 17 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.