
analyze-codebase
Codebase analysis command that produces broad documentation of an entire repository at once.
- version
- 1.0.0
- GitHub stars
- 689
What it does
- Adds one command,
/analyze-codebase, that generates analysis and documentation across the whole project - Covers the full codebase rather than individual files, producing a comprehensive overview of its structure
- Designed for developers who need to understand or document an unfamiliar or large repository
Generate comprehensive analysis and documentation of entire codebase
Add marketplace
/plugin marketplace add ananddtyagi/cc-marketplaceRun it inside Claude Code once, then install the plugin below.
Install
/plugin install analyze-codebase@cc-marketplaceRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceComprehensive Codebase Analysis
Project Discovery Phase
Directory Structure
!find . -type d -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./dist/*" -not -path "./build/*" -not -path "./.next/*" -not -path "./coverage/*"
Complete File Tree
!find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./dist/*" -not -path "./build/*" -not -path "./.next/*" -not -path "./coverage/*" -not -path "./*.log"
File Count and Size Analysis
- Total files: !
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" - Code files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.py" -o -name "*.java" -o -name "*.php" -o -name "*.rb" -o -name "*.go" -o -name "*.rs" -o -name "*.cpp" -o -name "*.c" \) - Project size: !
du -sh .
Configuration Files Analysis
Package Management
- Package.json: @package.json
- Package-lock.json exists: !
find . -maxdepth 1 -name "package-lock.json" - Yarn.lock exists: !
find . -maxdepth 1 -name "yarn.lock" - Requirements.txt: @requirements.txt
- Gemfile: @Gemfile
- Cargo.toml: @Cargo.toml
- Go.mod: @go.mod
- Composer.json: @composer.json
Build & Dev Tools
- Webpack config: @webpack.config.js
- Vite config: @vite.config.js
- Rollup config: @rollup.config.js
- Babel config: @.babelrc
- ESLint config: @.eslintrc.js
- Prettier config: @.prettierrc
- TypeScript config: @tsconfig.json
- Tailwind config: @tailwind.config.js
- Next.js config: @next.config.js
Environment & Docker
- .env files: !
find . -name ".env*" -type f - Docker files: !
find . -name "Dockerfile*" -o -name "docker-compose*" - Kubernetes files: !
find . -type f \( -name "*k8s*.yaml" -o -name "*k8s*.yml" -o -name "*kubernetes*.yaml" -o -name "*kubernetes*.yml" -o -name "*deployment*.yaml" -o -name "*deployment*.yml" \)
CI/CD Configuration
- GitHub Actions: !
find .github -type f \( -name "*.yml" -o -name "*.yaml" \) - GitLab CI: @.gitlab-ci.yml
- Travis CI: @.travis.yml
- Circle CI: @.circleci/config.yml
Source Code Analysis
Main Application Files
- Main entry points: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "main.*" -o -name "index.*" -o -name "app.*" -o -name "server.*" \) - Routes/Controllers: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/routes/*" -o -path "*/controllers/*" -o -path "*/api/*" \) - Models/Schemas: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/models/*" -o -path "*/schemas/*" -o -path "*/entities/*" \) - Components: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/components/*" -o -path "*/views/*" -o -path "*/pages/*" \)
Database & Storage
- Database configs: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*database*" -o -name "*db*" -o -name "*connection*" \) - Migration files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/migrations/*" -o -path "*/migrate/*" \) - Seed files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -path "*/seeds/*" -o -path "*/seeders/*" \)
Testing Files
- Test files: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*test*" -o -name "*spec*" \) - Test config: @jest.config.js
API Documentation
- API docs: !
find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "*api*.md" -o -name "swagger*" -o -name "openapi*" \)
Key Files Content Analysis
Root Configuration Files
@README.md @LICENSE @.gitignore
Main Application Entry Points
!find . -not -path "./node_modules/*" -not -path "./.git/*" \( -name "index.js" -o -name "index.ts" -o -name "main.js" -o -name "main.ts" -o -name "app.js" -o -name "app.ts" -o -name "server.js" -o -name "server.ts" \)
Your Task
Based on all the discovered information above, create a comprehensive analysis that includes:
1. Project Overview
- Project type (web app, API, library, etc.)
- Tech stack and frameworks
- Architecture pattern (MVC, microservices, etc.)
- Language(s) and versions
2. Detailed Directory Structure Analysis
For each major directory, explain:
- Purpose and role in the application
- Key files and their functions
- How it connects to other parts
3. File-by-File Breakdown
Organize by category:
- Core Application Files: Main entry points, routing, business logic
- Configuration Files: Build tools, environment, deployment
- Data Layer: Models, database connections, migrations
- Frontend/UI: Components, pages, styles, assets
- Testing: Test files, mocks, fixtures
- Documentation: README, API docs, guides
- DevOps: CI/CD, Docker, deployment scripts
4. API Endpoints Analysis
If applicable, document:
- All discovered endpoints and their methods
- Authentication/authorization patterns
- Request/response formats
- API versioning strategy
5. Architecture Deep Dive
Explain:
- Overall application architecture
- Data flow and request lifecycle
- Key design patterns used
- Dependencies between modules
6. Environment & Setup Analysis
Document:
- Required environment variables
- Installation and setup process
- Development workflow
- Production deployment strategy
7. Technology Stack Breakdown
List and explain:
- Runtime environment
- Frameworks and libraries
- Database technologies
- Build tools and bundlers
- Testing frameworks
- Deployment technologies
8. Visual Architecture Diagram
Create a comprehensive diagram showing:
- High-level system architecture
- Component relationships
- Data flow
- External integrations
- File structure hierarchy Use ASCII art, mermaid syntax, or detailed text representation to show: ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Frontend │────>│ API │────>│ Database │ │ (React/Vue) │ │ (Node/Flask) │ │ (Postgres/Mongo)│ └─────────────────┘ └─────────────────┘ └─────────────────┘
9. Key Insights & Recommendations
Provide:
- Code quality assessment
- Potential improvements
- Security considerations
- Performance optimization opportunities
- Maintainability suggestions Think deeply about the codebase structure and provide comprehensive insights that would be valuable for new developers joining the project or for architectural decision-making. At the end, write all of the output into a file called "codebase_analysis.md"
From the ananddtyagi/cc-marketplace README
Claude Code Marketplace
Community-driven marketplace for Claude Code commands and plugins.
🚀 Quick Start
Add this marketplace to Claude Code:
/plugin marketplace add ananddtyagi/cc-marketplace
Then browse and install individual plugins (commands or agents):
/plugin
Install a specific command:
/plugin install lyra@cc-marketplace
Install a specific agent:
/plugin install accessibility-expert@cc-marketplace
🌟 Featured Commands
- Documentation Generator - Create comprehensive documentation for code, APIs, and projects. (by Anonymous)
- Lyra - Lyra - a master-level AI prompt optimization specialist. (by @ananddtyagi)
- Analyze Codebase - Generate comprehensive analysis and documentation of entire codebase (by @ananddtyagi)
- Update Claude.md - Automatically update CLAUDE.md file based on recent code changes (by @ananddtyagi)
- Ultrathink - Use /ultrathink <TASK_DESCRIPTION> to launch a Coordinator Agent that directs four specialist sub-agents—Architect, Research, Coder, and Tester—to analyze, design, implement, and validate your coding task. The process breaks the task into clear steps, gathers insights, and synthesizes a cohesive solution with actionable outputs. Relevant files can be referenced ad-hoc using @ filename syntax. (by Jeronim Morina)
- Code Review - Perform a comprehensive code review of recent changes (by @ananddtyagi)
- Refractor - Refactor code following best practices and design patterns (by @ananddtyagi)
- Code Review Assistant - Get comprehensive code reviews with suggestions for improvements, best practices, and potential issues. (by Anonymous)
- Bug Detective - Systematically debug issues with step-by-step troubleshooting approaches. (by Anonymous)
- Audit - Perform security audit on codebase (by @ananddtyagi)
🤖 Featured Agents
- Accessibility Expert - Specialized agent for accessibility reviews and improvements
- AI Engineer - Expert in AI/ML implementation and optimization
- Frontend Developer - React, Vue, Angular expert for UI development
- DevOps Automator - CI/CD and infrastructure automation specialist
- Code Reviewer - Thorough code review and best practices enforcement
💡 Browse & Submit
Visit claudecodecommands.directory to:
- 🔍 Browse all commands and agents with descriptions and examples
- 📤 Submit your own commands and agents
- ⭐ Favorite plugins
- 🏷️ Filter by category and tags
🎯 How It Works
Each plugin in this marketplace is independently installable:
- Commands: Add custom slash commands to your Claude Code workflow (e.g.,
/lyra,/audit,/ultrathink) - Agents: Add specialized AI agents with specific expertise (e.g., accessibility-expert, frontend-developer, devops-automator)
Install only what you need - no bloat, full granular control!
🔄 Auto-Sync
This marketplace is automatically synced from the live database whenever commands are published or updated.
📝 License
Individual commands may have their own licenses. See each command file for details.
🤝 Contributing
Submit commands at claudecodecommands.directory/submit Submit agents at claudecodecommands.directory/submit-agent
Built with ❤️ by the Claude Code community
Details
- Marketplace
- ananddtyagi/cc-marketplace
- Source
- plugins/analyze-codebase
- Author
- Anand Tyagi
- Category
- Explore
- Keywords
- explore, plan
- Listed since
- Apr 7, 2026
More from ananddtyagi/cc-marketplace
All 119- analyze-issuev1.0.0
- angelos-symbov1.0.0
- api-contract-sync-managerv1.0.0
- api-integration-specialistv1.0.0
- api-testerv1.0.0
- app-store-optimizerv1.0.0
- auditv1.0.0
- b2b-project-shipperv1.0.0
- backend-architectv1.0.0
- brand-guardianv1.0.0
- bug-detectivev1.0.0
- bug-fixv1.0.0
- ceo-quality-controller-agentv1.0.0
- changelog-generatorv1.0.0
- claude-desktop-extensionv1.0.0
- claude-dev-infrastructurev1.0.0
- code-architectv1.0.0
- code-reviewv1.0.0
- code-review-assistantv1.0.0
- code-reviewerv1.0.0
- codebase-documenterv1.0.0
- commitv1.0.0
- compliance-automation-specialistv1.0.0
- content-creatorv1.0.0
Similar to analyze-codebase
More Technical Documentation
codebase-analyzerdevsforge/marketplace79 starsGenerate comprehensive analysis and documentation of entire codebase
documentation-generatorananddtyagi/cc-marketplace689 starsCreate comprehensive documentation for code, APIs, and projects.
explorerohitg00/awesome-claude-code-toolkit2.8K starsSmart codebase exploration with dependency mapping and structure analysis
code-documentationwshobson/agents42.8K starsDocumentation generation, code explanation, and technical writing with automated doc generation and tutorial creation
analyze-issueananddtyagi/cc-marketplace689 starsFetches GitHub issue details to create comprehensive implementation specifications, analyzing requirements and planning structured approach with clear implement
code-explainerrohitg00/awesome-claude-code-toolkit2.8K starsExplain complex code and annotate files with inline documentation