Individual skill
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 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.
skills/advpl-code-generation/SKILL.md
Source commit d80599b75e30e7f559218b453d72b84999f138a4
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Network or broad shell
- Last checked
- Nov 11, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 195
- Repository last updated
- Sep 14, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- advpl Repository topic
- claude-code Repository topic
- devops Repository topic
- ia Repository topic
- orientacao-a-objetos Repository topic
- protheus Repository topic
- tlpp Repository topic
- totvs Repository topic
- totvs-protheus Repository topic
- advpl-projetos Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 2,994 bytescatalogo-top-50-pes.mddoc · 7,953 bytespatterns-fwformbrowse.mddoc · 12,831 bytespatterns-fwmsprinter.mddoc · 24,892 bytespatterns-jobs.mddoc · 14,152 bytespatterns-mvc.mddoc · 22,752 bytespatterns-pontos-entrada-mvc.mddoc · 12,832 bytespatterns-pontos-entrada.mddoc · 18,931 bytespatterns-rest.mddoc · 28,336 bytespatterns-soap.mddoc · 18,630 bytespatterns-treport.mddoc · 17,579 bytespatterns-workflow.mddoc · 22,332 bytesreference.mddoc · 12,632 bytestemplates-classes.mddoc · 27,585 bytes
Read excerpt
# 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) |