/explain
Explain ADVPL/TLPP code in plain language for developers and functional consultants
> /plugin marketplace add thalysjuvenal/advpl-specialist > /plugin install advpl-specialist@advpl-specialist-marketplace
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/explain
Context preview
What this command does when you run it.
Explain ADVPL/TLPP code in plain language for developers and functional consultants
Command definition
explain.mddescription: Explain ADVPL/TLPP code in plain language for developers and functional consultants
allowed-tools: Read, Glob, Grep, Bash, Agent
argument-hint: "<file|code> [--level junior|senior|funcional]"
**IMPORTANT:** Always respond in the same language the user is writing in. If the user writes in Portuguese, respond in Portuguese. If in English, respond in English.
/advpl-specialist:explain
Explain ADVPL/TLPP code in plain language, adapted to the audience level.
Usage
/advpl-specialist:explain <target> [--level level]
Levels
| Level | Audience | Output | |-------|----------|--------| | `junior` | Dev iniciante | Explicacao detalhada, linha por linha, sem assumir conhecimento previo | | `senior` | Dev experiente | Resumo focado na logica de negocio e decisoes de design | | `funcional` | Consultor funcional | Explicacao sem termos tecnicos, foco no impacto no negocio |
If `--level` is not provided, default to `junior`.
Process
1. **Parse arguments** — Identify target file/snippet and level 2. **Load explanation reference** — Read `skills/code-explanation/reference.md` 3. **Read target code** — Read the file or interpret the snippet 4. **Load supporting references** — Read `skills/protheus-reference/reference.md`, `skills/protheus-business/reference.md`, `skills/embedded-sql/reference.md` as needed 5. **Analyze code** — Identify structure, functions, variables, DB operations, business rules 6. **Generate explanation** — Follow the level-appropriate structure from the reference 7. **Present result** — Clear, structured explanation in the user's language
Examples
# Explain code for a junior developer (default)
/advpl-specialist:explain src/MATA461.prw
# Explain for a functional consultant
/advpl-specialist:explain src/CustomFaturamento.prw --level funcional
# Explain for a senior developer
/advpl-specialist:explain src/JobProcessaNF.tlpp --level senior
# Explain a specific function
/advpl-specialist:explain src/Utils.prw::fCalcDesconto
Output
Structured explanation adapted to the audience:
- **Junior:** Objective, includes, variables, step-by-step flow, native functions used, tables, warnings
- **Senior:** Objective, business logic, tables, dependencies, risks
- **Funcional:** What it does, when it runs, what data it reads/changes, business rules, module impact
Read more
description: Explain ADVPL/TLPP code in plain language for developers and functional consultants allowed-tools: Read, Glob, Grep, Bash, Agent argument-hint: "<file|code> [--level junior|senior|funcional]"
**IMPORTANT:** Always respond in the same language the user is writing in. If the user writes in Portuguese, respond in Portuguese. If in English, respond in English.
/advpl-specialist:explain
Explain ADVPL/TLPP code in plain language, adapted to the audience level.
Usage
/advpl-specialist:explain <target> [--level level]
Levels
| Level | Audience | Output | |-------|----------|--------| | `junior` | Dev iniciante | Explicacao detalhada, linha por linha, sem assumir conhecimento previo | | `senior` | Dev experiente | Resumo focado na logica de negocio e decisoes de design | | `funcional` | Consultor funcional | Explicacao sem termos tecnicos, foco no impacto no negocio |
If `--level` is not provided, default to `junior`.
Process
1. **Parse arguments** — Identify target file/snippet and level 2. **Load explanation reference** — Read `skills/code-explanation/reference.md` 3. **Read target code** — Read the file or interpret the snippet 4. **Load supporting references** — Read `skills/protheus-reference/reference.md`, `skills/protheus-business/reference.md`, `skills/embedded-sql/reference.md` as needed 5. **Analyze code** — Identify structure, functions, variables, DB operations, business rules 6. **Generate explanation** — Follow the level-appropriate structure from the reference 7. **Present result** — Clear, structured explanation in the user's language
Examples
# Explain code for a junior developer (default) /advpl-specialist:explain src/MATA461.prw # Explain for a functional consultant /advpl-specialist:explain src/CustomFaturamento.prw --level funcional # Explain for a senior developer /advpl-specialist:explain src/JobProcessaNF.tlpp --level senior # Explain a specific function /advpl-specialist:explain src/Utils.prw::fCalcDesconto
Output
Structured explanation adapted to the audience:
- **Junior:** Objective, includes, variables, step-by-step flow, native functions used, tables, warnings
- **Senior:** Objective, business logic, tables, dependencies, risks
- **Funcional:** What it does, when it runs, what data it reads/changes, business rules, module impact
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Other commands on advpl-specialist.
- /advpr
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento, webservice, Smart View, TOTVS Message e SmartLink
Open command - /diagnose
Diagnose errors and problems in ADVPL/TLPP code - compilation errors, runtime errors, performance issues, and log analysis
Open command - /docs
Look up Protheus documentation - native functions, SX data dictionary, REST APIs, MV parameters, and framework reference
Open command - /document
Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
Open command - /generate
Generate ADVPL/TLPP code - functions, classes, MVC structures, REST APIs, Web Services, and entry points for TOTVS Protheus
Open command - /migrate
Migrate ADVPL procedural code to TLPP object-oriented code with classes, namespaces, and modern patterns
Open command

