본문으로 건너뛰기
Skillpedia
일반 코딩260k · #619

codebase-inspection

하는 일

이 스킬은 AI가 소프트웨어 프로젝트의 크기와 사용된 프로그래밍 언어 구성을 측정하도록 합니다. 코드베이스를 빠르게 파악하려는 개발자와 관리자를 위한 스킬입니다.

사용하는 경우

  • ✓프로젝트에 코드가 몇 줄인지 물을 때.
  • ✓저장소에서 사용된 언어별 비중을 알고 싶을 때.
  • ✓프로젝트의 코드와 주석 비율을 알고 싶을 때.

스킬 링크

https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/codebase-inspection/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/codebase-inspection/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 저장소에는 코드가 몇 줄 있고, 대부분을 차지하는 언어는 무엇인가요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 pygount 도구가 없으면 설치하고, 프로젝트 폴더에서 실행합니다. node_modules나 빌드 결과물 같은 폴더는 건너뛰므로 개수가 부풀려지지 않습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

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:

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:

# 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

# 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

# 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

# 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.
자주 묻는 질문

특별한 소프트웨어가 필요한가요?

pygount가 필요하며, 없으면 스킬이 pip로 설치합니다.

왜 일부 폴더는 건너뛰나요?

스킬에 따르면 의존성과 빌드 폴더를 검사하면 시간이 아주 오래 걸릴 수 있으므로 건너뜁니다.

한 가지 언어만 셀 수 있나요?

네. 스킬에는 결과를 특정 언어로 거르는 섹션이 있습니다.

상세 정보

작성자의 원본 설명

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

repo: NousResearch/hermes-agent

인기도

GitHub 스타
260k
순위
#619
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬