codebase-analysis

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

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/medy-gribkov/arcana/codebase-analysis
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.

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. 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.00046 $0.01968
Opus 5 $0.00023 $0.00984
Sonnet 5 $0.00009 $0.00394
Haiku 4.5 $0.00005 $0.00197

Measured 2d ago against content hash d13964acaaa0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 2d 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 1mo 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. 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

ultimate-seo-geo

Audits and optimizes websites for search engine visibility (SEO) and AI search citation (GEO), covering technical health, E-E-A-T content scoring, domain authority, structured data, rich results, and entity signals. Use when running SEO audits, diagnosing traffic drops or ranking losses, generating Schema.org JSON-LD…

mykpono/ultimate-seo-geo · 144 tokens

neo-stop-slop

Use this skill when the user wants to polish, rewrite, shorten, or review prose so it sounds natural rather than AI-generated. Trigger for Traditional Chinese or English drafts, rough notes, source material, articles, technical docs, code comments, commit messages, PR descriptions, sales copy, or requests to remove AI…

Benknightdark/neo-skills · 80 tokens

neo-iso-27001

Use this skill when the user needs to establish, review, or improve an ISO/IEC 27001 ISMS, perform information security risk discovery, define scope, create an evidence matrix, conduct a gap analysis, draft a Statement of Applicability, prepare for an internal audit, or create an improvement plan. Use neo-iso-27701…

Benknightdark/neo-skills · 103 tokens

neo-iso-27701

Use this skill when the user needs to establish, review, or improve an ISO/IEC 27701 PIMS, inventory PII processing, analyze controller and processor responsibilities, create a privacy risk or evidence matrix, conduct a gap analysis, prepare for an audit, or create an improvement plan. Use neo-iso-27001 when the main…

Benknightdark/neo-skills · 102 tokens

neo-azure-pipelines

Use this skill when the user asks to create, review, debug, or modernize Azure Pipelines YAML for CI/CD, especially .NET builds, Azure App Service deploys, or IIS/on-premises deploys. Prefer bundled templates and verify task syntax against Microsoft docs when version-specific accuracy matters.

Benknightdark/neo-skills · 66 tokens

neo-clean-architecture

Use this skill when the user wants to design, implement, review, or refactor software systems conforming to Clean Architecture principles. It structures code into Domain, Application, Infrastructure, and Presentation/API layers, enforcing inward-only dependencies. It advocates rich domain models, CQRS, and the Result…

Benknightdark/neo-skills · 76 tokens