/advpl-specialist:advpl-code-generationfrom advpl-specialist
Generates or scaffolds ADVPL/TLPP code for TOTVS Protheus: functions, classes, MVC, REST, SOAP, entry points, reports, and jobs. Includes naming conventions, structural rules, and templates.
Ships in advpl-specialist. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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 |
|---|---|
| critical-rules.md | Always, before generating any code -- User Function vs bare Function, TLPP namespace declaration, identifier length limits (8/10/255), valid JsonObject/TWsdlManager/FWFormView methods, ALIAS_CAMPO field-name validation |
| reference.md | Always -- overview, naming conventions, mandatory User Function structure, variable scope, error handling, 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 |
AIs without hooks (Copilot, Cursor, Gemini CLI and others) must verify the file themselves, in this order, before delivering. Paths are relative to this skill folder; the scripts belong to the named skills.
advpl-code-review skill's scripts/advpl-lint.sh (../advpl-code-review/scripts/advpl-lint.sh --scope all <file>). Exit 1 means errors..advpl-specialist-ignore (rule <ID>, path <glob>, field <FIELD>, function <NAME>).scripts/convert-encoding.sh (scripts/convert-encoding.sh <file>, strict). On failed: ... (incompatible char), remove or replace the character; or re-run with --translit and tell the user which characters became ?. Do not edit the file after converting: a tool that assumes UTF-8 corrupts the accents. If it needs another edit, convert it back with --to-utf8 first and repeat steps 1 to 3..ps1 twins with pwsh -NoProfile -ExecutionPolicy Bypass -File (or powershell -NoProfile -ExecutionPolicy Bypass -File on Windows PowerShell 5.1)./advpl-specialist:validate to lint whole files on demand.catalogo-top-50-pes.md (opens in a new tab)critical-rules.md (opens in a new tab)patterns-fwformbrowse.md (opens in a new tab)patterns-fwmsprinter.md (opens in a new tab)patterns-jobs.md (opens in a new tab)patterns-mvc.md (opens in a new tab)patterns-pontos-entrada-mvc.md (opens in a new tab)patterns-pontos-entrada.md (opens in a new tab)patterns-rest.md (opens in a new tab)patterns-soap.md (opens in a new tab)patterns-treport.md (opens in a new tab)patterns-workflow.md (opens in a new tab)reference.md (opens in a new tab)scripts/convert-encoding.ps1 (opens in a new tab)scripts/convert-encoding.sh (opens in a new tab)templates-classes.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
19 skills in this plugin
/advpl-code-reviewReview or audit ADVPL/TLPP code for best practices, performance, security and SonarQube rules (CA/BG/CS). "revisar codigo", "auditar rotina", "checar boas praticas", "code review advpl"./advpl-debuggingDebug ADVPL/TLPP errors - compilation, runtime (NIL, type mismatch), slow queries, locks, AppServer logs and stack traces. "erro de compilacao", "travou o lock", "performance lenta", "analisar log"./advpl-refactoringRefactor or clean up ADVPL/TLPP without changing behavior - extract functions, simplify conditionals, remove dead code. "refatorar rotina", "extrair funcao", "remover codigo morto", "God function".npx claudepluginhub thalysjuvenal/advpl-specialist --plugin advpl-specialistOther plugins' skills for the same job