---
name: Graph Retrieval
slug: graph-retrieval
category: AI Engineering
description: Graph Retrieval queries a normalized graph store to return semantic triples and evidence for codebase structure and dependency questions. Use it when an agent needs replayable, context-enriching graph data without bypassing the existing pipeline.
github: "https://github.com/study8677/repobrain/tree/main/engine/repobrain_engine/skills/graph-retrieval"
language: Python
stars: 1314
forks: 265
install: "npx degit https://github.com/study8677/repobrain/tree/main/engine/repobrain_engine/skills/graph-retrieval ~/.claude/skills/graph-retrieval"
installs_to: ~/.claude/skills/graph-retrieval
source_path: engine/repobrain_engine/skills/graph-retrieval/SKILL.md
collection_size: 6
category_size: 2451
collection_url: "https://dirskills.com/collections/study8677/repobrain"
added: 2026-08-20T07:54:50.706Z
last_synced: 2026-08-20T07:54:50.706Z
canonical_url: "https://dirskills.com/skills/graph-retrieval"
---

# Graph Retrieval

Graph Retrieval queries a normalized graph store to return semantic triples and evidence for codebase structure and dependency questions. Use it when an agent needs replayable, context-enriching graph data without bypassing the existing pipeline.

**Install:**

```bash
npx degit https://github.com/study8677/repobrain/tree/main/engine/repobrain_engine/skills/graph-retrieval ~/.claude/skills/graph-retrieval
```

## README

# Graph Retrieval Skill

## Purpose
Expose graph-based retrieval as a tool capability without breaking the
existing RepoBrain execution chain.

## Tool
- `query_graph(query, max_hops=2, workspace='.')`

## Behavior
- Reads normalized graph store files under `.repobrain/graph/`.
- Builds a query-relevant subgraph.
- Returns LLM-friendly semantic triples plus replayable evidence metadata.

## Output Contract
```json
{
  "summary": "...",
  "triples": [["subject", "predicate", "object"]],
  "evidence": [{"retrieval_id": "...", "tool_name": "..."}],
  "nodes": [...],
  "edges": [...]
}
```

## Design Notes
- Keeps tool-driven and replayable architecture.
- Does not bypass pipeline.
- Intended for structure/dependency questions and context enrichment.
