mcpField
A
advpl-code-generation

advpl-code-generation

github.com/thalysjuvenalDevelopment19150 installsUpdated 6w ago
Repository

About advpl-code-generation

A skill for generating ADVPL and TLPP code for TOTVS Protheus, intended for developers creating new routines and files. It combines structural rules with templates for common Protheus constructs.

Key features

  1. 01ADVPL and TLPP generation rules
  2. 02Naming and namespace conventions
  3. 03Templates for classes and screens
  4. 04Patterns for APIs, reports, and jobs
  5. 05Identifier length limits

Use cases

  1. 01Creating a new Protheus function
  2. 02Building MVC screens or REST endpoints
  3. 03Generating reports or background jobs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thalysjuvenal/advpl-specialist --skill advpl-code-generation

After installing, type/advpl-code-generationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

catalogo-top-50-pes.md
patterns-fwformbrowse.md
patterns-fwmsprinter.md
patterns-jobs.md
patterns-mvc.md
patterns-pontos-entrada-mvc.md
patterns-pontos-entrada.md
patterns-rest.md
patterns-soap.md
patterns-treport.md
patterns-workflow.md
reference.md
templates-classes.md

Details

From the project README

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 fileRead when
reference.mdAlways -- overview, naming conventions, mandatory User Function structure, namespace rules, identifier length limits, common mistakes
templates-classes.mdGenerating a TLPP class (data, methods, constructor)
patterns-mvc.mdGenerating an MVC screen (ModelDef/ViewDef/MenuDef)
patterns-rest.mdGenerating a REST API endpoint (WsRestFul or TLPP @Get/@Post annotations)
patterns-soap.mdGenerating a SOAP Web Service
patterns-treport.mdGenerating a TReport-based report with embedded SQL
patterns-pontos-entrada.mdGenerating a legacy (non-MVC) entry point (ponto de entrada)
patterns-pontos-entrada-mvc.mdGenerating an MVC-based entry point
patterns-workflow.mdGenerating a Protheus workflow routine
patterns-jobs.mdGenerating a scheduled/background job
patterns-fwmsprinter.mdGenerating a coordinate-based PDF report with FWMsPrinter
patterns-fwformbrowse.mdGenerating a browse screen with FWFormBrowse
catalogo-top-50-pes.mdLooking up existing well-known entry points before creating a duplicate

Comments

Markdown supported