본문으로 건너뛰기
cccskills
무료GitHub에 공개

codebase-inspection

Measure a codebase: lines of code, language mix, and symbol lookups.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Codebase inspection

Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using pygount. Run all commands via shell_exec.

Reading code, not just counting it

Counting tells you the shape of a repository. To understand a specific symbol, use lsp, which asks the real language server instead of guessing from text.

lsp requires all four arguments: operation, file, line and character. There is no default position, and an approximate one returns an answer about the wrong symbol.

  • goToDefinition: where this symbol is actually defined.
  • findReferences: every call site, which is what you need before changing a signature.
  • hover: the resolved type and documentation.

Locate the symbol first with file_search or grep, take the exact line and column from that result, then call lsp. Supported servers are rust-analyzer and typescript-language-server; on a project in another language, fall back to text search.

Install

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

1. Basic Summary (Start Here)

cd /path/to/repo && pygount --format=summary \
  --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,vendor,third_party" \
  .

CRITICAL: Always pass --folders-to-skip. Without it, pygount crawls dependency/build directories and can hang for minutes on large repos.

Project-type additions to --folders-to-skip:

  • Python: .mypy_cache,.tox,.eggs
  • JS/TS: .turbo,coverage

2. Filter by Language

# Python only
pygount --suffix=py --format=summary .

# Python + YAML
pygount --suffix=py,yaml,yml --format=summary .

Use --suffix on large monorepos to avoid scanning irrelevant file types.

3. File-by-File Output

# Per-file breakdown (default format, no --format flag)
pygount --folders-to-skip=".git,node_modules,venv" .

# Top 20 files by code lines (Linux/macOS)
pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20

On Windows, skip the sort pipe - use JSON output and post-process instead (see §4).

4. JSON Output (Programmatic / Windows-safe)

pygount --format=json --folders-to-skip=".git,node_modules,venv" . > loc_report.json

Then use execute_code (Python) to parse and aggregate, or file_write to save and pass downstream. Example aggregation:

import json, collections
data = json.load(open("loc_report.json"))
by_lang = collections.defaultdict(lambda: {"files": 0, "code": 0, "comment": 0})
for entry in data:
    lang = entry.get("language", "__unknown__")
    by_lang[lang]["files"] += 1
    by_lang[lang]["code"] += entry.get("code", 0)
    by_lang[lang]["comment"] += entry.get("documentation", 0)
for lang, stats in sorted(by_lang.items(), key=lambda x: -x[1]["code"])[:10]:
    print(f"{lang}: {stats['code']} code, {stats['comment']} comment ({stats['files']} files)")

5. Interpreting the Summary Table

ColumnMeaning
LanguageDetected language
FilesFile count
CodeExecutable/declarative lines
CommentComment/doc lines
%Share of total

Special pseudo-languages: __empty__, __binary__, __generated__, __duplicate__, __unknown__.

Pitfalls

  1. Missing --folders-to-skip - crawls node_modules/venv and hangs. Always include it.
  2. Markdown = 0 code lines - pygount classifies all Markdown as comments. Expected behavior.
  3. JSON files show low counts - pygount is conservative; use wc -l for raw line counts.
  4. Large monorepos - target with --suffix to avoid scanning everything.
  5. pygount not found - run the install command above; confirm with pygount --version.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Drive an installed LaRuche App through its declared actions, never its files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

arxiv

무료

Find academic papers on arXiv, with citation counts and BibTeX.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

ascii-art

무료

Render text or an image as ASCII art for terminal-friendly output.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

Track RSS/Atom feeds and blogs via blogwatcher-cli.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

Drive a real web browser: navigate, read, find, click, fill, screenshot

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

Store, find and curate lasting facts in the cognitive memory map.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

infinition/LaRuche332026년 9월 22일 업데이트

infinition의 스킬 모두 보기

이 스킬의 문제 신고