codebase-stats

v1.0.0

Analyze project metrics: lines of code, language distribution, function complexity, code-to-comment ratio, test coverage indicators, dependency counts, large...

0· 94·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for charlie-morrison/codebase-stats.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "codebase-stats" (charlie-morrison/codebase-stats) from ClawHub.
Skill page: https://clawhub.ai/charlie-morrison/codebase-stats
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install codebase-stats

ClawHub CLI

Package manager switcher

npx clawhub@latest install codebase-stats
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description match the included Python scanner. The script implements LOC, language detection, simple complexity heuristics, dependency counts, and TODO/FIXME scanning — all expected for a 'codebase-stats' tool. No unrelated credentials, binaries, or cloud access are requested.
Instruction Scope
SKILL.md instructs running the included Python script on a target directory and offers output formats (markdown/json). The runtime instructions and the script operate on repository files and manifest files only; they do not instruct the agent to read unrelated system config or call external endpoints.
Install Mechanism
No install specification and the tool is pure Python with no external dependencies per SKILL.md and the script header. This reduces risk because nothing is downloaded or written to disk beyond running the provided script.
Credentials
The skill requires no environment variables, credentials, or special config paths. The script reads local project files (package.json, requirements.txt, go.mod, Cargo.toml, source files) which is appropriate for its purpose.
Persistence & Privilege
The skill is not always-on and uses normal model invocation. It does not appear to modify agent/system configuration or request persistent privileges.
Assessment
The tool appears coherent and limited to local repository analysis, but it reads many files in the target directory — do not run it directly on repositories containing secrets or private credentials. Because the provided source in the prompt was truncated, review the full script before use (search for any network/socket/file-write code or subprocess.exec calls). Run it in an isolated environment or on a copy of the repo first, and inspect reported outputs to ensure no sensitive content is included in generated reports.

Like a lobster shell, security has layers — review code before you run it.

latestvk973svqt046x7ews87kzhf28kd84n6ks
94downloads
0stars
1versions
Updated 2w ago
v1.0.0
MIT-0

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)

Comments

Loading comments...