codebase-stats

Analyze project metrics: lines of code, language distribution, function complexity, code-to-comment ratio, test coverage indicators, dependency counts, largest files, and tech debt signals (TODOs, FIXMEs, HACKs). Supports 40+ languages. Use when asked to analyze a codebase, count lines of code, check code complexity, get project statistics, audit code quality, measure tech debt, or understand language distribution in a project. Triggers on "codebase stats", "lines of code", "LOC", "code complexity", "project metrics", "code quality", "tech debt", "language distribution", "project size", "code analysis", "cyclomatic complexity".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "codebase-stats" with this command: npx skills add codebase-stats

Codebase Stats

Project metrics, complexity analysis, and health indicators. Pure Python, zero deps, 40+ languages.

Quick Start

# Analyze current directory
python3 scripts/codebase_stats.py

# Analyze specific project
python3 scripts/codebase_stats.py /path/to/project

# Markdown report
python3 scripts/codebase_stats.py /path/to/project --format markdown

# JSON (for CI/CD dashboards)
python3 scripts/codebase_stats.py /path/to/project --format json

# Filter by language
python3 scripts/codebase_stats.py --language Python

# Save report
python3 scripts/codebase_stats.py --format markdown --output stats.md

What It Measures

CategoryMetrics
SizeTotal files, code/comment/blank lines, lines per file
LanguagesDistribution by code lines and file count (40+ languages)
ComplexityPer-function cyclomatic complexity estimate, top complex functions
QualityCode-to-comment ratio, test file coverage indicator
Dependenciesnpm, pip, Go modules, Cargo crate counts
Tech DebtTODO/FIXME/HACK/XXX counts across codebase
FilesTop 10 largest files by line count

Supported Languages

Python, JavaScript, TypeScript, Java, Go, Rust, Ruby, PHP, C, C++, C#, Swift, Kotlin, Scala, R, Lua, Perl, Shell, SQL, HTML, CSS, SCSS, Vue, Svelte, Dart, Elixir, Erlang, Zig, Nim, V, Solidity, Terraform, Protobuf, and more.

Exit Codes

  • 0 — Success
  • 1 — Error (directory not found, language not found)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Cloudflare Manager

Manage Cloudflare DNS records, Tunnels (cloudflared), and Zero Trust policies. Use for pointing domains, exposing local services via tunnels, and updating in...

Registry SourceRecently Updated
Coding

Node Red Manager

Manage Node-RED instances via Admin API or CLI. Automate flow deployment, install nodes, and troubleshoot issues. Use when user wants to "build automation", "connect devices", or "fix node-red".

Registry SourceRecently Updated
Coding

Yt Dlp

A robust CLI wrapper for yt-dlp to download videos, playlists, and audio from YouTube and thousands of other sites. Supports format selection, quality control, metadata embedding, and cookie authentication.

Registry SourceRecently Updated
Coding

Daily Dev Agentic

daily.dev Agentic Learning - continuous self-improvement through daily.dev feeds. Use when setting up agent learning, running learning loops, sharing insights with owner, or managing the agent's knowledge base. Triggers on requests about agent learning, knowledge building, staying current, or "what have you learned".

Registry SourceRecently Updated