code-health
ما الذي تفعله
تساعد هذه المهارة ذكاءك على الحكم على صحة قاعدة الكود، وأي الملفات أصعب في الصيانة. وهي لمطورين يريدون تخطيط أعمال التنظيف أو إعادة الهيكلة استنادًا إلى أدلة.
متى تستخدمها
- ✓عندما تسأل عن مدى صحة قاعدة الكود أو ما الذي يحتاج إلى تنظيف أولًا.
- ✓عندما تخطط لإعادة هيكلة أو تنتهي منها وتريد مقارنة قبل وبعد.
- ✓عندما تريد أن تعرف لماذا يُعلَّم ملف معين كخطر أو صعب الصيانة.
رابط المهارة
https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“اعرض لي أكثر الملفات خطرًا في هذا المشروع، وما الذي يجب أن أعيد هيكلته أولًا.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تشغّل المهارة فحوص صحة Repowise، فتعطي كل ملف درجة من 1 إلى 10 بالاعتماد على مؤشرات قابلة للقياس، مثل التعقيد والنقاط الساخنة غير المختبَرة. وتعيد قائمة مرتبة بما يجب إصلاحه أولًا، أو تفاصيل لملفات محددة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Code Health with Repowise
Repowise scores every file 1–10 from deterministic markers — McCabe complexity, deep nesting, brain methods, class cohesion (LCOM4), god classes, clone detection, untested hotspots, function-level churn, ownership dispersion, and more. Zero LLM calls; pure local analysis. The weights are calibrated against a real defect corpus, so a low score means more likely to harbour bugs, not just bigger.
Pick the mode by what you pass
- Dashboard:
get_health()(no targets):fix_first, the ranked list of what to fix first, then repo-level KPIs and the lowest-scoring files. Start here for "how healthy is this codebase?" or "what should we clean up?". - Targeted —
get_health(targets=["src/x.py", "src/y.py"]): per-file score and the specific marker findings driving it. Use before/after a refactor, or to explain why a file is flagged.
Useful include flags
get_health(targets=[...], include=[...]):
"biomarkers"— always return the findings list (what's wrong, where)."refactoring"— deterministic, ranked refactoring suggestions (by impact/effort)."coverage"— surface coverage data when it's been ingested."trend"— recent health snapshots + declining / predicted-decline signal.
include adds blocks; only=[...] subtracts them.
How to use the results
- For "what should I refactor?" → dashboard mode, lead with
fix_first; open an item withget_health(fix_id=...)for its steps and the tests to run, and present the plan, not just the scores. - Rank by
weighted_deficit, notscore— the score floors at 1.0. - For a specific file → report the score, the top 2–3 marker findings, and what each one means in plain language. Avoid dumping the raw payload.
- Check
unresolvedbefore calling a file clean: a target listed there matched nothing, andnot_indexedmeans runrepowise update. - Before editing a flagged file → cross-check
get_risk(targets=[...]); a file that is both low-health and a churn hotspot deserves the most care. - Untested-hotspot / coverage questions → tell the user coverage markers
light up once they ingest a report:
repowise coverage add cov.lcov(LCOV / Cobertura / Clover; a coverage.py.coveragealso builds the per-test map), thenrepowise health --recomputeto fold it into the scores.
CLI equivalents
repowise health— KPIs + lowest-scoring filesrepowise health --refactoring-targets— ranked by impact / effortrepowise health --trend— snapshots + declining alertsrepowise coverage add <file>— ingest coverage, light up untested-hotspot
Error handling
If get_health reports no repository, suggest /repowise:init. Code health is
computed even with a template-rendered wiki (no LLM needed), so it should be available
whenever the repo is indexed.
الأسئلة الشائعة
ماذا تعني الدرجة المنخفضة؟
تقول المهارة إن الدرجة المنخفضة تعني أن الملف أكثر احتمالًا لإخفاء أخطاء، لا أنه كبير الحجم فقط.
هل أستطيع فحص عدد قليل من الملفات؟
نعم. يمكنك تسمية ملفات محددة للحصول على درجاتها والنتائج التي تقف وراءها.
هل تستخدم نموذج ذكاء اصطناعي للحكم على الكود؟
لا. تصف المهارة التحليل بأنه حتمي ومحلي، دون استدعاء أي نموذج.
التفاصيل
الوصف الأصلي من المؤلف
Use when the user asks about code health, code quality, complexity, technical debt, which files are risky or hard to maintain, what to refactor next, untested hotspots, or coverage gaps in a Repowise-indexed codebase (.repowise/ directory exists). Also use to get a before/after health read when planning or finishing a refactor.
repo: repowise-dev/repowise
الشعبية
- نجوم GitHub
- 8.1k
- الترتيب
- #12566
- الترخيص
- AGPL-3.0
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
architectural-decisions
8.1kيساعد وكيلك على معرفة سبب بناء الكود بطريقة معينة، باستخدام القرارات المسجّلة والسجل قبل أن يغيّر البنية المعمارية.
change-review
8.1kيساعد وكيلك على مراجعة طلب سحب أو مجموعة تغييرات قبل الدمج، فيعرض المخاطر والملفات المتأثرة وما يجب أن يتغير معها.
codebase-exploration
8.1kيساعد وكيلك على فهم مشروع غير مألوف بسرعة، بالإجابة عن كيفية عمل الكود ومن يستدعي ماذا وأين بُنيت الأشياء.
dead-code-cleanup
8.1kيساعد وكيلك على إيجاد الكود غير المستخدم والملفات التي لا يمكن الوصول إليها والتصديرات غير المستخدمة في المشروع، لتنظيفها بأمان.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.