Aller au contenu
Skillpedia
Programmation générale8.1k · #12571

code-health

Ce qu’il fait

Cette compétence aide votre IA à évaluer la santé d'une base de code et à déterminer quels fichiers sont les plus difficiles à maintenir. Elle s'adresse aux développeurs qui veulent planifier un nettoyage ou une refactorisation à partir de faits.

Quand l’utiliser

  • ✓Quand une tâche porte sur la qualité du code, la complexité ou la dette technique.
  • ✓Quand vous voulez savoir quels fichiers risqués ou difficiles à maintenir refactoriser en premier.
  • ✓Quand vous avez besoin d'une comparaison avant et après pour une refactorisation.

Lien du skill

https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/code-health/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/repowise-dev/repowise/blob/main/plugins/codex/skills/code-health/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Quels fichiers de ce projet sont des points chauds non testés que je devrais refactoriser en premier ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

La compétence lance des contrôles de santé Repowise qui notent chaque fichier de 1 à 10 à partir de signaux mesurables. Elle renvoie une liste classée de ce qu'il faut corriger en premier, ou les constats des fichiers que vous indiquez.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

  1. For "what should I refactor?" → dashboard mode, lead with fix_first; open an item with get_health(fix_id=...) for its steps and the tests to run, and present the plan, not just the scores.
  2. Rank by weighted_deficit, not score — the score floors at 1.0.
  3. 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.
  4. Check unresolved before calling a file clean: a target listed there matched nothing, and not_indexed means run repowise update.
  5. 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.
  6. 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 .coverage also builds the per-test map), then repowise health --recompute to fold it into the scores.

CLI equivalents

  • repowise health — KPIs + lowest-scoring files
  • repowise health --refactoring-targets — ranked by impact / effort
  • repowise health --trend — snapshots + declining alerts
  • repowise coverage add <file> — ingest coverage, light up untested-hotspot

Error handling

If get_health reports no repository, suggest /prompts: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.

Questions fréquentes

Une note basse signifie-t-elle un gros fichier ?

Non. La compétence précise qu'une note basse signifie que le fichier risque davantage de cacher des bogues.

Peut-elle montrer les lacunes de couverture ?

Oui, lorsque des données de couverture ont été ajoutées au projet.

Utilise-t-elle un modèle d'IA pour les notes ?

Non. La notation est déterministe et locale.

Détails

Description originale de l’auteur

Use when the user asks about code health, code quality, complexity, technical debt, risky or hard-to-maintain files, what to refactor next, untested hotspots, or coverage gaps in a Repowise-indexed codebase (.repowise/ directory exists). Also use for before/after health reads when planning or finishing a refactor.

repo: repowise-dev/repowise

Popularité

Étoiles GitHub
8.1k
Position au classement
#12571
Licence
AGPL-3.0
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires