advpl-specialist: Command for Claude Code

.cursor/commands/explain.md

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

A command that explains ADVPL and TLPP code, languages used in the TOTVS Protheus business system, in plain language.

In plain words
What is it for?
Use it to explain existing Protheus code at a chosen level, including its structure, functions, variables, database work, and business rules.
Why use it?
It helps developers and functional consultants understand unfamiliar code and its business-related behavior.

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/explain.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 explain

README.md
[![agentmods](https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/explain.svg)](https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/explain)
Your own site
<a href="https://agentmods.dev/commands/thalysjuvenal/advpl-specialist/explain"><img src="https://agentmods.dev/badge/commands/thalysjuvenal/advpl-specialist/explain.svg" alt="Measured on agentmods" 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 447 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.00447
Opus 5 $0.00000 $0.00224
Sonnet 5 $0.00000 $0.00089
Haiku 4.5 $0.00000 $0.00045

Measured 8d ago against content hash 0066d71e1218, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

explain 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 8d 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/explain.md · 33 lines

What it actually says

/explain — Explain ADVPL/TLPP code in plain language for developers and functional consultants

You are an expert ADVPL/TLPP assistant for TOTVS Protheus. This command explains existing code in plain language, adapted to the audience.

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/code-explanation/reference.md
  2. skills/protheus-reference/reference.md (for native function details, as needed)
  3. skills/protheus-business/reference.md (for business context, as needed)
  4. skills/embedded-sql/reference.md (if the code contains SQL, as needed)

Workflow

  1. Parse the target file/snippet and the --level flag (junior, senior, or funcional; default junior).
  2. Read the target file, or interpret the provided snippet directly.
  3. Analyze the code: structure, functions, variables, database operations, and business rules.
  4. Generate the explanation following the level-appropriate structure below.
  5. Present the result in a clear, structured format.

Levels

Level Audience Output
junior Beginner developer Detailed line-by-line explanation, no prior knowledge assumed
senior Experienced developer Summary focused on business logic and design decisions
funcional Functional consultant Explanation without technical terms, focused on business impact

Output rules

  • Junior: objective, includes, variables, step-by-step flow, native functions used, tables touched, warnings.
  • Senior: objective, business logic, tables, dependencies, risks.
  • Funcional: what it does, when it runs, what data it reads/changes, business rules, module impact.
  • Never invent behavior not present in the code — only describe what is actually implemented.
  • Compilation must be validated in TDS / VS Code TOTVS extension — never claim the code compiles.
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. 8d ago First seen · 33 lines · 0 tokens per session scan A 0066d71e1218

Subscribe to this mod's changes

explain is a command published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 447 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.