code-graphs

code-graphs is a skill for Claude Code, Codex from HelloThisWorld/open-mind. It costs 47 tokens per session (470 once invoked), scanned A, original, MIT.

A code-analysis tool that builds maps of a repository’s files, definitions, imports, dependencies, entry points, and likely function calls. It records where each result came from and marks uncertain links instead of guessing.

In plain words
What is it for?
Use it to inspect module structure, find dependencies, trace callers and callees, identify entry-point flows, or create Mermaid and DOT diagrams.
Why use it?
It helps developers understand an unfamiliar codebase without relying on invented relationships. Incremental scanning avoids rechecking unchanged files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect module structure, find dependencies, trace callers and callees, identify entry-point flows, or create Mermaid and DOT diagrams.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hellothisworld/open-mind/code-graphs
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.

Any agent
npx skills add HelloThisWorld/open-mind --skill code-graphs
Clone the repo
git clone --depth 1 https://github.com/HelloThisWorld/open-mind

Made for: Claude Code, Codex.

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 code-graphs

README.md
[![agentmods](https://agentmods.dev/badge/skills/hellothisworld/open-mind/code-graphs/github.svg)](https://agentmods.dev/skills/hellothisworld/open-mind/code-graphs)
Your own site
<a href="https://agentmods.dev/skills/hellothisworld/open-mind/code-graphs"><img src="https://agentmods.dev/badge/skills/hellothisworld/open-mind/code-graphs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-graphs

Your own site · 80×15
<a href="https://agentmods.dev/skills/hellothisworld/open-mind/code-graphs"><img src="https://agentmods.dev/badge/skills/hellothisworld/open-mind/code-graphs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.00470
Opus 5.5 $0.00019 $0.00188
Sonnet 5.5 $0.00009 $0.00094
Haiku 4.5 $0.00005 $0.00047

Measured 1mo ago against content hash a89d4be9875a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-graphs 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 1mo 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.

skills/code-graphs/SKILL.md · 37 lines

What it actually says

Code graphs — deterministic structure map

What it does

Performs line-oriented static analysis (language specs in openmind.langspec, tree-sitter for Java where available) to recover, for ANY repository, a persisted structure artifact: a module tree, a per-file definition index, entry points, an import/dependency graph, and a name-based call/usage graph. From it, openmind.diagrams projects interactive call graph data plus Mermaid / DOT diagrams.

Determinism & anti-fabrication contract

  • Graphs are recovered from facts in the code (defs, imports, call sites) — never model-generated.
  • Internal import edges are resolved where the language makes it tractable; unresolved/external references are recorded as such, never invented.
  • Call edges are name-based and flagged ambiguous when a symbol is defined in more than one file — the tool states uncertainty instead of guessing.
  • File nodes and definitions carry source locations; directory/module nodes are rollups over real files. There is no path that fabricates an edge.
  • Incremental: hash-keyed per file, so an unchanged file is not re-scanned.

Invocation

  • REST: GET /structure?scope= (overview: stats, entry points, top modules), GET /graph?scope= (call roots), GET /graph/children, and GET /graph/node?scope=&id= (a node's source location, defs, call neighbors, cross-linked glossary terms).
  • Library: openmind.structure.build_structure(...), get_definition(doc, symbol), term_usage(doc, term); openmind.diagrams for projections.

Implementation / tests

openmind/structure.py, openmind/diagrams.py, openmind/langspec.py, openmind/javaparse.py. Acceptance: tests/verify_structure.py, tests/verify_diagrams.py.

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. 1mo ago First seen · 37 lines · 47 tokens per session scan A a89d4be9875a

Subscribe to this mod's changes

code-graphs is a skill published in the GitHub repository HelloThisWorld/open-mind (1 stars, last pushed 2mo ago), licensed MIT. It adds 47 tokens to every session and 470 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other skills, from other repositories

memtrace-first

Route code discovery, debugging, flow tracing, how-code-works questions, and pre-edit rationale checks in indexed source-code repos to Memtrace graph plus Cortex decision tools. Use first before searching/reading code, and before editing, refactoring, deleting, or re-picking an approach that may have a recorded…

syncable-dev/memtrace-public · 115 tokens

memtrace-incident-investigation

Investigate source-code bugs, incidents, regressions, production issues, and failures to root cause with Memtrace symbol search, impact, call graph, and temporal history. Use when the user asks about root cause analysis, what broke, or what changed when debugging a failure. Do not start with Grep, Glob, rg, find, or…

syncable-dev/memtrace-public · 99 tokens

memtrace-preflight

Run a one-call pre-flight check on a single existing symbol before editing it: blast radius, co-change partners, complexity, 30-day churn, and verification checklist, then check Cortex decision memory for rationale/bans when intent may matter. Use before modifying any existing function or symbol you did not just…

syncable-dev/memtrace-public · 102 tokens

cartograph

Explore a codebase through Cartograph v2's PostgreSQL code graph: intent-aware context, exact/BM25/hybrid search, callers/callees/impact, affected tests, live source, review, freshness, and bounded index administration.

adder-factory/cartograph · 0 tokens

memtrace-cochange

Find files that historically co-change with a target symbol or file, ranked by co-occurrence across git episodes. Use when the user asks about historical coupling, co-change, what changes with this, hidden dependencies, or what else needs to move for source code. Do not use git log, git diff, Grep, or manual file…

syncable-dev/memtrace-public · 88 tokens

memtrace-episode-replay

Replay the graph diff of one episode — a single git commit or working-tree save — to inspect what it changed: added/modified/removed symbols and edges. Use when the user asks what one commit or save changed in the graph, why code looks this way, or wants to inspect implementation attempts, reversions, past reasoning…

syncable-dev/memtrace-public · 125 tokens