跳到正文
Skillpedia
分析与电子表格81k · #1640

kg-traverse

它能做什么

这项技能从一个起点出发,沿着知识图谱中的联系进行查找,显示其连接关系和最相关的路径。适合做影响分析或追踪依赖的开发者。

适用场景

  • ✓当你想知道哪些部分依赖某个特定的类或模块时。
  • ✓当你想查看从某一项出发的依赖链时。
  • ✓当你需要判断修改代码某一部分的影响时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-knowledge-graph/skills/kg-traverse/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“如果我修改账单模块,会影响到哪些地方?请沿着代码地图的联系查找。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能在图中找到起点,将其联系展开到设定的深度,并按相关性为每条路径打分。它会去掉较弱的路径,并返回排名靠前的结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

KG Traverse

Perform pathfinder graph traversal starting from a seed entity. Expands outward through the graph's edges, scores paths by relevance, and prunes low-scoring branches.

When to use

When you need to explore the knowledge graph starting from a specific entity -- finding what depends on it, what it depends on, or discovering indirect relationships. Useful for impact analysis, dependency chains, and understanding code structure.

Steps

  1. Seed -- call mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-recall to look up the target entity by name (one word is the most reliable query: the recall matches the whole query as a substring). Graph node ids are domain-prefixed, for example entity:router-account.
  2. Expand -- call mcp__plugin_ruflo-core_ruflo__agentdb_graph-query with { nodeId: "entity:NAME", mode: "k-hop", depth: N } (default depth 3, the SQL path applies at most 3 and reports appliedDepth and truncated; add relation to filter by relation type). agentdb_causal-edge only records an edge, never use it to read one.
  3. Score and rank -- call mcp__plugin_ruflo-core_ruflo__agentdb_graph-pathfinder with { seedNodeId: "entity:NAME", query: "<what the user wants to know>", depth: N, threshold: 0.3, topK: 10 }. It expands from the seed, scores each path by cumulative relevance, drops paths under the threshold and returns the top paths. If it returns nothing useful, score the k-hop neighbours yourself with mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search on entity names and relation types (the semanticRouter controller is enabled: false in current AgentDB builds; see ruvnet/ruflo#2049).
  4. Synthesize -- write the summary yourself from the returned paths. Do not call agentdb_context-synthesize: it summarizes validated task episodes and answers no-eligible-episodes for entity records written by kg-extract.
  5. Report -- display the top 10 paths with: path (entity chain), relation types, cumulative score, and your summary.

When the graph cannot be read

With CLAUDE_FLOW_ENCRYPT_AT_REST=1 the graph read tools answer graph_edges DB is encrypted at rest (RFE1) (#2889, #4135): edges recorded by kg-extract are stored but cannot be read back yet. Say so in the report. Your data is intact: do not run memory init. Fall back to the entity records only (agentdb_hierarchical-recall) and tell the user that relations are unavailable. An agentdb_causal-edge result with readable: false already warns about this at write time.

CLI alternative

npx @claude-flow/cli@latest memory search --query "relations for ENTITY_NAME" --namespace knowledge-graph
常见问题

它沿联系查找多远?

默认深度为三步,即使你要求更多,查询也会在三步处停止。

我能按联系类型筛选吗?

可以。你可以把遍历限制在某一种关系类型上。

它会修改图吗?

不会。该技能只读取关系,不会添加新的边。

详情

作者的原始描述

Pathfinder traversal of the knowledge graph starting from a seed entity

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1640
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能