mcpField
A
analyze-codebase

analyze-codebase

github.com/shipshitdevDevelopment3893 installsUpdated 2d ago
Repository

About analyze-codebase

A codebase-analysis skill for developers who need onboarding, architecture documentation, or project health reviews. It guides discovery through recommendations and writes a structured report to `.agents/memory/codebase-analysis.md`.

Key features

  1. 01Project structure and file counts
  2. 02Module, entry point, and API mapping
  3. 03Pattern, security, and dependency review
  4. 04Structured analysis report
  5. 05Quick analysis mode

Use cases

  1. 01Onboarding developers to a codebase
  2. 02Documenting project architecture
  3. 03Assessing project health before refactoring

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/shipshitdev/skills --skill analyze-codebase

After installing, type/analyze-codebasein Claude Code to confirm it loaded.

Bundled filesplugin.json

Details

From the project README

Analyze Codebase

When to Use

  • Onboarding new developers
  • Architecture documentation
  • Project health assessment
  • Before major refactoring
  • Understanding system complexity

Analysis Process

Step 1: Discovery
# Project structure
tree -L 3 -I 'node_modules|.next|dist|build|coverage'

# File counts
find . -type f -name "*.ts" | wc -l
find . -type f -name "*.tsx" | wc -l
Step 2: Architecture Analysis
  • Identify modules, entry points, API structure
  • Map frontend components and routing
  • Document service patterns and conventions
Step 3: Patterns and Standards
  • Check for established patterns in docs/examples
  • Analyze type system organization
  • Review security patterns (auth, multi-tenancy, soft delete)
Step 4: Dependencies
  • Catalog external services and libraries
  • Check version currency
  • Identify critical dependencies
Step 5: Generate Report

Write to .agents/memory/codebase-analysis.md with these sections:

  1. Executive Summary — 3-5 sentence overview
  2. Project Overview — Tech stack, purpose, architecture style
  3. Directory Structure — Module layout and organization
  4. Architecture Patterns — Backend and frontend patterns
  5. Security Analysis — Auth, data isolation, validation
  6. Performance Insights — Database, caching, background jobs
  7. Code Quality — Strengths, improvements, tech debt
  8. Dependencies — Critical packages and version matrix
  9. Testing Strategy — Coverage, patterns, gaps
  10. Recommendations — Immediate, short-term, long-term

Quick Mode

For faster analysis (skip detailed metrics):

tree -L 3 -I 'node_modules|.next|dist'
echo "TypeScript: $(find . -name '*.ts' -o -name '*.tsx' | wc -l)"
echo "Controllers: $(find . -name '*.controller.ts' | wc -l)"
echo "Services: $(find . -name '*.service.ts' | wc -l)"

Comments

Markdown supported