Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

codebase-inspection

/codebase-inspection

Liczy linie kodu, udział języków i stosunek komentarzy do kodu za pomocą pygount.

Repozytorium
kheish ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
25.06.2026

Ocena i bezpieczeństwo

84/ 100Klasa: dobry
Format9 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.06.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Liczy linie kodu, udział języków i stosunek komentarzy do kodu za pomocą pygount.

Oryginalny opis (EN)

Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats.

Jak działa

  1. Kheish Compatibility
  2. When to Use
  3. Prerequisites
  4. 1. Basic Summary (Most Common)
  5. 2. Common Folder Exclusions
  6. 3. Filter by Specific Language
  7. 4. Detailed File-by-File Output
  8. 5. Output Formats
  9. 6. Interpreting Results
  10. Pitfalls
Sekcje z nagłówków SKILL.md, w oryginale · 116 linii, 497 słów
Podgląd SKILL.md
---
description: Inspect and analyze codebases using pygount for LOC counting, language
  breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo
  size, language composition, or codebase stats.
version: 1.0.0
license: MIT
metadata:
  catalog:
    tags:
    - LOC
    - Code Analysis
    - pygount
    - Codebase
    - Metrics
    - Repository
    related_skills:
    - github-repo-management
prerequisites:
  commands:
  - pygount
---

## Kheish Compatibility

This skill is repo-local and stays inactive until explicitly activated.

When the original instructions refer to legacy tool names, use these Kheish mappings:

- `terminal` => `bash`
- `web_extract` => `web_fetch`, plus `web_search` when discovery is needed
- `search_files` => `grep_search` and `glob_search`
- `browser_*` tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly

When the instructions mention local helper files, resolve them from `${KHEISH_SKILL_DIR}`.

# 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

## Pitfalls

1. **Always exclude .git, node_modules, venv** — without `--folders-to-skip`, pygount will crawl everything and may take minutes or hang on large dependency trees.
2. **Markdown shows 0 code lines** — pygount classifies all Markdown content as comments, not code. This is expected behavior.
3. **JSON files show low code counts** — pygount may count JSON lines conservatively. For accurate JSON line counts, use `wc -l` directly.
4. **Large monorepos** — for very large repos, consider using `--suffix` to target specific languages rather than scanning everything.

Wersje

RepozytoriumWynikLicencja
Ta strona · graniet/kheish84Apache-2.0
seaworld008/commonly-used-high-value-skills100MIT
moltis-org/moltis100MIT

Migawka bazy z 13.11.2026 · wersja paczki de1fb14ab218 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100code-stats
    Liczy linie kodu według języka i pokazuje semantyczne różnice narzędziami tokei i difft, bez ręcznego liczenia.
  • 100cloc
    Liczy linie kodu, mieszankę języków i statystyki różnic w repozytoriach .NET za pomocą otwartego narzędzia cloc, do powtarzalnych raportów o rozmiarze bazy kodu.
  • 100code-stats
    Analizuje pliki kodu i podaje statystyki: liczbę linii, liczbę plików według rozszerzeń i łączny rozmiar, dla szybkiego audytu rozmiaru i struktury projektu.
  • 100scout-loc
    Liczy linie kodu w wielu językach narzędziem cloc, także w czasie z historii git, np. kod aplikacji względem testów.
  • 100agilab-code-statistics
    Generuje szybkie, powtarzalne statystyki kodu AGILAB: LOC, liczby plików, podział na języki, proporcje testów, dokumentacji i źródeł oraz podsumowania churnu, bez uruchamiania buildów.
  • 96hermes-plugin-inspection
    Liczy wtyczki Hermes i sprawdza ich kondycję.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.