Agent skill

Advpl To Tlpp Migration

by totvs in totvs/engpro-advpl-tlpp-skills

Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus).

MITAuto-check passedDevelopment

Install Advpl To Tlpp Migration

skills CLI
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill advpl-to-tlpp-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install totvs/engpro-advpl-tlpp-skills advpl-to-tlpp-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
advpl-to-tlpp-migration
GitHub stars
143
Token cost
~2.3k tokens
SKILL.md length
931 words
Files
3 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Guide the migration of legacy AdvPL (Advanced Programming Language) code to modern TLPP (TOTVS Language Plus Plus).

  • Works in 12 steps: File Extension and Includes — .prw →… → Add Namespace — Organize code with… → Add Type Annotations — Variables,… → …
  • User says migrate to TLPP
  • SKILL.md covers Overview, When to Use, Feature Comparison: AdvPL vs.… and Migration Process, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

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.

When your agent uses it

  • User says migrate to TLPP
  • Modernize .prw to .tlpp

Example prompts

  • “migrate to TLPP”
  • “convert AdvPL”
  • “modernize .prw to .tlpp”
  • “/advpl-to-tlpp-migration”

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. File Extension and Includes — .prw → .tlpp, add #include "tlpp-core.th"
  2. Add Namespace — Organize code with Namespace company.module.feature
  3. Add Type Annotations — Variables, parameters, return values (as Type)
  4. Replace ErrorBlock with Try-Catch — Modern exception handling
  5. Replace StaticCall — Use FWLoadMenuDef, FWLoadModel, namespace calls
  6. Use Long Identifier Names — TLPP removes the 10-char limit
  7. Use Named Parameters — Improve readability at call sites
  8. Use JSON Inline — Replace JsonObject():New() chains
  9. Add Class Access Modifiers — Private, Protected, Public
  10. Migrate WsRESTful to TLPP REST — Annotation-based @Get, @Post, etc.
  11. Fix Incorrect Inheritance — LongNameClass (not LongClassName)
  12. Remove ISAM Driver Usage — Migrate to FWTemporaryTable

What it can do on your machine

Read from SKILL.md and the folder at commit 3908e4e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.4k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from totvs/engpro-advpl-tlpp-skills at commit 3908e4e, republished under its MIT licence (© totvs). 931 words, ~2,283 tokens.

Download SKILL.mdSave it as .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.
name
advpl-to-tlpp-migration
description
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'.
license
MIT
metadata.domain
Protheus
metadata.maintainer
Customizações ADVPL/TLPP
metadata.author
Thalion Starforge
metadata.version
4.1.0
metadata.category
Migration and Modernization

AdvPL-to-TLPP Migration

Overview

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.

When to Use

Use this skill when:

  • Modernizing legacy AdvPL code to TLPP
  • Converting .prw files to .tlpp
  • Adopting TLPP-exclusive features (typing, try-catch, namespace, etc.)
  • Replacing prohibited constructs (e.g., StaticCall) in TLPP sources
  • Preparing code for TLPP REST migration from WsRESTful
  • Onboarding developers transitioning from AdvPL to TLPP

Feature Comparison: AdvPL vs. TLPP

For 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.


Migration Process

MANDATORY RULE — File Extension: Any source file that includes #include "tlpp-core.th" or uses TLPP-exclusive features must use the .tlpp extension. If a .prw or .prx file is being migrated or modified to adopt TLPP constructs, rename it to .tlpp as part of the same change. The AdvPL compiler silently ignores TLPP directives in .prw/.prx files, which leads to hard-to-diagnose failures. Always change the extension first.

The migration involves 15 steps, each addressing a specific AdvPL → TLPP transformation:

  1. File Extension and Includes — .prw → .tlpp, add #include "tlpp-core.th"
  2. Add Namespace — Organize code with Namespace company.module.feature
  3. Add Type Annotations — Variables, parameters, return values (as Type)
  4. Replace ErrorBlock with Try-Catch — Modern exception handling
  5. Replace StaticCall — Use FWLoadMenuDef, FWLoadModel, namespace calls
  6. Use Long Identifier Names — TLPP removes the 10-char limit
  7. Use Named Parameters — Improve readability at call sites
  8. Use JSON Inline — Replace JsonObject():New() chains
  9. Add Class Access Modifiers — Private, Protected, Public
  10. Migrate WsRESTful to TLPP REST — Annotation-based @Get, @Post, etc.
  11. Fix Incorrect Inheritance — LongNameClass (not LongClassName)
  12. Remove ISAM Driver Usage — Migrate to FWTemporaryTable
  13. Migrate Console APIs to FWLogMsg — Replace ConOut, OutErr, ?
  14. Remove IIF Usage — Replace with If/Else/EndIf
  15. Migrate FormCommit Override to FWModelEvent — Use FWFormCommit(oModel)

For complete before/after diff examples for all 15 steps, see tlpp-migration-patterns.md.


Migration Checklist

Pre-Migration
  • Source file is under version control with a clean commit
  • Existing tests pass (or tests exist for the code)
  • Dependencies on the file are identified (callers, includes)
  • Team is aware of the migration (naming changes affect callers)
File Transformation
  • File extension changed from .prw to .tlpp
  • #include "tlpp-core.th" added as the first include
  • Namespace declaration added
  • All StaticCall() replaced with direct calls or FWLoad* functions
  • User Function return types added (as Type)
  • Parameter types added (as Type)
  • Variable types added (as Type)
Modernization (Incremental)
  • ErrorBlock patterns replaced with Try-Catch where appropriate
  • Short identifier names expanded to descriptive names
  • Private variable scope replaced with Local where possible
  • Class access modifiers added (Private, Protected, Public)
  • Named parameters used for functions with 3+ parameters
  • JSON inline syntax used for JSON object construction
  • WsRESTful services migrated to TLPP REST annotations
  • LongNameClass used for inheritance (not LongClassName)
  • ISAM drivers (MSCREATE, DBCREATE, CRIATRAB) replaced with FWTemporaryTable
  • ConOut() / OutErr() / ? replaced with FWLogMsg()
  • IIF() replaced with If/Else/EndIf blocks
  • FormCommit overrides migrated to FWModelEvent / FWFormCommit(oModel) pattern

Refer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference.

Post-Migration
  • Source compiles without errors
  • All unit/integration tests pass
  • Callers updated if function signatures changed
  • RPO recompiled and tested in development environment
  • No regression in existing functionality

Show full SKILL.md (376 more words)Show less

Common Migration Pitfalls

PitfallSymptomResolution
Using #include "tlpp-core.th" in a .prw/.prx fileTLPP features silently ignored; unexpected runtime behaviorRename the file to .tlpp before adding TLPP includes or features
Using long identifiers in .prw filesSilent truncation, wrong function callsOnly use long names in .tlpp files
StaticCall in .tlpp fileCompilation errorReplace with FWLoadMenuDef, FWLoadModel, or namespace call
Missing #include "tlpp-core.th"TLPP features not recognizedAdd as the first include
Default access modifier changedClass members inaccessible from outsideExplicitly add Public to members that need external access
Try-Catch around non-TLPP callsErrorBlock still needed for pure AdvPL error flowsUse Try-Catch regardless — it captures AdvPL throws too
JSON inline without line continuationsCompilation errorUse ; at end of each line in JSON inline blocks
Access modifiers or static in method implementationCompilation error or unexpected behaviorMethod implementations use bare method — NEVER public method, static method, etc. Modifiers are ONLY in the class declaration

Incremental Migration Strategy

Migration does not need to be all-or-nothing. Follow this priority order:

  1. Mandatory for TLPP: File extension + tlpp-core.th include + remove StaticCall
  2. High value: Add Namespace + type annotations (catches bugs at compile time)
  3. Medium value: Replace ErrorBlock with Try-Catch, add class access modifiers, fix LongNameClass inheritance
  4. SonarQube compliance: Remove IIF, ConOut → FWLogMsg, ISAM → FWTemporaryTable, FormCommit → FWModelEvent
  5. Nice to have: Long identifiers, named parameters, JSON inline

AdvPL and TLPP coexist. A .tlpp file can call AdvPL functions and vice versa. You don't need to migrate everything at once.


Troubleshooting

  • StaticCall not compiling in TLPP: StaticCall is prohibited in TLPP. Replace StaticCall(TClass, Method, params) with TClass():Method(params).
  • Include conflicts after renaming to .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 resolution errors: Ensure the Namespace declaration matches the directory structure and that callers use the fully qualified name or a Using directive.
  • Functions not found after migration: AdvPL and TLPP can coexist. If a .tlpp file calls an AdvPL function, the AdvPL source must still be compiled in the RPO.
  • Type mismatch at compile time: TLPP type annotations are strict. Ensure parameter types and return types match exactly — implicit conversions allowed in AdvPL may fail in TLPP.

© totvs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/advpl-tlpp/advpl-to-tlpp-migration of totvs/engpro-advpl-tlpp-skills.

  • SKILL.md
  • references/advpl-tlpp-feature-comparison.md
  • references/tlpp-migration-patterns.md

Open the folder on GitHubat commit 3908e4e

Compare with similar skills

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.

Advpl To Tlpp Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Advpl To Tlpp Migration this skilltotvs/engpro-advpl-tlpp-skills143—~2.3kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT
Convert Internal Package to TypeScriptTryGhost/Ghost56k—~1.2kAutomated safety check: PassMIT
jscpd Code Migration Trackerkucherenko/jscpd6.4k—~5kAutomated safety check: PassMIT
Rails Upgrade Assistantombulabs/claude-code_rails-upgrade-skill391—~2.7kAutomated safety check: PassMIT
Migrate Dotnet8 To Dotnet9dotnet/skills5.6k2 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • 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.

    42k GitHub stars~3.1k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.

    56k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.

    6.4k GitHub stars~5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Rails Upgrade Assistant

    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.

    391 GitHub stars~2.7k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Official

    Migrate a .NET 8 project to .NET 9 and resolve all breaking changes.

    5.6k GitHub starsUsed in 2 repos~3.9k tokens
    DevelopmentAuto-check passed
  • Msbuild Antipatterns

    runceel/ReactiveProperty

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    944 GitHub stars~3.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from totvs/engpro-advpl-tlpp-skills

All 19 skills in this repo
  • AdvPL UTF-8 to CP1252 Converter

    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.

    143 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed
  • AdvPL/TLPP Compile in VS Code

    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.

    143 GitHub stars~3.7k tokensUpdated 5 days ago
    Auto-check passed
  • Protheus Spec-Driven Development

    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.

    143 GitHub stars~3.6k tokensUpdated 5 days ago
    Auto-check passed
  • AdvPL and TLPP Code Review

    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.

    143 GitHub stars~2.5k tokensUpdated 5 days ago
    Auto-check passed
  • Protheus Data Dictionary Lookup

    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.

    143 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Protheus MVC Generator

    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.

    143 GitHub stars~2.2k tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Advpl To Tlpp Migration

What does Advpl To Tlpp Migration do?

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).

When should I use Advpl To Tlpp Migration?

Advpl To Tlpp Migration fits situations like: user says migrate to TLPP; modernize .prw to .tlpp.

How do I install Advpl To Tlpp Migration in Claude Code?

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.

How do I install Advpl To Tlpp Migration in Codex?

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.

Can I use Advpl To Tlpp Migration in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Advpl To Tlpp Migration need to run?

SKILL.md names no scripts, command-line tools or credentials: Advpl To Tlpp Migration is instructions for the agent only.

Does Advpl To Tlpp Migration access the network?

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.

Is Advpl To Tlpp Migration safe to install?

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.

What licence does Advpl To Tlpp Migration use?

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.

How many tokens does Advpl To Tlpp Migration use?

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.

What are the alternatives to Advpl To Tlpp Migration?

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.

Who maintains Advpl To Tlpp Migration?

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.