Code Refactoring Workflow
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus).
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .claude/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .claude/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .agents/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .agents/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .cursor/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .cursor/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/totvs/engpro-advpl-tlpp-skills.git --path skills/advpl-tlpp/advpl-to-tlpp-migration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .gemini/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .gemini/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .github/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .github/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/advpl-tlpp/advpl-to-tlpp-migration .opencode/skills/advpl-to-tlpp-migration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "advpl-to-tlpp-migration" agent skill from https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/advpl-to-tlpp-migration into .opencode/skills/advpl-to-tlpp-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "advpl-to-tlpp-migration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
advpl-to-tlpp-migrationGuide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus).
Advpl To Tlpp Migration is an agent skill from totvs/engpro-advpl-tlpp-skills. Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus). Covers feature comparison, syntax transformation, include/namespace adoption, typing, Try-Catch, REST migration, long identifiers, JSON inline, named parameters, access modifiers, and StaticCall removal. Use when user says 'migrate to TLPP', 'convert AdvPL', 'modernize .prw to .tlpp', 'add typing'.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/advpl-tlpp-feature-comparison.md` and `references/tlpp-migration-patterns.md`).
It sits in Development, covering Legacy modernization. The repository describes itself as: Repositório contendo skills para orientar desenvolvimento ADVPL/TLPP com agentes de IA. The licence is MIT.
12 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 3908e4e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Advpl To Tlpp Migration loads about 2.3k tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 931 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from totvs/engpro-advpl-tlpp-skills at commit 3908e4e, republished under its MIT licence (© totvs). 931 words, ~2,283 tokens.
.claude/skills/advpl-to-tlpp-migration/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Migrate legacy AdvPL source files (.prw, .prx) to modern TLPP (.tlpp) incrementally and safely. TLPP is an evolution of AdvPL that introduces modern language features while maintaining full backward compatibility with existing AdvPL constructs. This skill provides a structured migration path that can be applied gradually — no forced rewrite is required.
Use this skill when:
.prw files to .tlppStaticCall) in TLPP sourcesFor the complete feature-by-feature comparison table (19 features covering scoping, control structures, typing, namespaces, Try-Catch, JSON inline, class modifiers, REST, and StaticCall status), see advpl-tlpp-feature-comparison.md.
MANDATORY RULE — File Extension: Any source file that includes
#include "tlpp-core.th"or uses TLPP-exclusive features must use the.tlppextension. If a.prwor.prxfile is being migrated or modified to adopt TLPP constructs, rename it to.tlppas part of the same change. The AdvPL compiler silently ignores TLPP directives in.prw/.prxfiles, which leads to hard-to-diagnose failures. Always change the extension first.
The migration involves 15 steps, each addressing a specific AdvPL → TLPP transformation:
.prw → .tlpp, add #include "tlpp-core.th"Namespace company.module.featureas Type)FWLoadMenuDef, FWLoadModel, namespace callsJsonObject():New() chainsPrivate, Protected, Public@Get, @Post, etc.LongNameClass (not LongClassName)FWTemporaryTableConOut, OutErr, ?If/Else/EndIfFWFormCommit(oModel)For complete before/after diff examples for all 15 steps, see tlpp-migration-patterns.md.
.prw to .tlpp#include "tlpp-core.th" added as the first includeNamespace declaration addedStaticCall() replaced with direct calls or FWLoad* functionsas Type)as Type)as Type)ErrorBlock patterns replaced with Try-Catch where appropriatePrivate variable scope replaced with Local where possiblePrivate, Protected, Public)LongNameClass used for inheritance (not LongClassName)MSCREATE, DBCREATE, CRIATRAB) replaced with FWTemporaryTableConOut() / OutErr() / ? replaced with FWLogMsg()IIF() replaced with If/Else/EndIf blocksFormCommit overrides migrated to FWModelEvent / FWFormCommit(oModel) patternRefer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference.
| Pitfall | Symptom | Resolution |
|---|---|---|
Using #include "tlpp-core.th" in a .prw/.prx file | TLPP features silently ignored; unexpected runtime behavior | Rename the file to .tlpp before adding TLPP includes or features |
Using long identifiers in .prw files | Silent truncation, wrong function calls | Only use long names in .tlpp files |
StaticCall in .tlpp file | Compilation error | Replace with FWLoadMenuDef, FWLoadModel, or namespace call |
Missing #include "tlpp-core.th" | TLPP features not recognized | Add as the first include |
| Default access modifier changed | Class members inaccessible from outside | Explicitly add Public to members that need external access |
Try-Catch around non-TLPP calls | ErrorBlock still needed for pure AdvPL error flows | Use Try-Catch regardless — it captures AdvPL throws too |
| JSON inline without line continuations | Compilation error | Use ; at end of each line in JSON inline blocks |
Access modifiers or static in method implementation | Compilation error or unexpected behavior | Method implementations use bare method — NEVER public method, static method, etc. Modifiers are ONLY in the class declaration |
Migration does not need to be all-or-nothing. Follow this priority order:
tlpp-core.th include + remove StaticCallNamespace + type annotations (catches bugs at compile time)ErrorBlock with Try-Catch, add class access modifiers, fix LongNameClass inheritanceIIF, ConOut → FWLogMsg, ISAM → FWTemporaryTable, FormCommit → FWModelEventAdvPL and TLPP coexist. A
.tlppfile can call AdvPL functions and vice versa. You don't need to migrate everything at once.
StaticCall not compiling in TLPP: StaticCall is prohibited in TLPP. Replace StaticCall(TClass, Method, params) with TClass():Method(params)..tlpp: Replace #include "protheus.ch" with #include "tlpp-core.th". Add #include "totvs.ch" if the source uses Protheus framework functions. Do not keep protheus.ch — use totvs.ch instead.Namespace declaration matches the directory structure and that callers use the fully qualified name or a Using directive..tlpp file calls an AdvPL function, the AdvPL source must still be compiled in the RPO.© totvs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in skills/advpl-tlpp/advpl-to-tlpp-migration of totvs/engpro-advpl-tlpp-skills.
Open the folder on GitHubat commit 3908e4e
Advpl To Tlpp Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Advpl To Tlpp Migration this skilltotvs/engpro-advpl-tlpp-skills | 143 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| Convert Internal Package to TypeScriptTryGhost/Ghost | 56k | — | ~1.2k | Automated safety check: Pass | MIT | |
| jscpd Code Migration Trackerkucherenko/jscpd | 6.4k | — | ~5k | Automated safety check: Pass | MIT | |
| Rails Upgrade Assistantombulabs/claude-code_rails-upgrade-skill | 391 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Migrate Dotnet8 To Dotnet9dotnet/skills | 5.6k | 2 repos | ~3.9k | Automated safety check: Pass | MIT |
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
TryGhost/Ghost
Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.
kucherenko/jscpd
Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.
ombulabs/claude-code_rails-upgrade-skill
Analyzes a Rails app and builds an upgrade report with breaking changes, deprecations and step-by-step migration guides, one version at a time from Rails 2.3 through 8.1.
dotnet/skills
Migrate a .NET 8 project to .NET 9 and resolve all breaking changes.
runceel/ReactiveProperty
Catalog of MSBuild anti-patterns with detection rules and fix recipes.
totvs/engpro-advpl-tlpp-skills
Converts AdvPL and TLPP source files from UTF-8 to Windows-1252 in place after code generation, because the Protheus compiler accepts only CP1252 files.
totvs/engpro-advpl-tlpp-skills
Compiles AdvPL and TLPP sources from VS Code with the TOTVS Developer Studio extension, handling server setup, connection and compile result reporting.
totvs/engpro-advpl-tlpp-skills
Plans and builds Protheus AdvPL/TLPP features through Specify, Design, Tasks and Execute phases whose depth scales with the size of the change.
totvs/engpro-advpl-tlpp-skills
Reviews AdvPL and TLPP source against SonarQube rules, ProtheusDOC requirements, security, performance and Protheus conventions, and reports findings by severity.
totvs/engpro-advpl-tlpp-skills
Queries the TOTVS Protheus ERP data dictionary for tables, fields, indexes, parameters, triggers and lookups, including impact checks during refactoring.
totvs/engpro-advpl-tlpp-skills
Generates Protheus MVC screens in ADVPL/TLPP, with ModelDef, ViewDef, MenuDef and Browse functions for single-entity and master-detail layouts.
Categories
Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus). Advpl To Tlpp Migration is an agent skill from totvs/engpro-advpl-tlpp-skills. Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus).
Advpl To Tlpp Migration fits situations like: user says migrate to TLPP; modernize .prw to .tlpp.
Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a claude-code`. Or copy the skill folder (skills/advpl-tlpp/advpl-to-tlpp-migration in totvs/engpro-advpl-tlpp-skills) into .claude/skills/advpl-to-tlpp-migration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a codex`. Or copy the skill folder (skills/advpl-tlpp/advpl-to-tlpp-migration in totvs/engpro-advpl-tlpp-skills) into .agents/skills/advpl-to-tlpp-migration in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/advpl-to-tlpp-migration, .gemini/skills/advpl-to-tlpp-migration, .github/skills/advpl-to-tlpp-migration and .opencode/skills/advpl-to-tlpp-migration in your project.
SKILL.md names no scripts, command-line tools or credentials: Advpl To Tlpp Migration is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Advpl To Tlpp Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Advpl To Tlpp Migration: Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), Convert Internal Package to TypeScript (TryGhost/Ghost, 56k stars), jscpd Code Migration Tracker (kucherenko/jscpd, 6.4k stars) and Rails Upgrade Assistant (ombulabs/claude-code_rails-upgrade-skill, 391 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
totvs (a GitHub organization) maintains it in totvs/engpro-advpl-tlpp-skills, which has 143 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.
Source: totvs/engpro-advpl-tlpp-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.