codebase-anatomy

codebase-anatomy is a skill for Claude Code from GhostlyGawd/codeweb. It costs 136 tokens per session (2,745 once invoked), scanned A, original, MIT.

A codebase-analysis skill that maps functions, classes, imports, calls, and inheritance, then groups them by domain and highlights overlapping work.

In plain words
What is it for?
It is for onboarding, analyzing internal or external repositories, planning refactors, and identifying code that could be consolidated.
Why use it?
It helps developers understand large or unfamiliar systems and find duplicated logic before restructuring them.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the codeweb plugin — 3 skills, 4 commands, 2 agents, 3 hooks, 1 MCP server shipped together

Good fit It is for onboarding, analyzing internal or external repositories, planning refactors, and identifying code that could be consolidated.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add GhostlyGawd/codeweb
Claude Code
/plugin install codeweb

Made for: Claude Code.

Or install codeweb, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 2 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 codebase-anatomy

README.md
[![agentmods](https://agentmods.dev/badge/skills/ghostlygawd/codeweb/codebase-anatomy/github.svg)](https://agentmods.dev/skills/ghostlygawd/codeweb/codebase-anatomy)
Your own site
<a href="https://agentmods.dev/skills/ghostlygawd/codeweb/codebase-anatomy"><img src="https://agentmods.dev/badge/skills/ghostlygawd/codeweb/codebase-anatomy/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 codebase-anatomy

Your own site · 80×15
<a href="https://agentmods.dev/skills/ghostlygawd/codeweb/codebase-anatomy"><img src="https://agentmods.dev/badge/skills/ghostlygawd/codeweb/codebase-anatomy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,745 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.00136 $0.02745
Opus 5.5 $0.00054 $0.01098
Sonnet 5.5 $0.00027 $0.00549
Haiku 4.5 $0.00014 $0.00275

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

Security

Grade A, and why

codebase-anatomy 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/codebase-anatomy/SKILL.md · 213 lines

How it starts

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

Codebase Anatomy (codeweb)

Build a structural map of the system. Each function, class, method, or exported symbol is a node. Calls, imports, and inheritance relationships are edges. Each node belongs to a domain. An overlap graph identifies separate parts that do the same work.

The result is an evidence-backed restructuring plan. It identifies the duplicated logic that can move into one defined system and the symbols that must depend on that system.

When to Use

  • Restructuring your own codebase and you need to see the real dependency web and where it's duplicative before moving code.
  • Onboarding to a large or legacy system at symbol resolution, including relationships across folders.
  • Reviewing an external repo (a plugin, library, or template you found on GitHub) end-to-end before adopting it — what it does, how it's wired, and whether it's worth committing to.
  • Hunting cross-cutting duplication that file/module tools miss (the same check coded N times in N domains).

Two Modes

  • internal — analyze the current project; produce a domain map + overlap graph + restructure recommendations.
  • external — target is a git URL or owner/repo. Clone it read-only to a temp dir, map it the same way, and add an adoption review (risk, dependencies, architecture verdict, "should you adopt this?").

Auto-detect: a URL or owner/repo ⇒ external; a path or . ⇒ internal. --mode overrides.

Non-Negotiable Rules

  • Never execute the target. No build, run, test, install, or entrypoint — for internal or external code. Only read files and invoke read-only static-analysis tools that inspect files already on disk. This is absolute for external repos (their toolchain can run their code).
  • Evidence over guesswork. Every node, edge, domain, and overlap must trace to code you read or a tool emitted. When unsure of an edge or an overlap, omit it or mark it low — never inflate. A report that cries wolf is worse than no report.
  • No silent truncation. If you cap depth, sample, or skip files, say so in the report and in meta. Coverage gaps must be visible.
  • One graph, one schema. Everything conforms to references/graph-schema.md. The HTML renderer and all agents depend on it.
  • Reuse, don't reinvent. If they're installed, hand off to repo-scan (file/library classification), codebase-onboarding (guides), refactor-cleaner (acting on the list) rather than redoing their jobs. These are optional separate skills — when absent, do the step inline (each Handoffs entry names its one-line alternative). Never search for or apologize about a skill that isn't there.

Read the full file on GitHub · 213 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. 1mo ago Changed 8105b671cac6
  2. 2mo ago Changed 56bf6dc036f1
  3. 2mo ago Changed a3be6b1072f0
  4. 3mo ago First seen · 213 lines · 136 tokens per session scan A 486246e26e0f

Subscribe to this mod's changes

codebase-anatomy is a skill published in the GitHub repository GhostlyGawd/codeweb (0 stars, last pushed 1mo ago), licensed MIT. It adds 136 tokens to every session and 2,745 once invoked, about $0.0005 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

codebase-anatomy compared with skills from other repositories

codebase-anatomy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-anatomyGhostlyGawd/codewebSkill01mo agoMITA136Claude Code
dekko-verifyaahlijia/dekkoSkill612d agoMITA151Claude Code
dekko-sanityaahlijia/dekkoSkill612d agoMITA87Claude Code
dekko-doctoraahlijia/dekkoSkill612d agoMITA77Claude Code
dekko-refactoraahlijia/dekkoSkill612d agoMITA125Claude Code
dekko-debugaahlijia/dekkoSkill612d agoMITA120Claude Code
windows-compatsdsrss/code-graph-mcpSkill1026d agoMITA165Claude Code, Codex