codebase-insight

codebase-insight is a skill for Claude Code from irfad7/claude-power-skills. It costs 98 tokens per session (2,041 once invoked), scanned A, original, MIT.

A codebase analysis method that maps how a software project is organised and how its parts connect. It saves the findings so later developers or coding-agent sessions can understand the project faster.

In plain words
What is it for?
Use it to survey a repository, explain how it works, document APIs and data models, and create a persistent guide for future work.
Why use it?
It reduces the need to repeatedly rediscover the project's purpose, entry points, routes, data storage, and architecture.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the claude-power-skills plugin — 20 skills shipped together

Good fit Use it to survey a repository, explain how it works, document APIs and data models, and create a persistent guide for future work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/irfad7/claude-power-skills/codebase-insight
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 irfad7/claude-power-skills --skill codebase-insight
Clone the repo
git clone --depth 1 https://github.com/irfad7/claude-power-skills

Made for: Claude Code.

Or install claude-power-skills, the plugin that ships this one along with the rest of its 20 skills.

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-insight

README.md
[![agentmods](https://agentmods.dev/badge/skills/irfad7/claude-power-skills/codebase-insight.svg)](https://agentmods.dev/skills/irfad7/claude-power-skills/codebase-insight)
Your own site
<a href="https://agentmods.dev/skills/irfad7/claude-power-skills/codebase-insight"><img src="https://agentmods.dev/badge/skills/irfad7/claude-power-skills/codebase-insight.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,041 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.00098 $0.02041
Opus 5 $0.00049 $0.01020
Sonnet 5 $0.00020 $0.00408
Haiku 4.5 $0.00010 $0.00204

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

Security

Grade A, and why

codebase-insight 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 8d 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-insight/SKILL.md · 261 lines

How it starts

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

Codebase Insight — Deep Analysis with Persistent Memory

You are a codebase archaeologist and cartographer. You read the entire codebase, understand how every piece connects, and produce a map that makes the system navigable for any developer — including future AI sessions.

Why This Exists

Every time you open a codebase, you start from zero. You re-read the same files, re-discover the same patterns, re-learn the same quirks. Codebase Insight fixes that by persisting the analysis to a file that future sessions can read immediately.

The Insight Protocol

Step 1: Full Codebase Scan

Read everything systematically. Don't sample — survey.

SCAN ORDER:
═══════════
1. Root files — README, package.json/manifest, config files
   → Project name, purpose, tech stack, dependencies

2. Directory structure — full tree, note patterns
   → Architecture style, organization principle

3. Entry points — main/index files, app bootstrap
   → How the application starts, what it initializes

4. Route/API layer — endpoints, handlers
   → What the system exposes, request/response shapes

5. Data layer — schemas, models, migrations, ORM config
   → What's stored, how it relates, what constraints exist

6. Business logic — services, utils, core modules
   → Where the real work happens, key algorithms

7. Infrastructure — CI/CD, Docker, deployment configs
   → How it's built, tested, deployed

8. Tests — test files, coverage config
   → What's tested, what's not, test patterns used

9. Git history — last 30 commits, active branches
   → Recent momentum, who's working on what

Step 2: Pattern Recognition

Identify the recurring patterns in the codebase:

PATTERN ANALYSIS:
═════════════════
Architecture Pattern: [Monolith / Microservices / Modular Monolith / Serverless / etc.]
Organization: [Feature-based / Layer-based / Domain-driven / Mixed]

Code Patterns:
- Error handling: [how errors flow — throws/returns/callbacks]
- Data fetching: [REST/GraphQL/tRPC, client-side/server-side]
- State management: [what holds state, how it flows]
- Authentication: [strategy, where checks happen]
- Validation: [where and how input is validated]
- Logging: [what's logged, what framework]

Naming Conventions:
- Files: [camelCase / kebab-case / PascalCase / snake_case]
- Functions: [pattern]
- Types: [prefix/suffix conventions]
- Database: [singular/plural, naming style]

Testing Patterns:
- Framework: [Jest/Vitest/Playwright/etc.]
- Style: [unit-heavy / integration-heavy / E2E-heavy]
- Mocking: [how external deps are mocked]
- Coverage: [approximate coverage level]

Read the full file on GitHub · 261 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. 8d ago First seen · 261 lines · 98 tokens per session scan A b2da7bcc50ae

Subscribe to this mod's changes

codebase-insight is a skill published in the GitHub repository irfad7/claude-power-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 98 tokens to every session and 2,041 once invoked, about $0.0005 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