code-stats
/code-stats
Analyzes code files and reports statistics including line counts, file counts by extension, and total size. Use this skill whenever the user wants to understand the composition of a codebase - asking about "how many lines of code", "what file types exist", "code distribution", or needing a quick audit of project size and structure. Make sure to invoke this skill when users mention analyzing codebases, counting lines, checking file distributions, or auditing code.
- Author
- alibaba ↗
- Repository
- skill-up ↗
- Licence
- Apache-2.0
- Last repository change
- 23.10.2026
Assessment and security
- Files in this package
- 12
- Scripts
- 3
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 3 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: evals/fixtures/repos/sample-project/main.go, evals/fixtures/repos/sample-project/util.go, evals/fixtures/scripts/check-stats.sh
What it does and when to use it
Analyzes code files and reports statistics including line counts, file counts by extension, and total size. Use this skill whenever the user wants to understand the composition of a codebase - asking about "how many lines of code", "what file types exist", "code distribution", or needing a quick audit of project size and structure. Make sure to invoke this skill when users mention analyzing codebases, counting lines, checking file distributions, or auditing code.
Triggers from the description
Original author description
Analyzes code files and reports statistics including line counts, file counts by extension, and total size. Use this skill whenever the user wants to understand the composition of a codebase - asking about "how many lines of code", "what file types exist", "code distribution", or needing a quick audit of project size and structure. Make sure to invoke this skill when users mention analyzing codebases, counting lines, checking file distributions, or auditing code.
How it works
- Usage
- Output Format
- Process
- Examples
SKILL.md preview
--- name: code-stats description: Analyzes code files and reports statistics including line counts, file counts by extension, and total size. Use this skill whenever the user wants to understand the composition of a codebase - asking about "how many lines of code", "what file types exist", "code distribution", or needing a quick audit of project size and structure. Make sure to invoke this skill when users mention analyzing codebases, counting lines, checking file distributions, or auditing code. version: 1.0.0 --- # Code Stats Skill Analyzes code files and generates statistics about a codebase. ## Usage When invoked, this skill will: 1. Scan the specified directory (defaults to current directory) - Exclude `node_modules/`, `.git/`, `dist/`, and `build/` unless the user explicitly asks to count them. These are dependencies, repository metadata, or generated output rather than project source. 2. Count total lines, files by extension 3. Report the largest files 4. Output results in a structured format 5. Sort extension summaries by total line count in descending order ## Output Format Always use this exact format for the output: ``` # Code Statistics ## Summary - Total Files: <count> - Total Lines: <count> - Total Size: <size_bytes> bytes ## Files by Extension | Extension | Files | Lines | |-----------|-------|-------| | .go | 12 | 1500 | | .md | 5 | 200 | ## Top 5 File Extensions by Line Count 1. .go — 1500 lines 2. .md — 200 lines ## Largest Files (top 5) 1. main.go (500 lines) 2. util.go (300 lines) ``` If a file has no extension, group it under `(no ext)` in both extension sections. ## Process 1. Use `Bash` with `find` to locate project files, pruning the excluded directories 2. Use `Bash` with `wc -l` to count lines per file 3. Group files with no extension under `(no ext)` 4. Sort both extension summaries by total line count in descending order 5. Aggregate the results into the output format above 6. If no directory is specified, analyze the current working directory ## Examples - "Analyze the current directory" - "Run code-stats on ./src" - "Show me file type distribution" - "How many lines of Python do we have?"
Files in this package (12)
- README.md 5 KB
- SKILL.md 2 KB
- evals/eval.yaml 1 KB
- evals/evals.json 2 KB
- evals/cases/analyze-directory.yaml 1 KB
- evals/cases/current-directory-format.yaml 1 KB
- evals/cases/exclude-dependencies.yaml 1 KB
- evals/cases/top-extensions.yaml 1 KB
- evals/fixtures/repos/sample-project/README.md 1 KB
- evals/fixtures/repos/sample-project/main.go 1 KB
- evals/fixtures/repos/sample-project/util.go 1 KB
- evals/fixtures/scripts/check-stats.sh 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · alibaba/skill-up | 100 | Apache-2.0 |
| 0xDarkMatter/claude-mods | 100 | MIT |
Database snapshot: 13.11.2026 · package version 28c4d9eb0e26 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100file-operations
Analyze files and get detailed metadata including size, line counts, modification times, and content statistics. Use when users request file information, statistics, or analysis without modifying files. - 100codebase-inspection
Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats. - 84audit-size
Measure lines per file for the changed files (the default), explicit paths, or the whole tree (`--all`), every text file in every lane, each beside a configurable reference with its provenance, longest first. Reports, never gates. Use when: 'how long are these files', 'lines per… - 84codebase-inspection
Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats. - 100agilab-code-statistics
Generate fast, reproducible AGILAB code statistics. Use when the user asks for code stats, LOC, file counts, language breakdowns, test/docs/source ratios, churn summaries, or a concise repository size/code footprint report without running builds. - 95think-in-code
Use when analyzing multiple files, auditing a codebase, scanning dependencies, or counting lines -- one Bash pipeline beats N sequential Read calls.