From advpl-specialist
Reviews ADVPL/TLPP code for TOTVS Protheus covering best practices, performance, security, and modernization. Maps findings to TOTVS SonarQube ruleset.
How this skill is triggered — by the user, by Claude, or both
Slash command
/advpl-specialist:advpl-code-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides a systematic code review methodology for existing ADVPL/TLPP code, producing findings tagged with a rule ID (`BP-*`, `PERF-*`, `SEC-*`, `MOD-*`), a severity (CRITICAL/WARNING/INFO), the file/line, the issue, and the fix. It covers four review categories: best practices, performance, security, and modernization, and can map findings to the official TOTVS SonarQube quality gate.
This skill provides a systematic code review methodology for existing ADVPL/TLPP code, producing findings tagged with a rule ID (BP-*, PERF-*, SEC-*, MOD-*), a severity (CRITICAL/WARNING/INFO), the file/line, the issue, and the fix. It covers four review categories: best practices, performance, security, and modernization, and can map findings to the official TOTVS SonarQube quality gate.
Activate this skill when the user wants existing code inspected for quality, compliance, security, or performance issues -- e.g. before a merge, before a deploy, during an onboarding audit, or when assessing migration readiness from .prw to .tlpp. It does not cover generating new code (see advpl-code-generation), diagnosing a specific runtime/compilation error (see advpl-debugging), restructuring code without adding features (see advpl-refactoring), or performing the actual .prw to .tlpp conversion (see advpl-to-tlpp-migration).
| Reference file | Read when |
|---|---|
| reference.md | Always -- review categories, output format, severity levels, review process, rule ID prefixes |
| rules-best-practices.md | Checking RecLock/MsUnlock pairing, variable scope, area management, error handling, documentation (BP-* rules) |
| rules-performance.md | Checking Embedded SQL efficiency, loop efficiency, string operations, index usage (PERF-* rules) |
| rules-security.md | Checking SQL injection, input validation, credential exposure, sensitive data logging (SEC-* rules) |
| rules-modernization.md | Checking TLPP migration candidates, namespace usage, OOP patterns, modern UI frameworks (MOD-* rules) |
| sonarqube-rules-catalog.md | Aligning findings with the official TOTVS SonarQube ruleset (groups G1-G5, CA/BG/CS codes) |
npx claudepluginhub thalysjuvenal/advpl-specialist --plugin advpl-specialistApplies 38 automated code review rules for ADVPL/TLPP sources using regex, AST, and cross-file analysis. Use after generating/editing ADVPL code, before marking tasks complete, or when asked to review code.
Refactors ADVPL/TLPP code on TOTVS Protheus: extracts long functions, simplifies conditionals, removes dead code, improves naming, eliminates duplication, reduces parameters. Safe, behavior-preserving restructures.
Analyzes Delphi source code in a folder to generate professional technical reports. Helps with code audits, quality assessments, and migration planning.