Saltar al contenido
Skillpedia
Programación general8,1 mil · #12566

code-health

Qué hace

Esta habilidad ayuda a tu IA a valorar lo sana que está una base de código y qué archivos son más difíciles de mantener. Es para desarrolladores que quieren planificar limpieza o refactorización con datos.

Cuándo usarla

  • ✓Cuando preguntas lo sana que está la base de código o qué conviene limpiar después.
  • ✓Cuando planeas o terminas una refactorización y quieres una comparación de antes y después.
  • ✓Cuando quieres saber por qué un archivo concreto está marcado como arriesgado o difícil de mantener.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Muéstrame los archivos más arriesgados de este proyecto y qué debería refactorizar primero.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La habilidad ejecuta comprobaciones de salud de Repowise que puntúan cada archivo del 1 al 10 con señales medibles, como la complejidad y los puntos calientes sin pruebas. Devuelve una lista ordenada de lo que conviene arreglar primero, o los detalles de archivos concretos.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.

Preguntas frecuentes

¿Qué significa una puntuación baja?

Según la habilidad, una puntuación baja indica que el archivo tiene más probabilidades de esconder errores, no solo que sea grande.

¿Puedo revisar solo algunos archivos?

Sí. Puedes nombrar archivos concretos para obtener sus puntuaciones y los hallazgos que las explican.

¿Usa un modelo de IA para juzgar el código?

No. La habilidad describe el análisis como determinista y local, sin llamadas a modelos.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
8,1 mil
Posición en el ranking
#12566
Licencia
AGPL-3.0
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas