/advpl-code-generation
Use when the user asks to generate, create, or scaffold ADVPL/TLPP code for TOTVS Protheus -- User Functions, Static Functions, TLPP classes, MVC (Model/View/Controller), REST APIs, SOAP web services, entry points (pontos de entrada), TReport/FWMsPrinter reports, jobs, or
$ npx -y skills add thalysjuvenal/advpl-specialist --skill advpl-code-generation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/advpl-code-generation
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user asks to generate, create, or scaffold ADVPL/TLPP code for TOTVS Protheus -- User Functions, Static Functions, TLPP classes, MVC (Model/View/Controller), REST APIs, SOAP web services, entry points (pontos de entrada), TReport/FWMsPrinter reports, jobs, or
SKILL.md
advpl-code-generation.SKILL.mdname: advpl-code-generation
description: Use when the user asks to generate, create, or scaffold ADVPL/TLPP code for TOTVS Protheus -- User Functions, Static Functions, TLPP classes, MVC (Model/View/Controller), REST APIs, SOAP web services, entry points (pontos de entrada), TReport/FWMsPrinter reports, jobs, or workflows. Also triggers on Portuguese phrasing like "gerar codigo", "criar rotina", "criar fonte", "novo ponto de entrada", "criar classe tlpp", "gerar api rest", "criar mvc", or routine name patterns like FATA001/MATA010. Covers naming conventions, Hungarian notation, namespace rules, identifier length limits, and mandatory User Function/error-handling structure.
ADVPL/TLPP Code Generation
This skill provides patterns, templates, and mandatory structural rules for generating new ADVPL (`.prw`) and TLPP (`.tlpp`) code for TOTVS Protheus. It covers naming conventions (module prefixes, Hungarian notation), the mandatory User Function skeleton with Protheus.doc headers and error handling, variable scope rules, TLPP namespace conventions (`custom.<agrupador>.<servico>`), and the 8/10/255-character identifier length limits per construct type.
Activate this skill whenever the user requests new code creation: a new function, a TLPP class, an MVC screen, a REST endpoint, a SOAP web service, an entry point, a report, a batch job, or any new `.prw`/`.tlpp` file. It does not cover reviewing existing code (see `advpl-code-review`), fixing errors in existing code (see `advpl-debugging`), improving existing code structure without adding features (see `advpl-refactoring`), or converting legacy `.prw` to `.tlpp` (see `advpl-to-tlpp-migration`).
The reference and pattern files below hold the concrete templates -- read the specific pattern file that matches the type of code being generated instead of relying on memory.
| Reference file | Read when | |---|---| | reference.md | Always -- overview, naming conventions, mandatory User Function structure, namespace rules, identifier length limits, common mistakes | | templates-classes.md | Generating a TLPP class (data, methods, constructor) | | patterns-mvc.md | Generating an MVC screen (ModelDef/ViewDef/MenuDef) | | patterns-rest.md | Generating a REST API endpoint (WsRestFul or TLPP `@Get/@Post` annotations) | | patterns-soap.md | Generating a SOAP Web Service | | patterns-treport.md | Generating a TReport-based report with embedded SQL | | patterns-pontos-entrada.md | Generating a legacy (non-MVC) entry point (ponto de entrada) | | patterns-pontos-entrada-mvc.md | Generating an MVC-based entry point | | patterns-workflow.md | Generating a Protheus workflow routine | | patterns-jobs.md | Generating a scheduled/background job | | patterns-fwmsprinter.md | Generating a coordinate-based PDF report with FWMsPrinter | | patterns-fwformbrowse.md | Generating a browse screen with FWFormBrowse | | catalogo-top-50-pes.md | Looking up existing well-known entry points before creating a duplicate |
Read more
name: advpl-code-generation description: Use when the user asks to generate, create, or scaffold ADVPL/TLPP code for TOTVS Protheus -- User Functions, Static Functions, TLPP classes, MVC (Model/View/Controller), REST APIs, SOAP web services, entry points (pontos de entrada), TReport/FWMsPrinter reports, jobs, or workflows. Also triggers on Portuguese phrasing like "gerar codigo", "criar rotina", "criar fonte", "novo ponto de entrada", "criar classe tlpp", "gerar api rest", "criar mvc", or routine name patterns like FATA001/MATA010. Covers naming conventions, Hungarian notation, namespace rules, identifier length limits, and mandatory User Function/error-handling structure.
ADVPL/TLPP Code Generation
This skill provides patterns, templates, and mandatory structural rules for generating new ADVPL (`.prw`) and TLPP (`.tlpp`) code for TOTVS Protheus. It covers naming conventions (module prefixes, Hungarian notation), the mandatory User Function skeleton with Protheus.doc headers and error handling, variable scope rules, TLPP namespace conventions (`custom.<agrupador>.<servico>`), and the 8/10/255-character identifier length limits per construct type.
Activate this skill whenever the user requests new code creation: a new function, a TLPP class, an MVC screen, a REST endpoint, a SOAP web service, an entry point, a report, a batch job, or any new `.prw`/`.tlpp` file. It does not cover reviewing existing code (see `advpl-code-review`), fixing errors in existing code (see `advpl-debugging`), improving existing code structure without adding features (see `advpl-refactoring`), or converting legacy `.prw` to `.tlpp` (see `advpl-to-tlpp-migration`).
The reference and pattern files below hold the concrete templates -- read the specific pattern file that matches the type of code being generated instead of relying on memory.
| Reference file | Read when | |---|---| | reference.md | Always -- overview, naming conventions, mandatory User Function structure, namespace rules, identifier length limits, common mistakes | | templates-classes.md | Generating a TLPP class (data, methods, constructor) | | patterns-mvc.md | Generating an MVC screen (ModelDef/ViewDef/MenuDef) | | patterns-rest.md | Generating a REST API endpoint (WsRestFul or TLPP `@Get/@Post` annotations) | | patterns-soap.md | Generating a SOAP Web Service | | patterns-treport.md | Generating a TReport-based report with embedded SQL | | patterns-pontos-entrada.md | Generating a legacy (non-MVC) entry point (ponto de entrada) | | patterns-pontos-entrada-mvc.md | Generating an MVC-based entry point | | patterns-workflow.md | Generating a Protheus workflow routine | | patterns-jobs.md | Generating a scheduled/background job | | patterns-fwmsprinter.md | Generating a coordinate-based PDF report with FWMsPrinter | | patterns-fwformbrowse.md | Generating a browse screen with FWFormBrowse | | catalogo-top-50-pes.md | Looking up existing well-known entry points before creating a duplicate |
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Other skills on advpl-specialist.
- /advpl-code-review
Use when the user asks to review, audit, or check the quality of ADVPL/TLPP code for TOTVS Protheus before merge or deploy -- covering best practices (RecLock/MsUnlock pairing, variable scope, area management, error handling), performance bottlenecks, security vulnerabilities
Open skill - /advpl-debugging
Use when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables), runtime failures (NIL access, type mismatch, array bounds), performance issues (slow queries, memory leaks), database
Open skill - /advpl-refactoring
Use when the user asks to refactor, clean up, or restructure existing ADVPL/TLPP code on TOTVS Protheus without changing its behavior -- extracting long functions (>100 lines), simplifying deeply nested conditionals, removing dead code, improving variable naming (Hungarian
Open skill - /advpl-to-tlpp-migration
Use when the user asks to migrate, convert, compatibilize, or modernize legacy ADVPL procedural code to TLPP object-oriented classes on TOTVS Protheus -- turning User Functions/Static Functions into namespaced classes with methods and data properties, replacing Private/Public
Open skill - /advpr-test-automation
Use when the user wants to write, run, or troubleshoot automated regression tests for Protheus routines with ADVPR (Advanced Protheus Robot) -- covering FWTestHelper API, TestSuite/GPS de Testes setup, headless execution via FwExecSuite, and per-pattern scripting (MVC,
Open skill - /changelog-patterns
Use when the user asks to generate a changelog, release notes, or delivery notes from ADVPL/TLPP code changes on TOTVS Protheus -- analyzing diffs or a list of changed files, classifying each change (NEW/FIX/CHANGE/REMOVE/REFACTOR), assessing business impact (ALTO/MEDIO/BAIXO),
Open skill

