mvc-generator

Generate Protheus ADVPL/TLPP MVC screen structures with ModelDef, ViewDef, MenuDef, and FWFormBrowse integration.

115|54|Updated May 25, 2026
One-click install
npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill mvc-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mvc-generator
Source: https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/mvc-generator
Command: npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill mvc-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the repetitive, error-prone work of manually scaffolding Protheus ADVPL/TLPP MVC CRUD screens (ModelDef, ViewDef, MenuDef, and Browse integration) by producing a consistent framework-aligned structure that you can adapt quickly.

Core Features & Use Cases

  • MVC screen scaffolding: Generates the required functions and wiring for Protheus MVC using FWFormModel, FWFormView, and FWFormBrowse.
  • Single entity and master-detail support: Produces both Modelo 1 (single CRUD) and Modelo 3 (header + items grid) patterns based on what you’re building.
  • Validation, triggers, and commit integration: Adds guardrails like field and grid line validations plus commit handling using framework-safe patterns (e.g., FWFormCommit, validation handlers).

Use cases include: generating a new CRUD screen for a Protheus table, building a master-detail screen (e.g., invoice header and line items), and migrating or modernizing legacy screens to MVC patterns.

Quick Start

Ask the AI to create a master-detail Protheus MVC screen for my tables ZZ2 (header) and ZZ3 (items), including ModelDef/ViewDef/MenuDef with grid relation, field validations, and FWFormCommit persistence.

Frequently Asked Questions about mvc-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Protheus MVC CRUD screen with ADVPL and TLPP?

To generate a Protheus MVC CRUD screen, this tool scaffolds the required ModelDef, ViewDef, and MenuDef functions using FWFormModel and FWFormView structures for ADVPL and TLPP frameworks.

Can I build a master-detail Protheus MVC screen with a header and items grid?

Yes, you can build a master-detail Protheus MVC screen. It generates Modelo 3 patterns linking a header table to an items grid with proper relations, grid line validations, and FWFormBrowse integration.

Does Protheus MVC code generation include field validations and commit handling?

Protheus MVC code generation includes built-in guardrails for field validations, grid line triggers, and framework-safe commit handling using standard FWFormCommit patterns for database persistence.

How does FWFormStruct load fields for SX3 table definitions in generated MVC code?

Generated MVC code aligns with FWFormStruct-based SX3 field loading, automatically retrieving and binding table dictionary definitions to the model and view structures for correct framework persistence.

What is the best way to ensure generated ADVPL MVC code meets SonarQube compliance?

To ensure generated ADVPL MVC code meets SonarQube compliance, the output includes a built-in validation checklist verifying structural completeness and adherence to required code quality standards.

Can I use this to modernize legacy Protheus screens into the MVC framework?

Yes, you can use this to modernize legacy Protheus screens by migrating them to standard MVC patterns, generating consistent FWFormModel and FWFormView structures that replace outdated manual scaffolding.