---
name: ADVPL To TLPP Migration
slug: advpl-to-tlpp-migration
category: AI Engineering
description: ADVPL To TLPP Migration converts legacy ADVPL procedural routines into TLPP classes for TOTVS Protheus. Use it when migrating User Functions and Static Functions to namespaced classes while preserving backward-compatible wrappers.
github: "https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-to-tlpp-migration"
language: Shell
stars: 186
forks: 37
install: "npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-to-tlpp-migration ~/.claude/skills/advpl-to-tlpp-migration"
installs_to: ~/.claude/skills/advpl-to-tlpp-migration
source_path: skills/advpl-to-tlpp-migration/SKILL.md
collection_size: 18
category_size: 3278
collection_url: "https://dirskills.com/collections/thalysjuvenal/advpl-specialist"
added: 2026-09-06T05:20:27.645Z
last_synced: 2026-09-06T05:20:27.645Z
canonical_url: "https://dirskills.com/skills/advpl-to-tlpp-migration"
---

# ADVPL To TLPP Migration

ADVPL To TLPP Migration converts legacy ADVPL procedural routines into TLPP classes for TOTVS Protheus. Use it when migrating User Functions and Static Functions to namespaced classes while preserving backward-compatible wrappers.

**Install:**

```bash
npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-to-tlpp-migration ~/.claude/skills/advpl-to-tlpp-migration
```

## README

# ADVPL to TLPP Migration

This skill guides the conversion of legacy `.prw` procedural code (User Functions, Static Functions, Private/Public variables) into modern `.tlpp` classes with `namespace` declarations, `data` properties, and `public`/`private` methods -- following the official TOTVS naming conventions (lowercase dot-separated namespaces, PascalCase classes, camelCase methods, no underscores). It defines the migration workflow (analyze -> identify -> map to class design -> user approval -> generate -> checklist -> validate) and mandates keeping the original `.prw` User Function as a thin backward-compatible wrapper delegating to the new class.

Activate this skill when the user wants an existing procedural routine converted to TLPP, needs help deciding a namespace, or is modernizing multiple `#Include` directives to `.th` includes. It does not cover generating brand-new TLPP code that has no ADVPL predecessor (see `advpl-code-generation`), behavior-preserving cleanup of code that stays in ADVPL (see `advpl-refactoring`), auditing code quality before migration (see `advpl-code-review`), or fixing errors encountered during or after migration (see `advpl-debugging`).

| Reference file | Read when |
|---|---|
| reference.md | Always -- overview, migration strategy flow, core conversion rules table, TLPP naming conventions, full before/after example, key migration decisions, common mistakes |
| migration-rules.md | Needing the complete mapping of every ADVPL construct (preprocessor directives, database operations, error handling, UI elements) to its TLPP equivalent |
| migration-checklist.md | Verifying a completed migration is thorough before declaring it done |
