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…
Use when the user wants to create, migrate, publish, or troubleshoot a TOTVS Smart View custom business object (Integrated Provider) -- the TLPP class carrying the @totvsFrameworkTReportsIntegratedProvider annotation with getSchema/getData, its parameters with lookup and combo
$ npx -y skills add thalysjuvenal/advpl-specialist --skill smartview-development --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/smartview-developmentContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user wants to create, migrate, publish, or troubleshoot a TOTVS Smart View custom business object (Integrated Provider) -- the TLPP class carrying the @totvsFrameworkTReportsIntegratedProvider annotation with getSchema/getData, its parameters with lookup and combo
name: smartview-development description: Use when the user wants to create, migrate, publish, or troubleshoot a TOTVS Smart View custom business object (Integrated Provider) -- the TLPP class carrying the @totvsFrameworkTReportsIntegratedProvider annotation with getSchema/getData, its parameters with lookup and combo endpoints, the callTReports menu source, and the .trp resource publication cycle. Also covers converting legacy TReport, FWMSPrinter, TMSPrinter and FWMSExcel reports into Smart View data views. Triggers on Portuguese phrasing like "objeto de negocio Smart View", "relatorio no Smart View", "migrar relatorio para Smart View", "visao de dados", "IntegratedProvider", "callTReports", "arquivo .trp", "combo de parametro Smart View". This is Smart View (TReports analytics), NOT Smart X (metadata-driven PO-UI screens) -- for Smart X screens use the smartx-development skill instead.
This skill covers building custom Smart View business objects on TOTVS Protheus: the TLPP class that inherits from `totvs.framework.treports.integratedprovider.IntegratedProvider`, declares the `@totvsFrameworkTReportsIntegratedProvider` annotation, and implements `new()`, `getSchema()` and `getData()`. It documents the schema contract (`addProperty`, column types, dates), the parameter contract (`addParameter`, `setPergunte`, advanced search via `setCustomURL`, and the custom REST endpoint a combo requires), the query patterns inside `getData`, the `callTReports` menu source, and the full `.trp` resource publication cycle that makes the object reachable from the Protheus menu.
Activate this skill when the user is creating a new Smart View report or data view from scratch, migrating an existing TReport/FWMSPrinter/TMSPrinter/FWMSExcel report into a Smart View business object, wiring parameters with advanced search or combo values, or diagnosing why an object does not appear in the tool, returns no rows, or fails to import its resource. It does not cover Smart X (see `smartx-development`), automated testing of Smart View objects (see `advpr-test-automation`, which has `UTSchemaSmartView`/`UTGetDataSmartView`), nor SX dictionary scripts for the tables being read (see `sx-configuration`).
The referenced files are written in Brazilian Portuguese.
| Reference file | Read when | |---|---| | reference.md | Always -- Smart View vs Smart X, environment prerequisites, minimum contract, annotation, REST routes, object identity, end-to-end example | | patterns-schema.md | Defining columns with `addProperty`: types, dates, calculated columns, discriminator column, page size | | patterns-parameters.md | Defining parameters: `addParameter`, `setPergunte`, advanced search (lookup), combo values and the custom options endpoint | | patterns-getdata.md | Writing the query and feeding rows: BeginSQL vs FWExecStatement, multi-branch, currency, workarea rules | | patterns-migration-reports.md | Converting an existing TReport, FWMSPrinter, TMSPrinter or FWMSExcel report into a Smart View business object | | deploy-trp.md | Publishing: prerequisites, `.trp` naming, TDS extension allowance, compile/restart cycle, Protheus x Smart View binding | | troubleshooting.md | Diagnosing errors: object missing from the list, resource not found, parameter screen 500, empty combo, zero rows |
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Use when the user asks to generate, create, or scaffold ADVPL/TLPP code for TOTVS Protheus -- User Functions, Static Functions, TLPP classes, MVC…
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…
Use when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables),…
Use when the user asks to refactor, clean up, or restructure existing ADVPL/TLPP code on TOTVS Protheus without changing its behavior -- extracting long…
Use when the user asks to migrate, convert, compatibilize, or modernize legacy ADVPL procedural code to TLPP object-oriented classes on TOTVS Protheus --…
Use when the user wants to write, run, or troubleshoot automated regression tests for Protheus routines with ADVPR (Advanced Protheus Robot) -- covering…