kg-traverse — скилл для Claude Code: что делает и как установить
Находит цепочки связей в графе знаний AgentDB, начиная с указанной сущности. Пригодится при анализе зависимостей в кодовой базе и оценке влияния правок.
npx skills add ruvnet/ruflo --skill kg-traverse -a claude-codeЧто делает kg-traverse
Скилл ищет исходный узел через agentdb_hierarchical-recall и разворачивает граф вокруг него вызовом agentdb_graph-query. По умолчанию глубина поиска составляет 3 шага — это максимум для текущего SQL-пути. Затем agentdb_graph-pathfinder отбирает цепочки с релевантностью от 0.3 и возвращает до 10 наиболее подходящих путей.
Для связей используется ручной синтез, так как инструмент agentdb_context-synthesize рассчитан на эпизоды задач, а не сущности из kg-extract. Если активна переменная CLAUDE_FLOW_ENCRYPT_AT_REST=1, база рёбер зашифрована и недоступна для чтения. Это повод проверить отчёт: скилл откатится к чтению изолированных сущностей без связей, но запускать memory init не нужно — данные целы.
Какие задачи решает
- Найти скрытые и косвенные зависимости между сущностями в проекте
- Провести аудит влияния изменений перед правкой узла
- Отобрать 10 наиболее релевантных цепочек связей по порогу 0.3
- Восстановить граф отношений сущности при глубине обхода до 3 шагов
Примеры запросов агенту
- Покажи зависимости для entity:router-account с глубиной 2
- Выполни обход графа для entity:auth-service --depth 3 и найди связанные модули
- Исследуй граф знаний вокруг entity:payment-processor и оцени влияние изменений
Как установить kg-traverse
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill kg-traverse -a claude-code2Вручную: положить файлы
~/.claude/skills/kg-traverse/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/kg-traverse/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill kg-traverse -a codex2Вручную: положить файлы
.agents/skills/kg-traverse/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill kg-traverse -a cursor2Вручную: положить файлы
.cursor/skills/kg-traverse/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo kg-traverse2Вручную: положить файлы
.github/skills/kg-traverse/SKILL.md1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill kg-traverse -a gemini-cli2Командой платформы
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-knowledge-graph/skills/kg-traverseВручную: положить файлы
.devin/skills/kg-traverse/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill kg-traverse -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора104
Весь набор →Похожие
Вопросы о kg-traverse
Как установить kg-traverse в Claude Code?
Выполните команду npx skills add ruvnet/ruflo --skill kg-traverse -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/kg-traverse/SKILL.md.
Что делает kg-traverse?
Скилл выполняет лучевой обход графа знаний в AgentDB от заданной сущности. Он отсекает ветки с релевантностью ниже 0.3 и выводит ранжированные цепочки отношений.
Почему скилл не читает связи при CLAUDE_FLOW_ENCRYPT_AT_REST=1?
При включённом шифровании база graph_edges недоступна для чтения. Скилл покажет только записи сущностей из agentdb_hierarchical-recall; выполнять memory init в этом случае нельзя, иначе сотрутся сохранённые данные.
Исходный текст
SKILL.md · MIT
---
name: kg-traverse
description: Pathfinder traversal of the knowledge graph starting from a seed entity
argument-hint: "<entity> [--depth N]"
allowed-tools: mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-recall mcp__plugin_ruflo-core_ruflo__agentdb_graph-query mcp__plugin_ruflo-core_ruflo__agentdb_graph-pathfinder mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search Bash
---
# 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
```bash
npx @claude-flow/cli@latest memory search --query "relations for ENTITY_NAME" --namespace knowledge-graph
```
© ruvnet · MIT · ruvnet/ruflo