К основному содержанию
скилл CX Codex

codebase-analyzer — скилл для Claude Code: анализ и установка

Скилл разбирает архитектуру, качество кода, тесты и инфраструктуру репозитория. Нужен для технического отчёта по всему проекту.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add donnfelker/donnfelker-plugin-marketplace --skill codebase-analyzer -a claude-code
Открыть на GitHub

Что делает codebase-analyzer

codebase-analyzer проводит многоэтапный разбор репозитория: изучает структуру каталогов, манифесты, конфигурацию, точки входа и связи между модулями. Затем анализирует ключевые потоки, слой данных, API, тесты, обработку ошибок, безопасность, сборку, CI/CD и окружения.

Результат сохраняется в Markdown-файл {TARGET_DIR}/{REPO_NAME}_COMPREHENSIVE_ANALYSIS.md. Отчёт рассчитан на инженеров и содержит ссылки на конкретные пути в проекте, а также ASCII-схемы архитектуры и потоков. Скилл работает в режиме чтения: целевой код не меняется, записывается только файл анализа.

Какие задачи решает

  • составить технический обзор репозитория
  • описать архитектуру и связи модулей
  • проследить ключевые потоки приложения
  • оценить тесты, ошибки и безопасность
  • разобрать сборку и CI/CD

Примеры запросов агенту

  • Проанализируй этот репозиторий и создай подробный технический отчёт.
  • Опиши архитектуру проекта, точки входа и ключевые потоки.
  • Проведи аудит кода: проверь тесты, обработку ошибок и инфраструктуру.

Как установить codebase-analyzer

1Через Skills CLI (Vercel)

npx skills add donnfelker/donnfelker-plugin-marketplace --skill codebase-analyzer -a claude-code

2Вручную: положить файлы

~/.claude/skills/codebase-analyzer/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/codebase-analyzer/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о codebase-analyzer

Как установить codebase-analyzer в Claude Code?

Выполните npx skills add donnfelker/donnfelker-plugin-marketplace --skill codebase-analyzer -a claude-code, затем проверьте файл ~/.claude/skills/codebase-analyzer/SKILL.md.

Что делает codebase-analyzer?

Скилл разбирает структуру, архитектуру, качество кода, тестирование и инфраструктуру проекта, после чего создаёт подробный Markdown-отчёт.

Меняет ли скилл файлы проекта?

Нет. Анализ выполняется в режиме чтения; записывается только файл отчёта {TARGET_DIR}/{REPO_NAME}_COMPREHENSIVE_ANALYSIS.md.

Исходный текст

SKILL.md · MIT
---
name: codebase-analyzer
description: "When the user wants a comprehensive technical analysis of a codebase or project. Also use when the user mentions 'analyze this codebase,' 'technical overview,' 'document this architecture,' 'what does this codebase do,' 'summarize this repo,' 'code audit,' 'architecture review,' 'codebase walkthrough,' or 'analyze this project.' Performs a multi-phase analysis covering architecture, code quality, testing, and infrastructure, producing a detailed markdown report targeting engineers. For quick code searches or single-file reviews, see standard editor tools."
---

# Codebase Technical Analysis

## Role

You are a senior software architect and technical writer. Your task is to perform a comprehensive technical analysis of a codebase and produce a detailed markdown document targeting engineers.

## Input

The user will provide a directory path. This is the root of the codebase to analyze.

## Output

A comprehensive markdown analysis file written to `{TARGET_DIR}/{REPO_NAME}_COMPREHENSIVE_ANALYSIS.md`, where `{TARGET_DIR}` is the root directory provided by the user and `{REPO_NAME}` is the name of the repository/project (derived from the directory name or project manifest).

## Execution Strategy

Follow these phases **in order**. Do not skip phases. Think step-by-step and be methodical.

---

### Phase 1: Reconnaissance (Broad Scan)

Goal: Build a mental map of the codebase without reading every file.

1. **List the top-level directory structure** (2-3 levels deep). Note the directory layout and naming conventions.
2. **Identify key manifest/config files** — prioritize reading these first:
   - Package manifests: `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`, `build.gradle`, `build.gradle.kts`, `Gemfile`, `*.csproj`, `Podfile`, `*.xcodeproj/project.pbxproj`, `Package.swift`, etc.
   - Build/CI configs: `Makefile`, `Dockerfile`, `docker-compose.yml`, `.github/workflows/*`, `ci.yml`, `bin/ci`, `Jenkinsfile`, `turbo.json`, `nx.json`, `lerna.json`, `fastlane/Fastfile`
   - Config files: `tsconfig.json`, `.eslintrc.*`, `.env.example`, `webpack.config.*`, `vite.config.*`, `detekt.yml`, `.rubocop.yml`, `.swiftlint.yml`, `checkstyle.xml`, `.editorconfig`
   - Docs: `README.md`, `CONTRIBUTING.md`, `ARCHITECTURE.md`, `docs/` folder
3. **Identify multi-module/monorepo structure** (if applicable): Map packages, modules, services, targets, shared libraries, and their relationships.
4. **Catalog languages and frameworks** used across the codebase based on file extensions, imports, and manifests.

### Phase 2: Architectural Deep Dive

Goal: Understand how the system is structured and how components interact.

1. **Identify entry points**: `main.*`, `index.*`, `app.*`, `server.*`, `AppDelegate.*`, `Application.*`, route definitions, CLI entrypoints, activity/fragment entry points (Android), view controller hierarchies (iOS).
2. **Trace core application flows**: Follow up to 5 critical paths end-to-end (e.g., an API request from route → controller → service → data layer → response, a UI interaction from user event → state management → rendering, a background job lifecycle). If more flows exist, note them and reference the files where a reader can trace them independently.
3. **Map the dependency graph** between internal modules/packages. Note which components depend on which.
4. **Identify architectural patterns**: microservices, monolith, event-driven, hexagonal/clean architecture, MVC, CQRS, etc.
5. **Examine data layer**: Database schemas/migrations, ORM usage, data models, caching strategies.
6. **Examine API surface**: REST, GraphQL, gRPC, WebSocket, IPC, or SDK interface definitions. Note auth patterns, protocol buffers, or API contracts.

### Phase 3: Quality & Patterns Assessment

Goal: Evaluate engineering practices and code quality.

1. **Testing**: Examine test directory structure, frameworks used, test patterns (unit, integration, e2e), coverage configuration, fixture/mock strategies.
2. **Error handling**: How are errors propagated? Is there centralized error handling? Logging strategy?
3. **Type safety & validation**: Type safety strictness (e.g., compiler flags, strict modes, lint rules), runtime validation (schema libraries, contract enforcement), null safety, and input/output schema enforcement.
4. **Security posture**: Auth/authz patterns, secrets management, input sanitization, dependency vulnerabilities (if lockfile present).
5. **Code patterns**: Scan for consistency in naming conventions, module organization, abstraction levels, and code duplication.

### Phase 4: Infrastructure & Operations

Goal: Understand how the software is built, deployed, and operated.

1. **Build system**: Build tooling, bundling, compilation steps, monorepo task orchestration.
2. **CI/CD pipeline**: Examine workflow files for test, lint, build, deploy stages.
3. **Deployment model**: Containers, serverless, PaaS, static hosting, app store distribution, embedded/firmware delivery. Infrastructure-as-code if present (Terraform, Pulumi, CDK).
4. **Observability**: Logging, metrics, tracing, monitoring, alerting configuration.
5. **Environment management**: How are environments (dev, staging, prod) differentiated?

### Phase 5: Synthesis & Document Generation

Goal: Compile findings into the output document.

Use the output template in `references/output-template.md` for the document structure. Write the final analysis to the output path described in the **Output** section above.

---

## Execution Rules

1. **Read before you write.** Do not generate the document until you have completed Phases 1-4.
2. **Reference specific files.** Every claim should reference actual file paths (e.g., `src/api/routes.ts`). Never make generic observations without evidence.
3. **Be honest about unknowns.** If you couldn't determine something (e.g., a compiled/minified section, or a service you lack access to), say so explicitly.
4. **Prioritize depth over breadth.** For any non-trivial codebase, you cannot read every file. Focus on entry points, core business logic, and architectural boundaries. Skip generated code, vendored dependencies, and boilerplate.
5. **Use ASCII diagrams** for architecture and flow illustrations. Keep them simple and readable.
6. **Scale your effort.** Spend roughly 60% of effort on Phases 2-3 (architecture and quality), 20% on Phase 1 (recon), and 20% on Phase 4 (infra).
7. **Write the output file in sections.** Build the markdown file incrementally — write each major section as you complete it rather than trying to write the entire document in a single operation.
8. **File size heuristic.** When deciding what to read in large directories, prioritize: entry points > configuration > core domain logic > utilities > tests > generated code.
9. **Read-only analysis.** Do not modify, create, or delete any files in the target codebase. The only file you write is the output analysis document.
10. **Large codebase heuristic.** For monorepos or codebases with more than 500 files, focus analysis on the top 2-3 most significant modules/services rather than attempting complete coverage. Note scope limitations in the Executive Summary.

© donnfelker · MIT · donnfelker/donnfelker-plugin-marketplace

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. 1 052 851установок ask-matt Matt Pocock Помогает выбрать подходящий скилл или рабочий поток из набора Matt Pocock. Пригодится, когда непонятно, с чего начать задачу: от идеи до разбора бага. 766 587установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. CX Codex 282 859установок caveman-review JuliusBrussee Пишет замечания к коду одной строкой: место, проблема, исправление. Пригодится, когда ревью диффа или PR надо пройти быстро и без воды. CX Codex +1 411 800установок caveman-compress JuliusBrussee Сжимает CLAUDE.md, списки задач и другие текстовые файлы в краткий формат, сохраняя читаемую резервную копию. CX Codex +1 411 500установок

Из того же набора3

Спонсоры проекта

Компании, которые помогают держать аналитику открытой