graph

graph is a skill for Claude Code, Codex from opentrace/opentrace. It costs 195 tokens per session (772 once invoked), scanned A, original, Apache-2.0.

A workflow for building or refreshing a knowledge graph of a folder or code repository, including grouped areas, notable connections, and exportable reports.

In plain words
What is it for?
Use it to index code, find clusters and central components, ask questions, trace paths, or export the results as Markdown, GraphML, or Obsidian notes.
Why use it?
It makes relationships in a codebase easier to explore than reading files one at a time.

Skill for Claude CodeCodex

Part of the claude-code plugin — 2 skills, 12 commands, 6 agents, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/opentrace/opentrace/graph
Any agent
npx skills add opentrace/opentrace --skill graph
Clone the repo
git clone --depth 1 https://github.com/opentrace/opentrace

Made for: Claude Code, Codex.

Or install claude-code, the plugin that ships this one along with the rest of its 2 skills, 12 commands, 6 agents, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/opentrace/opentrace/graph.svg)](https://agentmods.dev/skills/opentrace/opentrace/graph)
Your own site
<a href="https://agentmods.dev/skills/opentrace/opentrace/graph"><img src="https://agentmods.dev/badge/skills/opentrace/opentrace/graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 772 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00195 $0.00772
Opus 5 $0.00097 $0.00386
Sonnet 5 $0.00039 $0.00154
Haiku 4.5 $0.00019 $0.00077

Measured 4d ago against content hash c35e02e34fee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/claude-code/skills/graph/SKILL.md · 66 lines

What it actually says

The user wants to build, refresh, or explore the OpenTrace knowledge graph. This skill is the on-ramp — point at the right slash command and run it.

Request

$ARGUMENTS

Routing

Match the user's intent to one of the commands below. When in doubt, default to /build for build / refresh and /interrogate for question-answering.

Intent Command
Build the graph from scratch on a folder or GitHub URL /build [path or url]
Index only (no clustering / analysis) /index [path]
Re-run clustering /cluster
Surface god nodes, bridges, suggested questions /analyze
Quick exploration of a named component /explore <name>
Read-only Q&A over the graph /interrogate "<question>"
Shortest path between two graph nodes /path <A> <B>
Obsidian vault export /export-obsidian
Browsable markdown report /export-report
GraphML for Gephi / yEd /export-graphml
Counts of indexed nodes by type /graph-status

If the user asked a question the graph could answer directly (e.g. "what's connected to AuthMiddleware?") and .opentrace/index.db exists, run /interrogate yourself rather than asking the user which command to use.

When the graph does not exist yet

If .opentrace/index.db is missing and the user is asking a graph-flavoured question, offer to run /build first, then answer against the freshly built graph.

Conventions

  • Only CALLS edges carry a confidence value — a float from the call resolver (1.0 for an exact in-scope match, lower for cross-file and heuristic ones). No other edge type has one, so don't report a confidence for edges that don't carry it.
  • After any build, the OpenTrace MCP tools (search_graph, get_node, traverse_graph, list_nodes, get_stats) read the same .opentrace/index.db the slash commands wrote to. There is one graph, not two.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 66 lines · 195 tokens per session scan A c35e02e34fee

Subscribe to this mod's changes

graph is a skill published in the GitHub repository opentrace/opentrace (106 stars, last pushed 22d ago), licensed Apache-2.0. It adds 195 tokens to every session and 772 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-benchmark

Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with…

samber/cc-skills-golang · 104 tokens

golang-dependency-injection

Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture…

samber/cc-skills-golang · 182 tokens

golang-graphql

Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports github.com/99designs/gqlgen or github.com/graph-gophers/graphql-go.

samber/cc-skills-golang · 77 tokens

golang-naming

Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters/setters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives…

samber/cc-skills-golang · 161 tokens

golang-pkg-go-dev

Golang package and module lookup via godig, a pkg.go.dev API client (CLI + MCP server). Use for any Go/Golang library's documentation, API signatures, symbols, usage examples, which versions exist, licenses, whether a dependency has CVEs, or who imports a package — prefer this over Context7 for any Go package or…

samber/cc-skills-golang · 173 tokens