- Home
- Skills
- 0xdarkmatter
- Claude Mods
- Code Stats
code-stats_skill
- Shell
8
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill 0xdarkmatter/claude-mods --skill code-stats- SKILL.md2.7 KB
Overview
This skill analyzes a codebase for size, language composition, and semantic changes using fast line counters and AST-aware diffs. It provides quick, scriptable summaries and human-readable reports to help you understand project scale and the nature of edits. Use it to get counts, filter languages or directories, and inspect semantic differences between file versions.
How this skill works
It runs a lightweight line-count tool to enumerate files, lines, code, comments, and blanks per language and directory. For change inspection it uses an AST-aware diff tool that recognizes moved code, ignores formatting-only changes, and presents semantic edits. Both tools produce machine-friendly output for CI or JSON pipelines and readable summaries for manual review.
When to use it
- Get a fast overview of project size and language breakdown.
- Count lines of code for specific languages or the whole repo.
- Exclude generated folders like node_modules or dist before counting.
- Inspect refactorings or moves without noisy line-level diffs.
- Integrate counts or semantic diffs in CI and reporting pipelines.
Best practices
- Exclude build and dependency directories to avoid inflated counts.
- Use JSON output for automated checks and dashboards.
- Combine language filters to focus on areas of interest.
- Set the semantic diff as GIT_EXTERNAL_DIFF for consistent reviews.
- Run counts periodically to track growth and detect anomalies.
Example use cases
- Run a compact tokei report to see top languages and total code lines before planning work.
- Generate JSON totals in CI and fail a job if code growth exceeds a threshold.
- Compare two TypeScript files with difft to see moved functions and renamed symbols.
- Use difft as the external git diff tool to get cleaner code review outputs.
- Exclude node_modules and dist when measuring codebase size for accurate metrics.
FAQ
Yes. You can pass exclude flags to the line-count tool and configure your diff tool or git settings to skip generated directories.
Is the diff output machine-readable?
The semantic diff is human-focused, but it can be integrated with git and scripts. For automation, use the line-count tool's JSON output and combine with difft options suited to your display mode.