Agent skill

Codebase Inspection

by HezaoHezao in HezaoHezao/poirot

Inspect codebases: LOC, languages, ratios via pygount. An agent skill from HezaoHezao/poirot.

MITAuto-check passed

Install Codebase Inspection

skills CLI
$ npx skills add HezaoHezao/poirot --skill codebase-inspection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HezaoHezao/poirot codebase-inspection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HezaoHezao/poirot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/poirot/backend/agents/skill/builtin_skills/software-development/codebase-inspection .claude/skills/codebase-inspection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codebase-inspection
GitHub stars
250
Token cost
~969 tokens
SKILL.md length
180 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Inspect codebases: LOC, languages, ratios via pygount. An agent skill from HezaoHezao/poirot.

  • Works in 7 steps: Basic Summary (Most Common) → Common Folder Exclusions → Detailed Per-File Output → …
  • SKILL.md covers When to Use, Prerequisites, 1. Basic Summary (Most Common) and 2. Common Folder Exclusions, plus 6 more sections
  • Calls pip and python3

What it does

Codebase Inspection is an agent skill from HezaoHezao/poirot. Inspect codebases: LOC, languages, ratios via pygount.

Its SKILL.md is about 970 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Poirot is a deep research agent kernel built for those who care about how agents are architected. The licence is MIT.

Example prompts

  • “/codebase-inspection”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): bash, read_file, list_dir

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Basic Summary (Most Common)
  2. Common Folder Exclusions
  3. Detailed Per-File Output
  4. Language Breakdown Only
  5. JSON Output (for further processing)
  6. Quick LOC Count (without pygount)
  7. File Count by Type

What it can do on your machine

Read from SKILL.md and the folder at commit 86bf279. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • bash
    • read_file
    • list_dir

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Inspection loads about 969 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 180 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~969

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HezaoHezao/poirot at commit 86bf279, republished under its MIT licence (© HezaoHezao). 180 words, ~969 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-inspection/SKILL.md (or your agent's skills folder).
name
codebase-inspection
description
Inspect codebases: LOC, languages, ratios via pygount.
allowed-tools
bash, read_file, list_dir
enabled
true
related-skills
github-repo-management
license
MIT
author
Adapted from hermes-agent (Nous Research, MIT)

Codebase Inspection

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 pygount

1. Basic Summary (Most Common)

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.

2. Common Folder Exclusions

bash
# Python project
--folders-to-skip=".git,__pycache__,venv,.venv,.tox,.eggs,*.egg-info,.pytest_cache,.mypy_cache,.ruff_cache"

# Node.js project
--folders-to-skip=".git,node_modules,dist,build,.next,.cache,coverage"

# General (safe default)
--folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,*.egg-info,.pytest_cache,.mypy_cache"

3. Detailed Per-File Output

bash
pygount --format=summary \
  --folders-to-skip=".git,node_modules,.venv,__pycache__" \
  --names-to-skip="*.pyc,*.pyo,*.so,*.dylib" \
  /path/to/repo

4. Language Breakdown Only

bash
pygount --format=summary /path/to/repo 2>/dev/null | grep -E "^\s+\w" | sort -t$'\t' -k2 -rn

5. JSON Output (for further processing)

bash
pygount --format=json \
  --folders-to-skip=".git,node_modules,.venv,__pycache__" \
  /path/to/repo > codebase_stats.json

python3 -c "
import json
with open('codebase_stats.json') as f:
    data = json.load(f)
# Aggregate by language
from collections import defaultdict
by_lang = defaultdict(lambda: {'code': 0, 'files': 0})
for entry in data:
    lang = entry.get('language', 'unknown')
    by_lang[lang]['code'] += entry.get('code', 0)
    by_lang[lang]['files'] += 1
for lang, stats in sorted(by_lang.items(), key=lambda x: -x[1]['code']):
    print(f'{lang:20s} {stats[\"code\"]:8d} lines  {stats[\"files\"]:4d} files')
"

6. Quick LOC Count (without pygount)

If pygount isn't available, use find + wc:

bash
# Count lines in all Python files (excluding venvs)
find . -name "*.py" -not -path "*/venv/*" -not -path "*/.venv/*" -not -path "*/__pycache__/*" | xargs wc -l | tail -1

# Count by language
echo "Python: $(find . -name '*.py' -not -path '*/.venv/*' | xargs wc -l 2>/dev/null | tail -1)"
echo "JavaScript: $(find . -name '*.js' -not -path '*/node_modules/*' | xargs wc -l 2>/dev/null | tail -1)"
echo "TypeScript: $(find . -name '*.ts' -not -path '*/node_modules/*' | xargs wc -l 2>/dev/null | tail -1)"

7. File Count by Type

bash
# Count files by extension
find . -type f -not -path "*/.git/*" -not -path "*/node_modules/*" -not -path "*/.venv/*" | \
  sed 's/.*\.//' | sort | uniq -c | sort -rn | head -20

Pitfalls

  • Always exclude dependency dirs: node_modules, venv, .venv, __pycache__, dist, build — otherwise pygount hangs or counts millions of irrelevant lines.
  • Binary files: pygount skips them, but find + wc doesn't. Use --names-to-skip for pygount, or filter with grep -I for find.
  • Generated files: *.min.js, *_pb2.py, auto-generated code inflates counts. Exclude with --names-to-skip.
  • Encoding: pygount may fail on non-UTF-8 files. Use --encoding=utf-8 or --encoding=chardet for mixed-encoding repos.

© HezaoHezao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in poirot/backend/agents/skill/builtin_skills/software-development/codebase-inspection of HezaoHezao/poirot.

Open the folder on GitHubat commit 86bf279

Compare with similar skills

Codebase Inspection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Inspection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Inspection this skillHezaoHezao/poirot250—~969Automated safety check: PassMIT
Prismer Codebase InspectionPrismer-AI/PrismerCloud1.6k6 repos~1.2kAutomated safety check: PassMIT
Codebase Onboardingaffaan-m/ECC275k3 repos~2kAutomated safety check: PassMIT
Plain Languagethedaviddias/Front-End-Checklist74k—~493Automated safety check: PassMIT
Codebase Onboardingaffaan-m/ECC275k1 repos~1.1kAutomated safety check: PassMIT
Codebase Onboardingaffaan-m/ECC275k—~270Automated safety check: PassMIT

Similar skills

  • Prismer Codebase Inspection

    Prismer-AI/PrismerCloud

    Inspect codebases w/ pygount: LOC, languages, ratios. An agent skill from Prismer-AI/PrismerCloud.

    1.6k GitHub starsUsed in 6 repos~1.2k tokens
    Auto-check passed
  • Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md.

    275k GitHub starsUsed in 3 repos~2k tokens
    DevelopmentAuto-check passed
  • Plain Language

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Write in plain language.

    74k GitHub stars~493 tokensUpdated 2 days ago
    Writing & ContentAuto-check passed
  • 分析一个陌生的代码库,并生成一个结构化的入门指南,包括架构图、关键入口点、规范和一个起始的CLAUDE.md文件。适用于加入新项目或首次在代码仓库中设置Claude Code时。

    275k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • 不慣れなコードベースを分析し、アーキテクチャマップ、主要なエントリポイント、規約、スターターCLAUDE.mdを含む構造化オンボーディングガイドを生成します。新しいプロジェクトに参加するか、リポでClaude Codeを初めてセットアップする場合に使用します。

    275k GitHub stars~270 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Node Inspect Debugger

    openclaw/openclaw

    Debug Node.js with node inspect, --inspect, breakpoints, CDP, heap, and CPU profiles.

    392k GitHub starsUsed in 1 repo~894 tokens
    Frontend & DesignAuto-check passed

More from HezaoHezao/poirot

All 23 skills in this repo
  • Requesting Code Review

    HezaoHezao/poirot

    Pre-commit review: security scan, quality gates, auto-fix. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 5 repos~1.6k tokens
    Auto-check passed
  • Research Paper Writing

    HezaoHezao/poirot

    ML paper pipeline: experiment design to submission. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Skill Creator

    HezaoHezao/poirot

    Create, edit, and evaluate agent skills iteratively. An agent skill from HezaoHezao/poirot.

    250 GitHub starsUsed in 1 repo~838 tokens
    Auto-check passed
  • Academic Paper Review

    HezaoHezao/poirot

    Structured peer-review of academic papers. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Blogwatcher

    HezaoHezao/poirot

    Monitor blogs and RSS/Atom feeds via blogwatcher-cli. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~854 tokensUpdated 2 mo ago
    Auto-check passed
  • Bootstrap

    HezaoHezao/poirot

    Onboarding conversation to generate a user profile. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Codebase Inspection

What does Codebase Inspection do?

Inspect codebases: LOC, languages, ratios via pygount. An agent skill from HezaoHezao/poirot. Codebase Inspection is an agent skill from HezaoHezao/poirot. Inspect codebases: LOC, languages, ratios via pygount.

How do I install Codebase Inspection in Claude Code?

Run `npx skills add HezaoHezao/poirot --skill codebase-inspection -a claude-code`. Or copy the skill folder (poirot/backend/agents/skill/builtin_skills/software-development/codebase-inspection in HezaoHezao/poirot) into .claude/skills/codebase-inspection in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Inspection in Codex?

Run `npx skills add HezaoHezao/poirot --skill codebase-inspection -a codex`. Or copy the skill folder (poirot/backend/agents/skill/builtin_skills/software-development/codebase-inspection in HezaoHezao/poirot) into .agents/skills/codebase-inspection in your project. Codex loads it when a task matches its description.

Can I use Codebase Inspection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HezaoHezao/poirot --skill codebase-inspection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-inspection, .gemini/skills/codebase-inspection, .github/skills/codebase-inspection and .opencode/skills/codebase-inspection in your project.

What does Codebase Inspection need to run?

Going by SKILL.md and its folder, Codebase Inspection needs the command-line tools its instructions call (pip and python3). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: bash, read_file, list_dir.

Does Codebase Inspection access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codebase Inspection safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Inspection use?

Codebase Inspection is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Inspection use?

About 969 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Inspection?

Skills that share tags, products or a category with Codebase Inspection: Prismer Codebase Inspection (Prismer-AI/PrismerCloud, 1.6k stars), Codebase Onboarding (affaan-m/ECC, 275k stars), Plain Language (thedaviddias/Front-End-Checklist, 74k stars) and Codebase Onboarding (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Inspection?

HezaoHezao (a GitHub user) maintains it in HezaoHezao/poirot, which has 250 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on July 28, 2026.

Source: HezaoHezao/poirot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.