استخدمه عندما يكون هدفك واضحًا في البرمجة والمستودعات وتستطيع تحديد البيانات والأفعال التي يحتاجها فقط.
Codebase Inspection
Codebase Inspection: مهارة ينشرها Hermes Agent. مجالها العمل مع الكود والمستودعات. الرخصة MIT. الإصدار الموثّق 1.0.0. مثبّتة افتراضيًا مع Hermes، فلا تحتاج خطوة تثبيت. تدعم: linux، macos، windows.
ماذا يضيف إلى Hermes؟
Codebase Inspection: مهارة ينشرها Hermes Agent. مجالها العمل مع الكود والمستودعات. الرخصة MIT. الإصدار الموثّق 1.0.0. مثبّتة افتراضيًا مع Hermes، فلا تحتاج خطوة تثبيت. تدعم: linux، macos، windows.
Codebase Inspection هي مهارة مرتبطة بمجال البرمجة والمستودعات. يساعد الوكيل على فهم الكود أو التعامل مع مشروع برمجي بدل الاكتفاء بإعطائك نصائح عامة.
هذا تفسير مبسّط مبني على وصف الناشر. أبقينا الوصف الإنجليزي بجانبه حتى تستطيع مقارنة المعنى بالمصدر.
لا تضفه لمجرد التجربة إذا كان لديك طريق أبسط داخل Hermes، أو إذا لم تستطع مراجعة المصدر والصلاحيات.
مناسب لمن يريد طريقة عمل قابلة للتكرار داخل Hermes.
جرّبه على مستودع تجريبي بصلاحية القراءة، واطلب تلخيص ملف واحد مع ذكر مساره.
Inspect codebases w/ pygount: LOC, languages, ratios
فُهرس هذا الإدخال من Hermes Bundled Skills. الشرح العربي يفسّر النوع والمجال ولا يضيف وظيفة غير مذكورة في المصدر.
المصدر رسمي أو خضع لمراجعة تحريرية، لكن ذلك لا يغني عن مراجعة الصلاحيات والإصدار.
افحص، ثبّت، ثم اختبر.
- 01افتح المصدر
طابق اسم الناشر والرخصة والوصف مع حاجتك، وراجع آخر تحديث فعلي.
- 02راجع الصلاحيات والأسرار
لا تلصق قيمة سر داخل الموقع. استخدم أسماء متغيرات البيئة وامنح أقل نطاق ممكن.
- 03انسخ الإعداد فقط بعد المراجعة
الأزرار أدناه تنسخ نصًا إلى الحافظة ولا تشغّل أمرًا على جهازك.
- 04اختبر بمهمة غير حساسة
تحقق من الأدوات الظاهرة، ثم استبعد أدوات الكتابة أو الحذف التي لا تحتاجها.
مثبّتة مسبقًا مع Hermes.
تأتي هذه المهارة مع Hermes وتُحمَّل عندما يرى الوكيل أنها مناسبة. لا شيء لتثبيته؛ اقرأ التعريف أدناه لتعرف ما ستفعله.
افتح الصفحة الرسمية ↗ما الذي يحمّله Hermes بالضبط عند تشغيل هذه المهارة.
منقول من التوثيق الرسمي. اقرأه قبل تفعيل المهارة، فهذا النص يصبح تعليمات الوكيل نفسه.
Inspect codebases w/ pygount: LOC, languages, ratios.
Skill metadata
جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.
| Source | Bundled (installed by default) |
| Path | skills/github/codebase-inspection |
| Version | 1.0.0 |
| Author | Hermes Agent |
| License | MIT |
| Platforms | linux, macos, windows |
| Tags | LOC, Code Analysis, pygount, Codebase, Metrics, Repository |
| Related skills | github-repo-management |
Reference: full SKILL.md
شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.
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 pygount1. 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 -205. 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/null6. 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
شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.
- Always exclude .git, node_modules, venv — without
--folders-to-skip, pygount will crawl everything and may take minutes or hang on large dependency trees. - Markdown shows 0 code lines — pygount classifies all Markdown content as comments, not code. This is expected behavior.
- JSON files show low code counts — pygount may count JSON lines conservatively. For accurate JSON line counts, use
wc -ldirectly. - Large monorepos — for very large repos, consider using
--suffixto target specific languages rather than scanning everything.