analyze-size
Analyze codebase size and language distribution using cloc. Use when user wants to understand codebase scale, primary languages, code composition, or assess project complexity. Provides total LOC, size category, language breakdown percentages, and key insights.
Best use case
analyze-size is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analyze codebase size and language distribution using cloc. Use when user wants to understand codebase scale, primary languages, code composition, or assess project complexity. Provides total LOC, size category, language breakdown percentages, and key insights.
Teams using analyze-size should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyze-size/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyze-size Compares
| Feature / Agent | analyze-size | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analyze codebase size and language distribution using cloc. Use when user wants to understand codebase scale, primary languages, code composition, or assess project complexity. Provides total LOC, size category, language breakdown percentages, and key insights.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Analyze Size **Role:** Analyze codebase size, language distribution, and code metrics using `cloc` (Count Lines of Code). **Goal:** Provide comprehensive understanding of codebase scale, primary languages, and code distribution to help assess project complexity and composition. ## Workflow 1. **Run cloc** with these flags: ```bash cloc . --exclude-dir=node_modules,.git,dist,build,coverage,out,.next,.turbo --quiet 2>/dev/null || echo "cloc not found. Please install: brew install cloc (macOS) or apt-get install cloc (Linux)" ``` 2. **Interpret results** - Identify total lines of code (excluding blank lines and comments) - Determine language distribution (files, code lines per language) - Calculate percentage breakdown of languages - Assess codebase size category 3. **Provide analysis** using this format: ``` ## Codebase Size Analysis **Total Lines of Code:** X,XXX lines **Size Category:** [tiny (<1K) / small (1-10K) / medium (10-50K) / large (50-100K) / very large (>100K)] **Language Distribution:** - Language1: XX.X% (X,XXX lines) - Language2: XX.X% (X,XXX lines) - ... **Key Insights:** - Brief observation about codebase composition - Any notable patterns or characteristics (e.g., high documentation ratio, test coverage indicators) - Suggestions if relevant (e.g., "Primarily a TypeScript/React project") [Include the raw cloc output table for reference] ``` ## Constraints - Focus on source code and meaningful configuration files - Distinguish between source code, configuration, and documentation - Provide context-appropriate insights based on language mix - If cloc not installed, inform user with installation instructions
Related Skills
awareness-analyzer
Diagnose audience awareness level and market sophistication using Eugene Schwartz's Breakthrough Advertising framework
ast-analyzer
Deep Abstract Syntax Tree analysis for understanding code structure, dependencies, impact analysis, and pattern detection at the structural level across multiple programming languages
analyzer-architecture-review
analyzerアプリケーションのアーキテクチャレビュー。Port&Adapterアーキテクチャ(ヘキサゴナルアーキテクチャ)のルールに従っているかをチェックします。新しいPort/Adapter/Usecase/Model追加時、PRレビュー時、またはアーキテクチャ違反の検出が必要な時に使用します。Port層の関数型定義、依存関係の方向、New*関数パターン、レイヤー分離などを検証します。
analyze-code
外部ライブラリや他言語で書かれたコードの実装を分析して知見を得る
analyze-yii2-project
Use this when user provides a Yii2 codebase for analysis or migration planning. Provides 6-phase workflow: scan, capability extraction, dependency analysis, requirements extraction, semantic indexing, and migration roadmap. Apply when user mentions Yii2, PHP legacy modernization, or framework migration to NestJS
analyze-wast
Analyze WebAssembly test (WAST) files to debug compilation issues and create regression tests. Use when the user asks to debug or analyze WAST test failures, investigate compilation bugs in wasmoon, or when encountering test failures in spec/*.wast files. Triggers include "analyze wast", "debug wast", "wast bug", or references to specific .wast test files.
analyze
Deep analysis mode - thorough multi-phase investigation with expert consultation for complex problems requiring careful examination
analyze-system
システム分析エージェント - ユビキタス言語、アクター、ロール、権限、ドメイン-コード対応表を抽出。/analyze-system [対象パス] で呼び出し。
analyze-rust-optimizations
This skill performs thorough analysis of Rust libraries to find optimization opportunities. It should be used when reviewing Rust code for performance improvements, memory efficiency, or when profiling indicates bottlenecks. Focuses on runtime performance and memory usage through dynamic profiling tools and static code analysis.
analyze-project-architecture
LLM-based architectural analysis that transforms raw project data into meaningful structure
analyze-pr-performance
Analyze code review pipeline performance for a specific PR. Use when investigating slow PRs, identifying bottlenecks, or debugging performance issues in code reviews.
analyze-m1-module-for-migration
Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2. Use when you need to decide whether to migrate a M1 module, find alternatives, or skip it.