advpr
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento,…
Refactor ADVPL/TLPP code - extract functions, simplify logic, remove dead code, improve naming
> /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.
/refactorContext preview
What this command does when you run it.
Refactor ADVPL/TLPP code - extract functions, simplify logic, remove dead code, improve naming
description: Refactor ADVPL/TLPP code - extract functions, simplify logic, remove dead code, improve naming allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent, WebSearch, WebFetch argument-hint: "<file> [--dry-run]"
**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.
Analyze and refactor ADVPL/TLPP code to improve structure without changing behavior.
/advpl-specialist:refactor <target> [options]
| Flag | Description | Default | |------|------------|---------| | `--dry-run` | Show suggestions without applying changes | false |
| ID | Pattern | Risk | |----|---------|------| | RF-001 | Extract Function (>100 lines) | Low | | RF-002 | Simplify Conditionals (>3 levels) | Low | | RF-003 | Remove Dead Code | Low | | RF-004 | Improve Naming (Hungarian notation) | Low | | RF-005 | Eliminate Duplication | Medium | | RF-006 | Reduce Parameters (>5 params) | Medium |
**MANDATORY: Always enter planning mode before applying changes. Never refactor without approval.**
1. **Parse arguments** — Identify target file(s) and flags 2. **Load refactoring reference** — Read `skills/advpl-refactoring/reference.md` 3. **Delegate to refactorer agent** — Pass target and options to the refactorer agent 4. **Present plan** — Structured list of refactorings with before/after for each 5. **Wait for approval** — User must approve before changes are applied 6. **Apply changes** — One refactoring at a time (unless --dry-run) 7. **Report** — Summary of changes applied
# Refactor a source file (interactive, with approval) /advpl-specialist:refactor src/FATA001.prw # Show suggestions without applying /advpl-specialist:refactor src/FATA001.prw --dry-run # Refactor all files in a directory /advpl-specialist:refactor src/
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento,…
Diagnose errors and problems in ADVPL/TLPP code - compilation errors, runtime errors, performance issues, and log analysis
Look up Protheus documentation - native functions, SX data dictionary, REST APIs, MV parameters, and framework reference
Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
Explain ADVPL/TLPP code in plain language for developers and functional consultants
Generate ADVPL/TLPP code - functions, classes, MVC structures, REST APIs, Web Services, and entry points for TOTVS Protheus