CM

    Codebase Metrics Report

    by TopAgent

    1

    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

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLIVVS CodeWWindsurfMManus+14 more

    See it in action

    You say

    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.

    Your agent does

    Analysis complete. Total LOC: 12,450 (TS: 65%, CSS: 20%, HTML: 15%). Top 5 Largest Files:

    1. src/legacy/api.ts (1,240 lines)
    2. src/store/main.ts (890 lines) ... Summary saved to summary.txt, full data in report.csv.

    What you get

    Audit codebase size and language distribution for migration planning.Identify complex functions and maintenance hotspots for refactoring.Compare LOC changes between main and feature branches.Generate CSV/XML reports for automated CI/CD metric tracking.

    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.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Creator

    TopAgent
    TopAgent

    32 skills on Agensi

    Frequently Asked Questions

    Browse More Skills