Pular para o conteúdo
Skillpedia
Código em geral8,1 mil · #12566

code-health

O que ela faz

Esta skill ajuda sua IA a avaliar o quão saudável é uma base de código e quais arquivos são mais difíceis de manter. É para desenvolvedores que querem planejar limpeza ou refatoração com base em evidências.

Quando usar

  • ✓Quando você pergunta quão saudável é a base de código ou o que deve ser limpo a seguir.
  • ✓Quando você planeja ou termina uma refatoração e quer uma comparação antes e depois.
  • ✓Quando você quer saber por que um arquivo específico é sinalizado como arriscado ou difícil de manter.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/code-health/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Mostre os arquivos mais arriscados deste projeto e o que eu deveria refatorar primeiro.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A skill executa verificações de saúde do Repowise que dão a cada arquivo uma nota de 1 a 10, com base em sinais mensuráveis como complexidade e pontos críticos sem testes. Ela devolve uma lista ordenada do que corrigir primeiro, ou os detalhes de arquivos específicos.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.

Perguntas frequentes

O que significa uma nota baixa?

Segundo a skill, uma nota baixa indica que o arquivo tem mais chance de esconder bugs, e não apenas que é grande.

Posso verificar só alguns arquivos?

Sim. Você pode indicar arquivos específicos para receber as notas e os achados por trás delas.

Ela usa um modelo de IA para avaliar o código?

Não. A skill descreve a análise como determinística e local, sem chamadas a modelos.

Detalhes

Descrição original do 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

Popularidade

Estrelas no GitHub
8,1 mil
Posição no ranking
#12566
Licença
AGPL-3.0
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas