Works with the AI Agents you already use
Codebase Metrics Report
Inspect a codebase with pygount: count lines of code by language, produce summary and XML/CSV reports, rank the largest files, compute language ratios, spot com
Free
Codebase Metrics Report
Example session with this skill installed
Run a full metrics report on the current directory. Skip node_modules and dist. Give me the top 5 largest files and a language breakdown.
- Read your context and instructions
- Compiled the codebase metrics report
- Generated the data export
Analysis complete.
Total LOC: 12,450 (TS: 65%, CSS: 20%, HTML: 15%).
Top 5 Largest Files:
- src/legacy/api.ts (1,240 lines)
- src/store/main.ts (890 lines)
...
Summary saved to summary.txt, full data in report.csv.
report.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Engineering leads and developers often lack objective data on codebase composition. Manual line counting is inaccurate because it fails to distinguish between functional code, comments, and boilerplate.
What it does
- Generates deterministic reports on lines of code (LOC) categorized by language.
- Produces machine-readable XML and CSV files for automated metric tracking.
- Identifies maintenance hotspots by ranking files by size and cyclomatic complexity.
- Calculates language distribution ratios to inform migration or hiring decisions.
- Performs directory comparisons to quantify the impact of refactors or branch merges.
Frameworks & tools
Python, pygount, radon, and standard Unix utilities like csvcut and sort.
Why this beats prompting it yourself
Standard LLM prompts often hallucinate counts or fail to handle large directory structures. This skill provides a specific, reproducible pipeline using offline tools that correctly ignore comments and blank lines, ensuring audit-grade accuracy.
Use cases
- Quantifying technical debt by identifying oversized or overly complex modules.
- Performing due diligence on a new codebase to understand language distribution.
- Measuring the net code reduction after a major refactoring sprint.
- Generating automated reports for stakeholders during a migration project.
Known limitations
Requires Python and pygount installed on the local system. Performance may lag on massive repositories if excluding generated or vendored folders is skipped.
Requires pygount and radon to be installed via pip. Does not support proprietary languages that pygount cannot parse. Accuracy depends on correctly excluding vendored/generated folders.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
4 uses
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 3 months ago
- Free with an Agensi account