advpl-specialist: Command for Claude Code

.cursor/commands/generate.md

generate is a command for Claude Code, Cursor from thalysjuvenal/advpl-specialist. It costs 0 tokens per session (961 once invoked), scanned A, original, MIT.

A command for generating ADVPL or TLPP source code for TOTVS Protheus, an enterprise business software platform. It covers requested code types such as MVC structures, REST APIs, web services, reports, jobs, workflows, classes, and entry points.

In plain words
What is it for?
Use it to generate Protheus functions, classes, MVC code, REST APIs, web services, reports, jobs, workflows, or entry points according to the selected pattern.
Why use it?
It reduces the need to remember Protheus-specific naming, includes, namespaces, limits, and code patterns when starting new source files.

Command for Claude CodeCursor

Written for Claude Code and Cursor: shipped in a Claude Code plugin, but also installed under .cursor/.

This is thalysjuvenal/advpl-specialist's own configuration. It tells Claude Code and Cursor how to work on advpl-specialist itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything advpl-specialist configures →

Part of the advpl-specialist plugin — 18 skills, 14 commands, 2 hooks shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to thalysjuvenal/advpl-specialist. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/thalysjuvenal/advpl-specialist/main/.cursor/commands/generate.md
Clone the repo
git clone --depth 1 https://github.com/thalysjuvenal/advpl-specialist

Made for: Claude Code, Cursor.

Or install advpl-specialist, the plugin that ships this one along with the rest of its 18 skills, 14 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate

README.md
[![agentmods](https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/generate/github.svg)](https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/generate)
Your own site
<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/generate"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/generate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate

Your own site · 80×15
<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/generate"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00961
Opus 5 $0.00000 $0.00481
Sonnet 5 $0.00000 $0.00192
Haiku 4.5 $0.00000 $0.00096

Measured 10d ago against content hash 0fc15733c15b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/generate.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/generate — Generate ADVPL/TLPP code for functions, classes, MVC structures, REST APIs, web services, and entry points on TOTVS Protheus

You are an expert ADVPL/TLPP assistant for TOTVS Protheus. This command generates new ADVPL or TLPP source code following Protheus conventions.

Knowledge to load first

Locate the advpl-specialist skills (installed via npx skills add thalysjuvenal/advpl-specialist; in this repository they live under skills/) and read, in order:

  1. skills/advpl-code-generation/reference.md (naming, includes, TLPP namespace rules, identifier length limits)
  2. The pattern file matching the requested type:
Type Pattern file
mvc skills/advpl-code-generation/patterns-mvc.md
rest skills/advpl-code-generation/patterns-rest.md
webservice skills/advpl-code-generation/patterns-soap.md
treport skills/advpl-code-generation/patterns-treport.md / patterns-fwmsprinter.md
fwformbrowse skills/advpl-code-generation/patterns-fwformbrowse.md
job skills/advpl-code-generation/patterns-jobs.md
workflow skills/advpl-code-generation/patterns-workflow.md
class skills/advpl-code-generation/templates-classes.md
ponto-entrada skills/advpl-code-generation/patterns-pontos-entrada.md (or patterns-pontos-entrada-mvc.md for MVC entry points); check skills/advpl-code-generation/catalogo-top-50-pes.md first for known PARAMIXB metadata, then skills/tdn-lookup/reference.md as fallback

Workflow

  1. Parse type, name, and flags (--module, --lang, --output) from the request.
  2. Do not scan the user's project source tree looking for patterns — this command is template-driven; only read the plugin's own skill files above, plus any single file the user explicitly references.
  3. If name or --module is missing, ask the user before proceeding.
  4. Validate identifier length: User Function in .prw must be ≤ 8 chars, Static Function ≤ 10 chars, TLPP with namespace up to 255 chars. If too long, offer either a shortened name or switching to TLPP with a namespace.
  5. For .tlpp output, derive namespace custom.<agrupador>.<servico> from --module (agrupador) and the service/class name; ask for the agrupador if --module is absent.
  6. For ponto-entrada, resolve PARAMIXB, return type, calling routine, and execution moment from the catalog first, then TDN.
  7. Draft a plan: files to create, function keyword for each routine (User Function, Static Function, or Method ... Class — never bare Function), namespace line (if TLPP), includes, error handling and DB-area save/restore approach. Present it and wait for approval before writing code.
  8. After approval, generate the complete source file and save it to the current directory (or --output path).
  9. Report what was created and the key decisions made.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 41 lines · 0 tokens per session scan A 0fc15733c15b

Subscribe to this mod's changes

generate is a command published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 19d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 961 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.