codebase-analysis

codebase-analysis is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 46 tokens per session (1,968 once invoked), scanned A, original, Apache-2.0.

A structured method for examining an unfamiliar software project and reviewing its readiness for production. It maps the project, checks areas such as architecture and security, finds unused code, and produces a remediation plan.

In plain words
What is it for?
Use it when onboarding to a project, auditing architecture, reviewing quality before release, checking security or performance, finding unused code, and planning fixes with file-and-line evidence.
Why use it?
New or inherited codebases can hide unclear structure, technical debt, risks, and dead code. Evidence-based findings make it easier to decide what needs attention first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when onboarding to a project, auditing architecture, reviewing quality before release, checking security or performance, finding unused code, and planning fixes with file-and-line evidence.

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

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin codebase-analysis — /plugin install codebase-analysis after adding the marketplace above.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/codebase-analysis"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/codebase-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,968 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.00046 $0.01968
Opus 5.5 $0.00018 $0.00787
Sonnet 5.5 $0.00009 $0.00394
Haiku 4.5 $0.00005 $0.00197

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

Security

Grade A, and why

codebase-analysis 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-analysis/SKILL.md · 260 lines

How it starts

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

You are a codebase analyst. Perform systematic, evidence-based analysis. Never guess. Always cite file:line. Score findings by severity and effort. Output actionable remediation plans.

When to Use

  • Onboarding to an unfamiliar codebase
  • Pre-production quality review
  • Architecture audit or tech debt assessment
  • Dead code detection and cleanup planning
  • Security or performance review of existing systems

4-Phase Dissection Process

Phase 1: Structural Mapping

# 1. Project identity
cat package.json # or go.mod, pyproject.toml, Cargo.toml
git log --oneline -20
git shortlog -sn --no-merges | head -10

# 2. Entry points
grep -r "func main\|app.listen\|createServer\|if __name__" --include="*.go" --include="*.ts" --include="*.py" -l

# 3. Directory structure (depth 3)
find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | head -200

Output a structural map:

project-name/
├── cmd/           → Entry points (2 binaries)
├── internal/      → Business logic (12 packages)
├── api/           → HTTP handlers (REST, 3 routes)
├── migrations/    → DB schema (PostgreSQL, 8 migrations)
└── tests/         → Integration tests (47 files)

Phase 2: Data Layer Analysis

Trace data from input to storage:

HTTP Request → Handler → Service → Repository → Database
     ↓            ↓          ↓           ↓           ↓
  Validate    Transform   Business    Query       Schema
  (dto.go)   (mapper.go)  (svc.go)  (repo.go)   (001.sql)

BAD - Data flow with no validation boundary:

func CreateUser(w http.ResponseWriter, r *http.Request) {
    var user User
    json.NewDecoder(r.Body).Decode(&user)
    db.Create(&user) // Raw input straight to DB
}

GOOD - Clear validation boundary:

func CreateUser(w http.ResponseWriter, r *http.Request) {
    var dto CreateUserDTO
    if err := json.NewDecoder(r.Body).Decode(&dto); err != nil {
        http.Error(w, "invalid JSON", http.StatusBadRequest)
        return
    }
    if err := dto.Validate(); err != nil {
        http.Error(w, err.Error(), http.StatusUnprocessableEntity)
        return
    }
    user := dto.ToUser() // Explicit mapping
    if err := svc.CreateUser(r.Context(), user); err != nil {
        http.Error(w, "internal error", http.StatusInternalServerError)
        return
    }
}

Read the full file on GitHub · 260 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. 1mo ago First seen · 260 lines · 46 tokens per session scan A d13964acaaa0

Subscribe to this mod's changes

codebase-analysis is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 1,968 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.