codegraph

codegraph is a skill for Claude Code, Codex from linkpranay-ai/context-engineering-protocol. It costs 40 tokens per session (4,514 once invoked), scanned A, original, Apache-2.0.

A tool that builds a knowledge graph of a codebase: a map of files, functions, classes, imports, calls, uses, and inheritance relationships.

In plain words
What is it for?
Use it to generate or refresh the graphify-out/ graph so other tools can inspect cross-file relationships before editing code.
Why use it?
It reveals connections across files that a text search may miss, helping agents understand how a change can affect the wider codebase.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions AGENTS.md.

Good fit Use it to generate or refresh the graphify-out/ graph so other tools can inspect cross-file relationships before editing code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/linkpranay-ai/context-engineering-protocol/ult-codegraph
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 linkpranay-ai/context-engineering-protocol --skill ult-codegraph
Clone the repo
git clone --depth 1 https://github.com/linkpranay-ai/context-engineering-protocol

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 codegraph

README.md
[![agentmods](https://agentmods.dev/badge/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph/github.svg)](https://agentmods.dev/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph)
Your own site
<a href="https://agentmods.dev/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph"><img src="https://agentmods.dev/badge/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph/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 codegraph

Your own site · 80×15
<a href="https://agentmods.dev/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph"><img src="https://agentmods.dev/badge/skills/linkpranay-ai/context-engineering-protocol/ult-codegraph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,514 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.04514
Opus 5.5 $0.00016 $0.01806
Sonnet 5.5 $0.00008 $0.00903
Haiku 4.5 $0.00004 $0.00451

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

Security

Grade A, and why

codegraph 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 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_graphify_output.py, scripts/tests/test_check_graphify_output.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.github/skills/ult-codegraph/SKILL.md · 345 lines

How it starts

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

Codebase Graph (graphify wrapper)

Wraps the external graphify CLI (https://github.com/safishamsi/graphify, MIT license, distributed as the PyPI package graphifyy) to build a knowledge graph of a codebase — files, functions, classes, and their calls/imports/uses/inherits relationships — at graphify's own fixed output location, graphify-out/, where other skills query it directly.

Status: piloting. Validated on a real ~40 KSLOC FastAPI codebase (a structural lead — webhook_dispatcher.py → RetryPolicy, the bridge between two otherwise-separate subsystems — that a textual grep could not find, since the bridging file never mentions the target term) before this migration. Now rolling out to a small set of engineering volunteers piloting it on substantially larger codebases (500 KSLOC+), where graph.json itself can run to tens of MB and the scoped-query pattern below stops being optional and starts being the only thing that scales. Report findings (works well / doesn't / surprises) as an issue in this repo so this can graduate out of pilot status or be reworked.

How to generate / refresh the graph

Step 0 — scope the index (first run only)

Before running graphify update on the whole repo, take a quick look at what's actually there:

# Top-level dirs by file count — surfaces generated/vendored/other-language subtrees
for d in */; do n=$(find "$d" -type f | wc -l); echo "$n $d"; done | sort -rn | head -10

Then ask: is there one directory that holds essentially all the source you care about, separate from generated code, vendored third-party libraries, or bindings for other languages?

  • Yes — point graphify update at that directory instead of . (e.g. graphify update src/ --no-cluster). Smaller, cleaner graph; less cross-language noise in affected/explain results.
  • No (everything's genuinely mixed) — run graphify update . --no-cluster on the repo root. Validated on a real ~300 KSLOC, 8-language, 2425-file monorepo (google/protobuf): completed in 5m28s, 73K nodes / 254K edges, with affected/explain queries returning in ~3s — an unscoped run on a messy repo is workable, just expect occasional cross-language results.
  • No, but multiple genuinely independent roots (e.g. sibling repos or workspace directories with no shared parent worth scoping to) — index each root separately, then combine:

Read the full file on GitHub · 345 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed · +30 lines 35ec649d5332
  2. 3mo ago First seen · 315 lines · 40 tokens per session scan A b7534f2bb814

Subscribe to this mod's changes

codegraph is a skill published in the GitHub repository linkpranay-ai/context-engineering-protocol (10 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 4,514 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

codegraph compared with skills from other repositories

codegraph next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codegraphlinkpranay-ai/context-engineering-protocolSkill102mo agoApache-2.0A40Claude Code, Codex
ambiguity-detectordigipulse-engineering/GAAI-frameworkSkill16413d agononeA77Claude Code, Codex
memory-index-lintdigipulse-engineering/GAAI-frameworkSkill16413d agononeA64Claude Code, Codex
remediate-failuresdigipulse-engineering/GAAI-frameworkSkill16413d agononeA43Claude Code, Codex
post-mortem-learningdigipulse-engineering/GAAI-frameworkSkill16413d agononeA44Claude Code, Codex
recoveryBrianNguyen29/x-harnessSkill153mo agoMITA4Claude Code
aicrew-fixAKSoftCode/aicrewSkill35mo agoMITA32Codex