agentleFS
GustavoAlecioGustavoAlecio/claude-setup/skills/fix/SKILL.md

fix

Skill0 starsChanged 27 days agoMITView on GitHub

Fluxo leve para bugs — investiga, diagnostica, corrige e verifica sem o pipeline completo de 5 etapas

82 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use feature, frontend-code-review and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bradtraversySkill

    feature

    Manage current feature workflow - start, review, explain or complete

    Also in 10 projects that use this

  • chendongqiSkill

    frontend-code-review

    Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.

    Also in 4 projects that use this

  • GoogleSkill

    pr-creator

    Also in 4 projects that use this

  • PJuniszewskiSkill

    cook

    Feature development with guardrails. Plan → Review → Code → Ship.

    Also in 3 projects that use this

  • vbrevikSkill

    work

    Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    test

    Also in 12 projects that use this

The file

Files
SKILL.md

1. Detectar projeto

PROJECT_PATH=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
source ~/.claude/bin/get-project.sh
PROJECT_NAME=$(get-project-name)

2. Consultar lessons learned

Se ~/.claude/projects/$PROJECT_NAME/lessons.md existir, leia-o. O mesmo padrao de bug pode ja ter sido corrigido antes — aplique a regra existente.

3. Investigar

Dado o bug report do usuario, investigue autonomamente:

  1. Reproduzir mentalmente: entenda o cenario descrito
  2. Localizar codigo relevante: busque no codebase os arquivos, funcoes e fluxos envolvidos. Mapa da org: se existir .map/index.md no repo ou numa pasta acima (nunca procure abaixo), leia o índice e as notas/gerados relevantes antes de grep/Explore. Nota marcada STALE não é confiável: confira as âncoras. O mapa descreve origin/development; confira o diff da branch por cima.
  3. Ler logs/stack traces: se o usuario forneceu, analise-os. Se nao, busque em arquivos de log do projeto
  4. Testes falhando: execute a suite de testes para confirmar o que falha

Regra: nao pergunte o que pode ser obtido do codigo ou dos logs. Investigue primeiro.

4. Diagnosticar

Identifique a root cause (nao o sintoma). Apresente o diagnostico em 2-3 linhas antes de corrigir:

**Diagnostico:** <o que esta errado e por que>
**Root cause:** <causa raiz no codigo — arquivo:linha>
**Impacto:** <N arquivos afetados>

Avaliar complexidade

  • Se o fix afeta <= 3 arquivos e nao exige decisao arquitetural: prossiga com o fix
  • Se o fix afeta > 3 arquivos ou exige mudanca arquitetural: pare e avise: "Este bug e sintoma de um problema maior. Recomendo escalar para o Fluxo Smart (/specify) para tratar adequadamente." Aguarde decisao do usuario.

5. Corrigir

Aplique o fix com a menor superficie de mudanca possivel:

  1. Se nao existe teste para o cenario: crie um teste que reproduz o bug ANTES do fix (Red)
  2. Aplique a correcao: fix minimal e direto
  3. Confirme que o teste passa (Green)
  4. Execute testes existentes para garantir que nada quebrou

Regras:

  • Fix no root cause, nao no sintoma
  • Nao refatore codigo adjacente — foque apenas no bug
  • Nao adicione features junto com o fix

6. Verificar

# Execute testes relevantes — adapte ao projeto:
# flutter test <path>
# npm test -- <path>
# pytest <path>

Apresente o resultado:

**Fix aplicado:**
- **Arquivo(s):** <lista de arquivos modificados>
- **Teste:** <nome do teste> — PASS
- **Regressao:** N testes existentes — todos PASS (ou detalhe falhas)

7. Registrar lesson (se aplicavel)

Se o bug revela um padrao que pode se repetir, registre em ~/.claude/projects/$PROJECT_NAME/lessons.md:

### <data> — <categoria>
**Erro:** <padrao que causou o bug>
**Correcao:** <o que foi feito>
**Regra:** <regra preventiva para o futuro>

Crie o arquivo se nao existir.

8. Finalizar

Apresente resumo do fix. Nao arquive ciclo (fix nao gera artefatos de workflow).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.