code-graphs

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

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/hellothisworld/open-mind/code-graphs
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.

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. 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.00047 $0.00470
Opus 5 $0.00023 $0.00235
Sonnet 5 $0.00009 $0.00094
Haiku 4.5 $0.00005 $0.00047

Measured yesterday against content hash a89d4be9875a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 1mo ago), licensed MIT. It adds 47 tokens to every session and 470 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

codestory-grounding

Use when an agent should ground a local repository with CodeStory before making source claims, planning edits, choosing tests, reviewing changes, or using broad retrieval evidence through the CodeStory plugin MCP.

TheGreenCedar/CodeStory · 44 tokens

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-style-fingerprint

Pull the codebase's empirical style norm from Memtrace and match it when writing or editing source code in an indexed repo. Use when choosing between competing idioms (ternary vs if-else, arrow vs function declaration, const vs let, await vs .then, early-return vs nested-return), matching naming case, or when the user…

syncable-dev/memtrace-public · 111 tokens

memtrace-decision-memory

Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the…

syncable-dev/memtrace-public · 137 tokens

memtrace-fleet-first

Coordinate fleets of coding agents sharing one repo+branch: publish typed intents, classify edit episodes, and resolve conflicts before they collide. Use FIRST when multiple agents work the same repo+branch, before reading/planning/editing, when joining a fleet or handing work off, and when the user says two agents…

syncable-dev/memtrace-public · 144 tokens

memtrace-change-impact-analysis

Compute what a planned source-code change will break — blast radius, affected processes, cross-repo callers, temporal stability, and Cortex decision-memory constraints — and produce a risk-rated change plan. Use for multi-symbol or multi-part edits, refactors, API changes, renames, removals, PR reviews, or risk…

syncable-dev/memtrace-public · 117 tokens