codebase-summarizer
БесплатноБез исполняемых скриптовНе проверенScans repository structure and generates comprehensive architecture documentation including system overview, entry points, module relationships, data flow…
от patricio0312rev★ 64 звезды на GitHubОб этом скилле
Codebase Summarizer
Generate comprehensive architecture documentation from repository analysis.
Core Workflow
- Scan structure: Recursively analyze folder tree and file organization
- Identify patterns: Detect framework, architecture style, key directories
- Map entry points: Find main files, routes, APIs, CLI commands
- Trace data flow: Follow requests through layers (controllers → services → models)
- Document modules: Explain purpose and responsibilities of each directory
- Create navigation: Build "how to" guides for common tasks
- Generate diagrams: Add Mermaid diagrams for visual architecture
Documentation Structure
ARCHITECTURE.md Template
# Architecture Overview
## System Summary
[Project Name] is a [type] application built with [stack]. It follows [architecture pattern] and handles [primary use cases].
**Tech Stack:**
- Frontend: [framework + key libraries]
- Backend: [framework + key libraries]
- Database: [database + ORM]
- Infrastructure: [hosting + CI/CD]
## High-Level Architecture
```mermaid
graph TB
Client[Client/Browser] --> API[API Layer]
API --> Services[Business Logic]
Services --> DB[(Database)]
Services --> Cache[(Redis Cache)]
API --> Queue[Message Queue]
```
Project Structure
src/
├── app/ # Application entry point and routing
├── components/ # Reusable UI components
├── lib/ # Utility functions and helpers
├── services/ # Business logic layer
├── models/ # Data models and schemas
└── types/ # TypeScript type definitions
Key Components
Entry Points
Main Application: src/app/page.tsx
- Application entry point
- Initializes providers and routing
- Handles global error boundaries
API Routes: src/app/api/
- RESTful API endpoints
- Authentication middleware
- Request validation
Core Modules
Authentication (src/services/auth/)
- User login and registration
- JWT token management
- OAuth2 integration
- Dependencies: bcrypt, jsonwebtoken
User Management (src/services/users/)
- CRUD operations for users
- Profile management
- Role-based access control
- Dependencies: Prisma, validation libraries
Data Layer (src/models/)
- Database schemas
- Prisma models
- Query builders
- Dependencies: Prisma Client
Data Flow
User Registration Flow
sequenceDiagram
Client->>API: POST /api/auth/register
API->>Validation: Validate input
Validation->>Services: UserService.create()
Services->>Database: Insert user
Database-->>Services: User created
Services->>Email: Send welcome email
Services-->>API: Return JWT
API-->>Client: 201 Created
Request Lifecycle
- Request arrives → API route handler (
src/app/api/[endpoint]/route.ts) - Middleware → Auth, validation, rate limiting
- Service layer → Business logic (
src/services/) - Data layer → Database queries (
src/models/) - Response → Format and return data
Common Patterns
Service Pattern
// src/services/users/user.service.ts
export class UserService {
async findById(id: string) {
return prisma.user.findUnique({ where: { id } });
}
async create(data: CreateUserDto) {
// Validation, business logic, database operations
}
}
Repository Pattern
// src/repositories/user.repository.ts
export class UserRepository {
async findAll() {
/* DB queries only */
}
async findById(id: string) {
/* DB queries only */
}
}
How To Guides
Add a New API Endpoint
Create route file:
src/app/api/[name]/route.tsexport async function GET(req: Request) { // Implementation }Add service logic:
src/services/[name].service.tsDefine types:
src/types/[name].tsAdd tests:
src/app/api/[name]/route.test.tsUpdate API docs: Document in OpenAPI/Swagger
Add a New Database Model
Update schema:
prisma/schema.prismamodel NewModel { id String @id @default(cuid()) // fields }Run migration:
npx prisma migrate dev --name add-new-modelGenerate types:
npx prisma generateCreate service:
src/services/new-model.service.tsAdd CRUD routes:
src/app/api/new-model/
Add a New React Component
- Create component:
src/components/NewComponent/NewComponent.tsx - Add styles:
NewComponent.module.cssor inline Tailwind - Write tests:
NewComponent.test.tsx - Add stories:
NewComponent.stories.tsx(if using Storybook) - Export: Update
src/components/index.ts
Modify Authentication
- Service layer:
src/services/auth/auth.service.ts - Middleware:
src/middleware/auth.middleware.ts - Routes:
src/app/api/auth/ - Update tests: Ensure auth flows still work
Key Files Reference
| File
Установить codebase-summarizer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл codebase-summarizer?
Scans repository structure and generates comprehensive architecture documentation including system overview, entry points, module relationships, data flow diagrams, and "edit here for X" guides. Creates ARCHITECTURE.md for onboarding and navigation. Use when users request "document the codebase", "explain the architecture", "create onboarding docs", or "map the system".
Как установить скилл codebase-summarizer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл codebase-summarizer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic