Zum Inhalt springen
Skillpedia
Allgemeines Programmieren8.1k · #12566

code-health

Was er macht

Diese Fähigkeit hilft deiner KI einzuschätzen, wie gesund eine Codebasis ist und welche Dateien am schwersten zu pflegen sind. Sie ist für Entwickler gedacht, die Aufräum- oder Umbauarbeiten anhand von Belegen planen wollen.

Wann du ihn nutzt

  • ✓Wenn du fragst, wie gesund die Codebasis ist oder was als Nächstes aufgeräumt werden sollte.
  • ✓Wenn du einen Umbau planst oder abgeschlossen hast und einen Vorher-nachher-Vergleich willst.
  • ✓Wenn du wissen willst, warum eine bestimmte Datei als riskant oder schwer zu pflegen markiert ist.

Link zum Skill

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

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Zeig mir die riskantesten Dateien in diesem Projekt und was ich zuerst umbauen sollte.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Die Fähigkeit führt Repowise-Gesundheitsprüfungen aus, die jede Datei auf einer Skala von 1 bis 10 bewerten, anhand messbarer Signale wie Komplexität und ungetesteter Schwerpunkte. Sie gibt eine Rangliste dessen zurück, was zuerst zu beheben ist, oder Details zu bestimmten Dateien.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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 /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.

Häufige Fragen

Was bedeutet eine niedrige Bewertung?

Laut der Fähigkeit heißt eine niedrige Bewertung, dass eine Datei eher Fehler verbirgt, nicht nur dass sie groß ist.

Kann ich nur wenige Dateien prüfen?

Ja. Du kannst bestimmte Dateien nennen, um ihre Bewertungen und die dahinterliegenden Befunde zu erhalten.

Nutzt sie ein KI-Modell, um den Code zu beurteilen?

Nein. Die Fähigkeit beschreibt die Analyse als deterministisch und lokal, ohne Modellaufrufe.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
8.1k
Platz im Ranking
#12566
Lizenz
AGPL-3.0
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills