Skip to content
Agent Memory
Command

/build

Build a knowledge graph over the current folder (or a path / GitHub URL). Runs the native OpenTrace pipeline: index → cluster → analyze. Use when: "build the knowledge graph", "/build", "full pipeline on this folder".

BOOST
From plugin
opentrace
10916 skills6 agents16 commands1 MCP
Install
> /plugin marketplace add opentrace/opentrace
> /plugin install opentrace-oss@opentrace-oss

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/build

Context preview

What this command does when you run it.

Build a knowledge graph over the current folder (or a path / GitHub URL). Runs the native OpenTrace pipeline: index → cluster → analyze. Use when: "build the knowledge graph", "/build", "full pipeline on this folder".

Command definition

build.md
name: build
description: |
  Build a knowledge graph over the current folder (or a path / GitHub URL).
  Runs the native OpenTrace pipeline: index → cluster → analyze.
  Use when: "build the knowledge graph", "/build", "full pipeline on this folder".
allowed-tools: Bash, Read

End-to-end native build: `opentraceai index → cluster → analyze`. No external indexer dependency — all stages are first-class OpenTrace commands.

Arguments

$ARGUMENTS

Recognised forms:

  • `<path>` — default `.`
  • `https://github.com/<owner>/<repo>` — uses `opentraceai fetch-and-index`

Instructions

1. **Resolve target.** If `$ARGUMENTS` looks like a GitHub URL, run `opentraceai fetch-and-index <url>`. Otherwise run `opentraceai index <path>` (default `.`).

2. **Cluster.** Run `opentraceai cluster` to detect clusters (Leiden with Louvain fallback) and stamp each node's `cluster` property back onto the DB.

3. **Analyze.** Run `opentraceai analyze --json` to get god nodes, cross-cluster bridges, and suggested questions.

4. **Report.** Show the top god nodes (degree-sorted) and any cross-cluster bridges found. Offer the most interesting suggested question for follow-up.

Optional follow-ups

  • `/export-graphml -o out.graphml` — escape to Gephi/Cytoscape
  • `/export-obsidian -o vault/` — Obsidian vault
  • `/export-report -o report/` — linked markdown report folder
Ships withopentrace

A knowledge graph that maps your codebase structure, service architecture, and system relationships — then exposes it all through MCP so AI tools can understand your systems. Index any repo, any size, in seconds.

Get the whole plugin

Other commands on opentrace.