Documents

Codebase Inspection

Try it

Advanced codebase analysis with HTML reports, git-aware diffs, trend tracking, SVG badges, CSV export, and CI/CD integration

What it does

Advanced codebase analysis with HTML reports, git-aware diffs, trend tracking, SVG badges, CSV export, and CI/CD integration

The skill document

Codebase Inspector

Walk any directory and report language breakdowns, line counts, blank/comment lines, with HTML reports, git-aware diffs, trend tracking, SVG badges, CSV export, and CI integration.

Keywords: codebase, analysis, metrics, devtools, python, cli, ci, reports, open-source, agent, automation, MIT

Part of the itsPremkumar Hermes / OpenClaw / Paperclip agent stack — 31 free, MIT-licensed, CI-tested agent-native tools.

What it does

You can't manage codebase metrics you can't measure — and you can't see trends over time. Codebase Inspector solves this: Walk any directory and report language breakdowns, line counts, blank/comment lines, with HTML reports, git-aware diffs, trend tracking, SVG badges, CSV export, and CI integration.

Best for: Engineering leads, open-source maintainers, and CI pipelines.

Features

  • Print a per-language LOC report
  • Export CSV for dashboards
  • Generate an HTML report
  • Git-aware diff between snapshots
  • Track trends and emit an SVG badge

Install

# Requires Python 3.8+. No pip install needed.
curl -O https://raw.githubusercontent.com/itsPremkumar/codebase-inspection/main/codebase_inspector.py
# Or copy the file anywhere — it's self-contained.

Quick start

python codebase_inspector.py --help        # list options

Use cases

  1. Print a per-language LOC report
  2. Export CSV for dashboards
  3. Generate an HTML report
  4. Git-aware diff between snapshots
  5. Track trends and emit an SVG badge

Why choose this over alternatives

AlternativeWhy this skill is better
tokei/sccAdds git-aware diffs, trend tracking, HTML reports, and badges in one CLI.
Manual wc -lPer-language breakdown with comment/blank counts.
Spreadsheet metricsCSV + HTML + badge, CI-ready.

FAQ (SEO / AEO)

Q: How many languages?
A: 25+ extensions recognized out of the box.

Q: CI integration?
A: Yes — example GitHub Actions workflow asserts a language ratio.

Q: Badges?
A: --badge emits an SVG you can drop in a README.

Q: Offline?
A: Yes — no network, no telemetry.

Geo / local reach

Built and maintained by @itsPremkumar (Chennai, India · serving developers worldwide). Free for individuals and teams everywhere. Documentation in English; tool output is locale-neutral.

CI integration

# .github/workflows/verify.yml
name: Verify
on: [push]
jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Self-test codebase-inspection
        run: python codebase_inspector.py --help

Support

Free + MIT-0 (free, modifiable, no attribution required). Sponsor if useful:

⭐ Star on GitHub

Related skills

Scan codebase for dependency graph, tech debt hotspots, and module health scores

4 installs

Generate visual HTML pages for code review (diff + risk tags), code walkthrough (call chains + trust boundaries), and architecture analysis (module dependencies + tech debt). Three modes with shared dark-theme template.

1 installs

代码库索引与理解系统。扫描项目目录,提取所有符号定义(类、函数、变量、导入),构建可搜索的 JSON 索引,支持按名称/类型/文件查询。受 Claude Code 的 codebase indexing 启发,100% 原创实现,使用 Python ast + ripgrep。

6 installs

Study unfamiliar codebases and produce evidence-backed knowledge artifacts. Use for repository orientation, architecture mapping, subsystem tracing, onboarding, or codebase documentation.

Build a compact local SQLite index of every function, class, method, interface and type across your repos, so an agent finds a symbol's file:line and signatu...

Use when analyzing, debugging, modifying, reviewing, testing, or designing code. Verify important assumptions, distinguish facts from inference and hypotheses, make the smallest safe change, and verify results whenever practical.