Agent skill

Tlpp REST Endpoint Generator

by totvs in totvs/engpro-advpl-tlpp-skills

Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object.

MITAuto-check passedBackend & APIs

Install Tlpp REST Endpoint Generator

skills CLI
$ npx skills add totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install totvs/engpro-advpl-tlpp-skills tlpp-rest-endpoint-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/totvs/engpro-advpl-tlpp-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/advpl-tlpp/tlpp-rest-endpoint-generator .claude/skills/tlpp-rest-endpoint-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tlpp-rest-endpoint-generator
GitHub stars
143
Token cost
~2.4k tokens
SKILL.md length
841 words
Files
3 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object.

  • Works in 4 steps: Gather Requirements → Load Templates → Apply TTALK Standards → …
  • User says create REST endpoint
  • SKILL.md covers Overview, When to Use, TLPP REST Architecture and The oRest Object, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tlpp REST Endpoint Generator is an agent skill from totvs/engpro-advpl-tlpp-skills. Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object. Follows TOTVS API standards (TTALK) including pagination, error model, standard headers, and Swagger documentation. Use when user says 'create REST endpoint', 'TLPP REST', '@Get annotation', 'oRest endpoint'.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/tlpp-rest-endpoint-templates.md` and `references/ttalk-standards-and-configuration.md`).

It sits in Backend & APIs, covering REST APIs and OpenAPI specifications. It works with OpenAPI. The repository describes itself as: Repositório contendo skills para orientar desenvolvimento ADVPL/TLPP com agentes de IA. The licence is MIT.

When your agent uses it

  • User says create REST endpoint
  • @Get annotation

Example prompts

  • “create REST endpoint”
  • “TLPP REST”
  • “@Get annotation”
  • “/tlpp-rest-endpoint-generator”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Gather Requirements
  2. Load Templates
  3. Apply TTALK Standards
  4. Validate Against Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 3908e4e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are tlpp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tlpp REST Endpoint Generator loads about 2.4k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 841 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from totvs/engpro-advpl-tlpp-skills at commit 3908e4e, republished under its MIT licence (© totvs). 841 words, ~2,407 tokens.

Download SKILL.mdSave it as .claude/skills/tlpp-rest-endpoint-generator/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
tlpp-rest-endpoint-generator
description
Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object. Follows TOTVS API standards (TTALK) including pagination, error model, standard headers, and Swagger documentation. Use when user says 'create REST endpoint', 'TLPP REST', '@Get annotation', 'oRest endpoint'.
license
MIT
metadata.domain
Protheus
metadata.maintainer
Customizações ADVPL/TLPP
metadata.author
Thalion Starforge
metadata.version
4.2.0
metadata.category
Code Generation

TLPP REST Endpoint Generator

Overview

Generate production-ready TLPP REST endpoints using the native annotation-based REST framework. TLPP REST replaces the legacy WsRESTful pattern with a simpler, annotation-driven approach. Each endpoint is a function decorated with an HTTP verb annotation and uses the global oRest object to handle requests and responses.

When to Use

Use this skill when:

  • Creating new REST API endpoints in TLPP
  • Implementing TOTVS TTALK-compliant APIs
  • Generating CRUD endpoints for Protheus entities
  • Building integration APIs for external systems
  • Migrating WsRESTful services to TLPP REST

TLPP REST Architecture

How It Works
  1. A function is annotated with an HTTP verb annotation (e.g., @Get("/path"))
  2. The TLPP REST Server automatically registers the route at startup via annotation scanning
  3. When a request matches the route, the annotated function is invoked
  4. The function uses the global oRest object to read the request and write the response
  5. Swagger/OpenAPI documentation is generated automatically from the annotations
Available Annotations
AnnotationHTTP VerbTypical Use
@Get("endpoint")GETRetrieve resource(s)
@Post("endpoint")POSTCreate a new resource
@Put("endpoint")PUTFull update of a resource
@Patch("endpoint")PATCHPartial update of a resource
@Delete("endpoint")DELETERemove a resource

Annotation properties:

  • endpoint (required): The URI path for the route
  • description (optional): Description shown in Swagger docs
tlpp
// Minimal form (endpoint only)
@Get("/api/v1/customers")

// Full form (named properties)
@Get(endpoint="/api/v1/customers", description="List all customers")

The oRest Object

The oRest object is a global object available inside any annotated REST function. It provides all methods for reading requests and writing responses.

Request Methods
MethodReturnsDescription
oRest:getQueryRequest()JsonQuery string parameters (?key=value)
oRest:getBodyRequest()CharacterRaw request body as string
oRest:getPathParamsRequest()JsonPath parameters (e.g., :id)
oRest:getHeaderRequest()JsonAll request headers
oRest:getClientIP()CharacterClient IP address
Response Methods
MethodParametersDescription
oRest:setResponse(cBody)CharacterSet response body (concatenates if called multiple times)
oRest:setStatusResponse(nCode, cBody)Numeric, CharacterSet HTTP status code and body; returns Logical
oRest:setKeyHeaderResponse(cKey, cValue)Character, CharacterSet a response header
oRest:updateKeyHeaderResponse(cKey, cValue)Character, CharacterUpdate an existing response header
oRest:resetResponse()—Clear the response body
oRest:getBodyResponse()—Get current response body
Path Parameters

Use :paramName syntax in the endpoint path to define path parameters:

tlpp
@Get("/api/v1/customers/:id")
User Function getCustomer() as Logical
  Local jPathParams := oRest:getPathParamsRequest() as Json
  Local cId := jPathParams["id"] as Character
  // ...
Return oRest:setStatusResponse(200, cResponse)

Bundled Reference Files

This skill uses progressive disclosure. The SKILL.md body covers the architecture, decision logic, and the generation checklist. Detailed endpoint templates, TTALK standards, and troubleshooting are in the references/ directory — read them on demand based on the scenario:

Reference FileWhen to ReadContent
references/tlpp-rest-endpoint-templates.mdGenerating any CRUD endpoint — GET list (paginated), GET by ID, POST, PUT, or DELETEFull code templates for all 5 HTTP verbs, shared helper functions (BuildErrorResponse, BuildValidationErrorResponse)
references/ttalk-standards-and-configuration.mdChecking TTALK response formats, HTTP status codes, REST server appserver.ini configuration, or debugging endpoint issuesTTALK collection/error JSON formats, pagination query parameters, status code table, appserver.ini REST section, troubleshooting guide

Also refer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference shared across skills.


Endpoint Generation Workflow

Step 1: Gather Requirements

Determine from the user's request:

  • Which HTTP verb(s) to generate (GET, POST, PUT, PATCH, DELETE, or full CRUD)
  • The target Protheus entity/table (e.g., SA1 = Customers, SA2 = Suppliers)
  • The endpoint base path (e.g., /api/v1/customers)
  • Whether TTALK-compliant pagination is needed (collection endpoints)
Show full SKILL.md (341 more words)Show less
Step 2: Load Templates

Read references/tlpp-rest-endpoint-templates.md for the code templates matching the required verb(s). Adapt the templates to the target entity by replacing table aliases, field names, and namespace.

Step 3: Apply TTALK Standards

For TOTVS-ecosystem APIs, read references/ttalk-standards-and-configuration.md to ensure responses follow the standard collection format, error model, and HTTP status codes.

Step 4: Validate Against Checklist

Use the checklist below to verify the generated code covers all requirements.


Endpoint Generation Checklist

Structure
  • #include "tlpp-core.th" is the first include
  • Namespace declaration matches project convention
  • User Function name is descriptive and uses camelCase
  • HTTP verb annotation matches the operation semantics
  • Endpoint path follows RESTful conventions (/api/v1/{resource})
  • Path parameters use :paramName syntax
Request Handling
  • Body parsed and validated for POST/PUT/PATCH
  • Path parameters extracted via oRest:getPathParamsRequest()
  • Query parameters extracted via oRest:getQueryRequest()
  • Input sanitized before use in SQL queries (FWExecStatement)
Response
  • Content-Type header set to application/json
  • Correct HTTP status code used
  • Success response follows TTALK format
  • Error response follows TTALK error model
  • Collection endpoints include pagination (hasNext, items, remainingRecords)
Data Access
  • Workarea positioned correctly before read/write
  • Database locks acquired with RecLock() and released with MsUnlock()
  • D_E_L_E_T_ filter always included in queries
  • Branch filter (FWxFilial) always included
  • Temporary aliases closed with DBCloseArea()
  • SQL injection prevented (FWExecStatement)
Error Handling
  • Try-Catch wraps database operations
  • Errors logged with FWLogMsg() including function context
  • Error responses use TTALK error format
  • Lock failures handled gracefully
Security
  • Authentication verified (if applicable)
  • Authorization checked for the operation
  • Input validated against expected types and ranges
  • No sensitive data in error messages
SonarQube Compliance
  • No RpcSetEnv / RpcSetType calls in REST endpoint functions — use REST Server PrepareIn configuration instead
  • No assignment to __cUserID or cEmpAnt — these are protected system variables
  • No StaticCall() — use FWLoadModel(), FWLoadMenuDef(), or namespace-based calls
  • No hardcoded passwords or credentials in source code
  • FWExecStatement used for all queries with dynamic parameters
  • Logging via FWLogMsg(), not ConOut()
  • No IIF() — use If/Else/EndIf blocks
  • GetMV() / ExistBlock() calls moved outside of loops
  • No UI functions (MsgAlert, MsgYesNo, Aviso, Help) inside transaction-scoped handlers
  • Includes in lowercase (e.g., #include "totvs.ch")

Refer to references/sonarqube-rules-reference.md for the complete SonarQube rules reference.

© totvs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/advpl-tlpp/tlpp-rest-endpoint-generator of totvs/engpro-advpl-tlpp-skills.

  • SKILL.md
  • references/tlpp-rest-endpoint-templates.md
  • references/ttalk-standards-and-configuration.md

Open the folder on GitHubat commit 3908e4e

Compare with similar skills

Tlpp REST Endpoint Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tlpp REST Endpoint Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tlpp REST Endpoint Generator this skilltotvs/engpro-advpl-tlpp-skills143—~2.4kAutomated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT
Old Coder API DesignAmazingAng/old-coder749—~3.4kAutomated safety check: PassMIT
API CallerNVIDIA/SkillEvaluator552—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub stars~3.4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • API Caller

    NVIDIA/SkillEvaluator

    Official

    Call any REST API dynamically. An agent skill from NVIDIA/SkillEvaluator.

    552 GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from totvs/engpro-advpl-tlpp-skills

All 19 skills in this repo
  • AdvPL UTF-8 to CP1252 Converter

    totvs/engpro-advpl-tlpp-skills

    Converts AdvPL and TLPP source files from UTF-8 to Windows-1252 in place after code generation, because the Protheus compiler accepts only CP1252 files.

    143 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • AdvPL/TLPP Compile in VS Code

    totvs/engpro-advpl-tlpp-skills

    Compiles AdvPL and TLPP sources from VS Code with the TOTVS Developer Studio extension, handling server setup, connection and compile result reporting.

    143 GitHub stars~3.7k tokensUpdated 4 days ago
    Auto-check passed
  • Protheus Spec-Driven Development

    totvs/engpro-advpl-tlpp-skills

    Plans and builds Protheus AdvPL/TLPP features through Specify, Design, Tasks and Execute phases whose depth scales with the size of the change.

    143 GitHub stars~3.6k tokensUpdated 4 days ago
    Auto-check passed
  • AdvPL and TLPP Code Review

    totvs/engpro-advpl-tlpp-skills

    Reviews AdvPL and TLPP source against SonarQube rules, ProtheusDOC requirements, security, performance and Protheus conventions, and reports findings by severity.

    143 GitHub stars~2.5k tokensUpdated 4 days ago
    Auto-check passed
  • Protheus Data Dictionary Lookup

    totvs/engpro-advpl-tlpp-skills

    Queries the TOTVS Protheus ERP data dictionary for tables, fields, indexes, parameters, triggers and lookups, including impact checks during refactoring.

    143 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check passed
  • Protheus MVC Generator

    totvs/engpro-advpl-tlpp-skills

    Generates Protheus MVC screens in ADVPL/TLPP, with ModelDef, ViewDef, MenuDef and Browse functions for single-entity and master-detail layouts.

    143 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Tlpp REST Endpoint Generator

What does Tlpp REST Endpoint Generator do?

Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object. Tlpp REST Endpoint Generator is an agent skill from totvs/engpro-advpl-tlpp-skills. Generate TLPP REST endpoints using annotation-based routing (@Get, @Post, @Put, @Patch, @Delete) with the oRest object.

When should I use Tlpp REST Endpoint Generator?

Tlpp REST Endpoint Generator fits situations like: user says create REST endpoint; @Get annotation.

How do I install Tlpp REST Endpoint Generator in Claude Code?

Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator -a claude-code`. Or copy the skill folder (skills/advpl-tlpp/tlpp-rest-endpoint-generator in totvs/engpro-advpl-tlpp-skills) into .claude/skills/tlpp-rest-endpoint-generator in your project. Claude Code loads it when a task matches its description.

How do I install Tlpp REST Endpoint Generator in Codex?

Run `npx skills add totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator -a codex`. Or copy the skill folder (skills/advpl-tlpp/tlpp-rest-endpoint-generator in totvs/engpro-advpl-tlpp-skills) into .agents/skills/tlpp-rest-endpoint-generator in your project. Codex loads it when a task matches its description.

Can I use Tlpp REST Endpoint Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tlpp-rest-endpoint-generator, .gemini/skills/tlpp-rest-endpoint-generator, .github/skills/tlpp-rest-endpoint-generator and .opencode/skills/tlpp-rest-endpoint-generator in your project.

What does Tlpp REST Endpoint Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Tlpp REST Endpoint Generator is instructions for the agent only.

Does Tlpp REST Endpoint Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tlpp REST Endpoint Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tlpp REST Endpoint Generator use?

Tlpp REST Endpoint Generator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tlpp REST Endpoint Generator use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Tlpp REST Endpoint Generator?

Skills that share tags, products or a category with Tlpp REST Endpoint Generator: OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars), Use Yaak (mountain-loop/yaak, 19k stars), API Designer (Jeffallan/claude-skills, 12k stars) and Old Coder API Design (AmazingAng/old-coder, 749 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tlpp REST Endpoint Generator?

totvs (a GitHub organization) maintains it in totvs/engpro-advpl-tlpp-skills, which has 143 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.

Source: totvs/engpro-advpl-tlpp-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.