agentleFS
rezendefabiorezendefabio/financas-lab/.claude/skills/migrate/SKILL.md

migrate

Skill0 starsChanged 6 months agoMITView on GitHub

Fluxo completo pos-/feature: gera migration SQL e unit tests para domain POJO do bounded context. Encadeia /write-migration (subagent migration-writer) e /write-test (subagent test-writer). Para se migration falhar. Argumento: nome do bounded context (snake_case).

65 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use incident, sdd and 10 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.
  • JkudjoSkill

    incident

    Production incident response — structured triage, hypothesis tree, safe remediation, incident record

    Also in 4 projects that use this

  • liatrio-labsSkill

    sdd

    Execute the Liatrio Spec-Driven Development (SDD) workflow when explicitly invoked by the user. NOTE: this skill is NOT intended to be dynamically loaded or automatically triggered; it should only ever be explicitly called by the user.

    Also in 4 projects that use this

  • BerryKuipersSkill

    scaffold

    Detect project stack, apply architecture patterns, wire quality gates, and scaffold features. Use when bootstrapping a project, adding a vertical slice, wiring CI/CD, adding Docker compose, or setting up quality gates.

    Also in 4 projects that use this

  • MicrosoftSkill

    init

    Also in 8 projects that use this

  • agenticnotetakingSkill

    upgrade

    Apply plugin knowledge base updates to an existing generated system. Consults the Ars Contexta research graph for methodology improvements, proposes skill upgrades with research justification. Never auto-implements. Triggers on "/upgrade", "upgrade skills", "check for improvements", "update methodology".

    Also in 3 projects that use this

  • genomewalkerSkill

    checkpoint

    Save a checkpoint of task status, decisions, active files, and next steps

    Also in 5 projects that use this

The file

Files
SKILL.md

Execute em sequencia para o bounded context $ARGUMENTS. Pare e reporte ao operador se qualquer passo falhar. Nao prossiga para o proximo passo em caso de falha.

Passo 0 -- Validar argumento

Se $ARGUMENTS vazio ou nao casa ^[a-z][a-z0-9_]*$:

  • Reporte: "ERRO: argumento invalido. Informe nome do bounded context em snake_case (ex: conta)."
  • Termine.

Passo 1 -- Verificar que Entity existe

Derive o PascalCase: split por _, capitalize primeira letra de cada parte, concatene. Exemplo: meu_contexto -> MeuContexto.

Verifique via Glob ou Read que o arquivo existe:

src/main/java/com/laboratorio/financas/$ARGUMENTS/infrastructure/persistence/<PascalCase>Entity.java

Se nao existir:

  • Reporte: "ERRO: Entity nao encontrada. Execute /feature $ARGUMENTS antes de /migrate."
  • Termine.

Passo 2 -- Gerar migration SQL

Invoque a skill /write-migration $ARGUMENTS.

Aguarde o relatorio do subagent migration-writer. Se o relatorio indicar erro (Entity nao encontrada, conflito de versao, ou qualquer falha no Write):

  • Reporte: "ERRO no passo 1 (/write-migration): <mensagem de erro do subagent>"
  • Termine. Nao invoque /write-test.

Passo 3 -- Gerar unit tests do domain POJO

Derive o path do domain POJO:

src/main/java/com/laboratorio/financas/$ARGUMENTS/domain/<PascalCase>.java

Verifique se o arquivo existe. Se nao existir:

  • Reporte: "AVISO: domain POJO nao encontrado em <path>. Pulando geracao de tests."
  • Prossiga para o Passo 4 (relatorio final) sem invocar /write-test.

Se existir, invoque a skill /write-test <path-derivado>.

Aguarde o relatorio do subagent test-writer. Se o relatorio indicar falha de compilacao ou testes falhando:

  • Registre o status como FALHOU no relatorio final, mas NAO reverta a migration.

Passo 4 -- Relatorio final

Produza:

/migrate concluido para: $ARGUMENTS

Passo 1 -- Migration SQL:   <OK | FALHOU: <motivo>>
Passo 2 -- Unit tests:      <OK | FALHOU: <motivo> | PULADO: <motivo>>

Arquivos gerados:
  <path da migration, se gerada>
  <path do arquivo de test, se gerado>

Pendencias manuais:
  - Adicionar FK constraints e indexes na migration conforme necessidade
  - Revisar e complementar os testes gerados

Proximos passos sugeridos:
  git add <arquivos gerados>
  git commit -m "feat(<contexto>): adiciona migration e tests para <nome>"
  /ship   -- apos commit

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.