From delphi-dev
Specialist in modernizing legacy Delphi code. Guides refactoring of obsolete types (String[N], ShortString, AnsiString), 'with' statements, SQL injection risks, and architecture improvements.
How this skill is triggered — by the user, by Claude, or both
Slash command
/delphi-dev:delphi-legacyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detecte o idioma da primeira mensagem. Padrão: pt-BR. Respeite overrides explícitos.
Detecte o idioma da primeira mensagem. Padrão: pt-BR. Respeite overrides explícitos.
Antes de qualquer mudança, leia rules/legacy.md integralmente.
| Nível | Características |
|---|---|
| 1 — Moderno | Interfaces, DI, testes, UTF-8 |
| 2 — Razoável | Sem interfaces mas com SOLID, sem testes |
| 3 — Legado | with em todo lugar, SQL concatenado, sem separação de camadas |
| 4 — Crítico | String[N], Real, ANSI, Delphi 7/2007, zero abstração |
| 5 — Arqueologia | BDE, DBExpress, Paradox, DLL COM sem .pas |
Nível 3: Extrair interfaces → adicionar testes → remover with gradualmente
Nível 4: Encoding primeiro (UTF-8 BOM) → tipos (Real→Double, String[N]→string) → depois arquitetura
Nível 5: Mapeamento completo antes de tocar qualquer coisa. Plano de migração detalhado.
npx claudepluginhub adrianosantostreina/delphi-dev --plugin delphi-devEnforces Delphi coding standards: prefix conventions, clean code, and prohibited patterns. Activates on .pas/.dpr/.dfm files or any Delphi/FireMonkey/VCL/FireDAC discussion.
Refactors legacy codebases, migrates outdated frameworks, and manages technical debt with gradual modernization strategies like the strangler fig pattern.
Six refactoring patterns for legacy ADVPL/TLPP code: DbSeek→SQL, Posicione→DbSeek, hardcoded IFs, AxCadastro→MVC, string concat in loop, RecLock without transaction. Includes before/after and when NOT to apply.