Skip to content
Agentmart
Submit a tool

codebase-inspection

Inspect codebases w/ pygount: LOC, languages, ratios.

Skill by clowlove

IndexedMIT★ 14
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/clowlove-codebase-inspection

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Inspect codebases w/ pygount: LOC, languages, ratios. Also: remote GitHub repo analysis via gh CLI API.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/codebase-inspection

What's inside

Skill name
codebase-inspection
Description
Inspect codebases w/ pygount: LOC, languages, ratios. Also: remote GitHub repo analysis via gh CLI API.
License
MIT
Instructions
146 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • skill.json

SKILL.md (first lines)

# Codebase Inspection with pygount

Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using `pygount`.

## When to Use

- User asks for LOC (lines of code) count
- User wants a language breakdown of a repo
- User asks about codebase size or composition
- User wants code-vs-comment ratios
- General "how big is this repo" questions

## Prerequisites

```bash
pip install --break-system-packages pygount 2>/dev/null || pip install pygount
```

## 1. Basic Summary (Most Common)

Get a full language breakdown with file counts, code lines, and comment lines:

```bash
cd /path/to/repo
pygount --format=summary \
  --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,*.egg-info" \
  .
```

**IMPORTANT:** Always use `--folders-to-skip` to exclude dependency/build directories, otherwise pygount will crawl them and take a very long time or hang.

## 2. Common Folder Exclusions

Adjust based on the project type:

```bash
# Python projects
--folders-to-skip=".git,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,.mypy_cache"

# JavaScript/TypeScript projects
--folders-to-skip=".git,node_modules,dist,build,.next,.cache,.turbo,coverage"

# General catch-all
--folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,vendor,third_party"
```

## 3. Filter by Specific Language

```bash
# Only count Python files
pygount --suffix=py --format=summary .

# Only count Python and YAML
pygount --suffix=py,yaml,yml --format=summary .
```

## 4. Detailed File-by-File Output

```bash
# Default format shows per-file breakdown
pygount --folders-to-skip=".git,node_modules,venv" .

# Sort by code lines (pipe through sort)
pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20
```

## 5. Output Formats

```bash
# Summary table (default recommendation)
pygount --format=summary .

# JSON output for programmatic use
pygount --format=json .

# Pipe-friendly: Language, file count, code, docs, empty, string
pygount --format=summary . 2>/dev/null
```

## 6. Interpreting Results

The summary table columns:
- **Language** — detected programming language
- **Files** — number of files of that language
- **Code** — lines of actual code (executable/declarative)
- **Comment** — lines that are comments or documentation
- **%** — percentage of total

Special pseudo-languages:
- `__empty__` — empty files
- `__binary__` — binary files (images, compiled, etc.)
- `__generated__` — auto-generated files (detected heuristically)
- `__duplicate__` — files with identical content
- `__unknown__` — unrecognized file types

## 7. Remote GitHub Repo Analysis (no clone needed)

Use `gh api` to inspect a repo without cloning it — useful for quick assessment, comparison, or deciding whether to invest time in a deeper look.

```bash
# Repo overview (stars, forks, language, license, description)
gh repo view owner/repo --json name,description,stargazerCount,forkCount,primaryLanguage,createdAt,updatedAt,licenseInfo,homepageUrl

# List top-level files and directories
gh api repos/owner/repo/contents --jq '.[] | {name, type, size}'

# List files in a subdirectory
gh api repos/owner/repo/contents/path/to/dir --jq '.[] | {name, type, size}'

# Read a specific file (returns base64-encoded content)
gh api repos/owner/repo/contents/README.md --jq '.content' | base64 -d

# Read the first N lines of any file
gh api repos/owner/repo/contents/path/to/file.md --jq '.content' | base64 -d | head -100

# Count files by extension in a directory
gh api repos/owner/repo/contents/src --jq '[.[] | .name | split(".")[-1]] | group_by(.) | map({ext: .[0], count: length})'

# Check contributors

From clowlove/Hermes-House, MIT.

More from clowlove/Hermes-House

Signals

Stars
14
Forks
4
Open issues
403
Last commit (this folder)
May 29, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from clowlove

Cite this page

codebase-inspection skill. Agent Mart. https://agentmart.dev/skills/clowlove-codebase-inspection (last updated 2026-10-24)