Installable skillMIT

KG Traverse

Pathfinder traversal of the knowledge graph starting from a seed entity

BY wodehUPDATED Oct 28, 2026
INTENDED FOR✳Claude CodeInstall in a listed agent.

instructions.md

---
name: kg-traverse-1d89c3ac1c82
description: Pathfinder traversal of the knowledge graph starting from a seed entity
argument-hint: "<entity> [--depth N]"
allowed-tools: mcp__claude-flow__agentdb_hierarchical-recall mcp__claude-flow__agentdb_causal-edge mcp__claude-flow__agentdb_semantic-route mcp__claude-flow__agentdb_pattern-search mcp__claude-flow__agentdb_context-synthesize Bash
---

# KG Traverse

Perform pathfinder graph traversal starting from a seed entity. Expands outward through causal edges, scores paths by relevance, and prunes low-similarity 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__claude-flow__agentdb_hierarchical-recall` to look up the target entity by name
2. **Expand** -- call `mcp__claude-flow__agentdb_causal-edge` to find all edges connected to the seed entity, then recursively expand outward to the specified depth (default: 3)
3. **Score** -- for each path, compute relevance: `cumulative_score = product(edge_weight * semantic_similarity(query, node))` using `mcp__claude-flow__agentdb_semantic-route` for similarity
4. **Prune** -- remove paths with cumulative score below 0.3
5. **Rank** -- sort remaining paths by cumulative score descending
6. **Synthesize** -- call `mcp__claude-flow__agentdb_context-synthesize` to combine the top paths into a coherent summary
7. **Report** -- display the top 10 paths with: path (entity chain), relation types, cumulative score, and synthesized context

## CLI alternative

```bash
npx @claude-flow/cli@latest memory search --query "relations for ENTITY_NAME" --namespace knowledge-graph
```
COMPATIBILITY & REFERENCES

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.