openclaw-skills/codebase-inspection/SKILL.md
Use when a user needs reproducible repository sizing, language composition, file counts, or code-versus-comment ratios with pygount; record exclusions and verify measurement scope before interpreting results.
npx skillsauth add seaworld008/commonly-used-high-value-skills codebase-inspectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
Security scan pending...
This skill is queued for security scanning. Results will appear when the scan completes.
Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using pygount.
python3 -m venv /path/to/approved-tools/pygount-venv
/path/to/approved-tools/pygount-venv/bin/python -m pip install pygount
/path/to/approved-tools/pygount-venv/bin/pygount --version
Choose a new, approved environment path; do not overwrite an existing environment
or bypass externally managed Python protections. Use its pygount executable
in the examples below, or activate that environment first.
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.
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"
# Only count Python files
pygount --suffix=py --format=summary .
# Only count Python and YAML
pygount --suffix=py,yaml,yml --format=summary .
# 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
# 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
The summary table columns:
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--folders-to-skip, pygount will crawl everything and may take minutes or hang on large dependency trees.wc -l measure different things. Label physical-line counts separately instead of treating them as a correction.--suffix to target specific languages rather than scanning everything.Before scanning, agree on the repository root and the population being measured.
A language summary over application code is not comparable to a summary that
also includes generated exports, vendored libraries, test fixtures, and caches.
Record whether tests and documentation belong in the requested population.
Explicit folder patterns replace pygount defaults; include [...] when you want
to extend its defaults, then add project-specific exclusions.
revision: full commit SHA, or explicitly identified dirty checkout
tool: pygount version
scope: absolute root and included subdirectories
exclusions: exact folder and filename patterns
duplicate policy: default deduplication or explicit --duplicates
outputs: summary plus JSON, stored outside the measured tree
errors: unknown, binary, generated, duplicate and error file counts
Compare snapshots only when these settings agree. If the tree is dirty, report that fact without stashing, discarding, or committing the user's changes. Use JSON for downstream parsing: human-readable summary column widths vary. Inspect a few representative files, including a generated file and a duplicate, before using totals to justify a migration or capacity decision.
Command semantics were checked against the primary pygount usage documentation. Recheck installed help before relying on new flags.
<!-- LOCAL-CURATION-SUPPLEMENT:END -->tools
飞书审批:查询和处理审批待办/已办/实例,搜索可发起审批定义、查看定义详情并发起原生审批实例。当用户要处理审批任务、查看审批实例、搜索或发起审批时使用。审批待办不是飞书任务;非审批类待办走 lark-task。不负责创建审批定义;三方审批定义不走原生提单。
development
Route a development task to the official Hermes Agent skill, Graphify Codex artifact set, Open GSD Core bundle, or optional GSD Pi bundle without duplicating their installers or state machines.
development
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
testing
Use when querying Lark attendance records, checking missing clock-ins, and preparing traceable explanations for attendance exceptions.