Agent skill · Security

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.

Alibaba76,861★ · +800/wk · 4 repos on radarProfile →
claude-codeships scriptsApache-2.0
Install
npx skills add alibaba/skill-up --skill code-stats --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 11
SKILL.md size: 2 KB
Bundled scripts: yes
Version: 1.0.0
Path: examples/code-stats/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 374
Language: Go

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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) 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 all code files 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 director

What's inside
Steps it walks through
  1. Usage
  2. Output Format
  3. Process
  4. Examples
Ships with 10 files
  • README.md
  • evals/cases/analyze-directory.yaml
  • evals/cases/current-directory-format.yaml
  • evals/cases/top-extensions.yaml
  • evals/eval.yaml
  • evals/evals.json
  • evals/fixtures/repos/sample-project/README.md
  • evals/fixtures/repos/sample-project/main.go
  • evals/fixtures/repos/sample-project/util.go
  • evals/fixtures/scripts/check-stats.sh
More from skill-up
All skills →
About this skill
What does the code-stats skill do?

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 do I install it?

Run `npx skills add alibaba/skill-up --skill code-stats --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From alibaba/skill-up, a repository with 374 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going