Skip to content
Agent Memory
Command

/index

Index (or re-index) the current project into the OpenTrace knowledge graph. Use when: "index this repo", "re-index", "update the graph", "build the index"

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/index

Context preview

What this command does when you run it.

Index (or re-index) the current project into the OpenTrace knowledge graph. Use when: "index this repo", "re-index", "update the graph", "build the index"

Command definition

index.md
name: index
description: |
  Index (or re-index) the current project into the OpenTrace knowledge graph.
  Use when: "index this repo", "re-index", "update the graph", "build the index"
allowed-tools: Bash, Read

Index the current project into the OpenTrace knowledge graph so that agents and skills can query it.

Arguments

$ARGUMENTS

Instructions

1. **Determine the target path**: If the user provided a path in the arguments, use that. Otherwise default to the repository root (find it with `git rev-parse --show-toplevel`).

2. **Run the indexer**: Change directory to the target path and run the indexer. This ensures the `.opentrace/` directory is created in the right place.

   cd <path> && uvx opentraceai index .

Use `--verbose` if the user asked for verbose/debug output. Pass through any other flags the user specified (e.g. `--db`, `--repo-id`, `--batch-size`).

3. **Report results**: After the command completes, summarize what was indexed. If the command fails, show the error and suggest fixes (e.g. missing `uv` or dependencies, wrong path).

4. **Verify**: Run `uvx opentraceai stats` (passing the same `--db` flag if the user provided one) to show the updated graph contents so the user can confirm the index looks right.

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.

build
Command

build

Build a knowledge graph over the current folder (or a path / GitHub URL). Runs the native OpenTrace pipeline: index → cluster →…