# Graph Retrieval

> Exposes graph-based retrieval as a tool capability via `query_graph`. Reads normalized graph store files, builds a query-relevant subgraph, and returns LLM-friendly semantic triples with replayable evidence metadata.

- Skill: `study8677/graph-retrieval` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add study8677/graph-retrieval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/study8677/graph-retrieval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: study8677 (https://skillmd.com/u/study8677)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/study8677/graph-retrieval

---


# 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.

