मुख्य सामग्री पर जाएँ
Skillpedia
एनालिसिस और स्प्रेडशीट81k · #1639

kg-extract

यह क्या करती है

यह स्किल सोर्स फ़ाइलें पढ़ती है और क्लास, फ़ंक्शन और मॉड्यूल को उनके आपसी संबंधों के नक्शे में बदलती है। जो डेवलपर कोडबेस का ढाँचा समझना चाहते हैं और यह जानना चाहते हैं कि बदलाव कहाँ तक फैल सकते हैं, उनके लिए यह है।

कब इस्तेमाल करें

  • ✓जब आप समझना चाहें कि कोडबेस के हिस्से एक-दूसरे पर कैसे निर्भर हैं।
  • ✓जब आपको आँकना हो कि कोई बदलाव कहाँ तक पहुँच सकता है।
  • ✓जब बड़े बदलावों के बाद कोड का नक्शा ताज़ा करना हो।

Skill का लिंक

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-knowledge-graph/skills/kg-extract/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-knowledge-graph/skills/kg-extract/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे प्रोजेक्ट के मुख्य हिस्सों का नक्शा बनाइए और दिखाइए कि वे एक-दूसरे पर कैसे निर्भर हैं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल सोर्स फ़ाइलें पढ़ती है, क्लास, फ़ंक्शन, मॉड्यूल और टाइप पहचानती है, फिर उनके संबंध दर्ज करती है, जैसे इम्पोर्ट और inheritance के ज़रिए। नतीजा प्रोजेक्ट की मेमोरी में एक graph के रूप में सहेजा जाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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 '...') -- weight 0.1, never used for cycle detection or runtime impact analysis
    • extends: class inheritance -- weight 0.9
    • implements: interface implementations -- weight 0.7
    • depends-on: constructor dependencies, injected services -- weight 0.8
    • calls: function/method invocations -- weight 0.7
    • references: documentation mentions, comments -- weight 0.3

    Regex 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)
    
  4. Store in AgentDB -- call mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store for each entity with metadata (name, type, file, line, description)

  5. Create edges -- call mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge for each relation with source, target, relation type, and weight

  6. Report -- summarize: total entities by type, total relations by type, files scanned

CLI alternative

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
अक्सर पूछे जाने वाले सवाल

क्या केवल-टाइप वाले इम्पोर्ट रनटाइम लिंक गिने जाते हैं?

नहीं। केवल-टाइप इम्पोर्ट एक कमज़ोर संबंध के रूप में रखे जाते हैं और cycle पहचानने में इस्तेमाल नहीं होते।

कौन से संबंध दर्ज होते हैं?

इम्पोर्ट, extends, implements और depends-on संबंध, हर एक का अपना वज़न होता है।

graph कहाँ सहेजा जाता है?

यह AgentDB में सहेजा जाता है, वह मेमोरी स्टोर जिसे स्किल इस्तेमाल करती है।

जानकारी

लेखक का मूल विवरण

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

repo: ruvnet/ruflo

लोकप्रियता

GitHub स्टार
81k
रैंकिंग में स्थान
#1639
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-adaptive-coordinator

81k

आपके एजेंट को काम बदलने पर AI एजेंटों के समूह को बाँटने और फिर से संतुलित करने में मदद करती है, और काम के हिसाब से लेआउट चुनती है।

AI और एजेंटएजेंट

agent-agent

81k

आपके एजेंट को बड़े लक्ष्य को क्रमबद्ध कार्यों की योजना में बदलना सिखाती है, और स्थिति बदलने पर योजना फिर से बनाना भी।

AI और एजेंटएजेंट

agent-agentic-payments

81k

AI खरीदारी के लिए खर्च के आदेश मैनेज करने में मदद करती है, जिसमें खर्च की सीमा, समय अवधि, व्यापारी नियम और signed मंज़ूरियाँ शामिल हैं।

AI और एजेंटएजेंट

agent-analyze-code-quality

81k

आपके एजेंट को कोड की गुणवत्ता जाँचने में मदद करती है, बिना फ़ाइलें बदले code smells, technical debt और refactoring के सुझाव खोजकर।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills