الدليل ← Skill
SkillbundledHermes Bundled Skills

Codebase Inspection

Codebase Inspection: مهارة ينشرها Hermes Agent. مجالها العمل مع الكود والمستودعات. الرخصة MIT. الإصدار الموثّق 1.0.0. مثبّتة افتراضيًا مع Hermes، فلا تحتاج خطوة تثبيت. تدعم: linux، macos، windows.

LOCCode AnalysispygountCodebaseMetricsRepositoryBundledHermes skill
آخر تحقق من السجل2026-08-18v1.0.0Hermes Agent
افتح المصدر الأصلي ↗Read in English
المعنى ببساطة

ماذا يضيف إلى 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. الشرح العربي يفسّر النوع والمجال ولا يضيف وظيفة غير مذكورة في المصدر.

!
مراجعة الأمان

المصدر رسمي أو خضع لمراجعة تحريرية، لكن ذلك لا يغني عن مراجعة الصلاحيات والإصدار.

مسار تثبيت آمن

افحص، ثبّت، ثم اختبر.

  1. 01
    افتح المصدر

    طابق اسم الناشر والرخصة والوصف مع حاجتك، وراجع آخر تحديث فعلي.

  2. 02
    راجع الصلاحيات والأسرار

    لا تلصق قيمة سر داخل الموقع. استخدم أسماء متغيرات البيئة وامنح أقل نطاق ممكن.

  3. 03
    انسخ الإعداد فقط بعد المراجعة

    الأزرار أدناه تنسخ نصًا إلى الحافظة ولا تشغّل أمرًا على جهازك.

  4. 04
    اختبر بمهمة غير حساسة

    تحقق من الأدوات الظاهرة، ثم استبعد أدوات الكتابة أو الحذف التي لا تحتاجها.

طريقة الإعداد

مثبّتة مسبقًا مع Hermes.

تأتي هذه المهارة مع Hermes وتُحمَّل عندما يرى الوكيل أنها مناسبة. لا شيء لتثبيته؛ اقرأ التعريف أدناه لتعرف ما ستفعله.

افتح الصفحة الرسمية ↗
تعريف المهارة كاملًا

ما الذي يحمّله Hermes بالضبط عند تشغيل هذه المهارة.

منقول من التوثيق الرسمي. اقرأه قبل تفعيل المهارة، فهذا النص يصبح تعليمات الوكيل نفسه.

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

Skill metadata

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

SourceBundled (installed by default)
Pathskills/github/codebase-inspection
Version1.0.0
AuthorHermes Agent
LicenseMIT
Platformslinux, macos, windows
TagsLOC, Code Analysis, pygount, Codebase, Metrics, Repository
Related skillsgithub-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

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Shellسطر واحد
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:

Shell4 أسطر
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:

Shell8 أسطر
# 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

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Shell5 أسطر
# 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

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Shell5 أسطر
# 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

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Shell8 أسطر
# 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.