codegraph-partner

A code-structure assistant answers questions about symbols and relationships in a code repository. It uses a code graph, which maps definitions, callers, callees, and possible impact when code changes.

In plain words
What is it for?
Use it to find symbol definitions, inspect callers and callees, estimate change impact, and understand repository architecture.
Why use it?
It helps determine where code is defined, what depends on it, and what may break after a change. This is more targeted than searching prose or files alone.

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/itechmeat/open-second-brain/codegraph-partner
Any agent
npx skills add itechmeat/open-second-brain --skill codegraph-partner
Clone the repo
git clone --depth 1 https://github.com/itechmeat/open-second-brain

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,555 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00062 $0.01555
Opus 5 $0.00031 $0.00777
Sonnet 5 $0.00012 $0.00311
Haiku 4.5 $0.00006 $0.00155

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

Security

Grade C, and why

codegraph-partner scanned grade C with 2 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 2d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

> `curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

> `curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh`
skills/codegraph-partner/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codegraph partner

OSB and codegraph are complementary, not overlapping. OSB owns the vault (Markdown prose, the Brain layer, preferences, paid-action audit). The codegraph CLI and its MCP server own the code-symbol graph of a repository - callers, callees, impact radius, AST. This skill teaches the agent to detect codegraph in the current scope and to use, recommend, or stay quiet about it, depending on what is actually nearby.

This skill never installs, initializes, or writes data for codegraph itself. Those actions stay in the user's hands or in codegraph's own installer.

Step 1 - detect

Run these checks in order. Stop at the first state that matches.

  1. CLI presence: which codegraph (or, in Bun runtimes, Bun.which("codegraph")).
  2. Code-project signal in the current working directory: a .git/ directory plus at least one of package.json, pyproject.toml, Cargo.toml, go.mod, tsconfig.json, Gemfile, composer.json, build.gradle, pom.xml.
  3. If neither cwd nor the user's named project is a code project, look at the vault's parent directory and inspect the top-level entries (one level only). Many users keep their repos as siblings of the vault. All discovered code projects are candidates, not just the first.
  4. Index state: a .codegraph/ directory inside the code project root.
  5. Confirmed index: codegraph status -j <project_path> returns {"initialized": true, ...}. The same command on an uninitialized project returns {"initialized": false, ...} rather than failing.

The structured way to ask is o2b doctor. When OSB is installed in the workspace, the doctor report carries a code_graph line that summarises the detection result with node count and file count.

Multi-project workspaces: when more than one code project is discovered, the code_graph line covers EVERY project. Status is threaded per project by passing each project's path to codegraph status, and the line aggregates one entry per project (N code projects: followed by a bullet per project naming its path and index state/health). This per-query project-path threading is feature-detected: if the installed codegraph CLI does not document a positional [path] argument for status, OSB cannot trust per-project queries, so it degrades to reporting the first project only and appends an explicit note: codegraph CLI has no per-query project_path support - reported 1 of N discovered projects only. A single-project workspace is unaffected and its line is unchanged.

Read the full file on GitHub · 131 lines

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. 2d ago First seen · 131 lines · 62 tokens per session scan C 503871654786

Subscribe to this mod's changes

codegraph-partner is a skill published in the GitHub repository itechmeat/open-second-brain (385 stars, last pushed 5d ago), licensed MIT. It adds 62 tokens to every session and 1,555 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens