mcpField
A
advpl-refactoring

advpl-refactoring

github.com/thalysjuvenalDevelopment19148 installsUpdated 6w ago
Repository

About advpl-refactoring

advpl-refactoring is a skill for restructuring working ADVPL/TLPP code while preserving its behavior. It offers six refactoring patterns and a review-and-approval process that applies changes one at a time with verification.

Key features

  1. 01Six behavior-preserving patterns
  2. 02Function extraction
  3. 03Guard clauses and simpler conditionals
  4. 04Dead-code removal and clearer naming
  5. 05Duplication and parameter reduction
  6. 06Approval and verification process

Use cases

  1. 01Restructuring long functions
  2. 02Reducing deeply nested conditionals
  3. 03Clarifying names and removing dead code
  4. 04Consolidating duplicated code safely

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thalysjuvenal/advpl-specialist --skill advpl-refactoring

After installing, type/advpl-refactoringin Claude Code to confirm it loaded.

Bundled filesreference.md

Details

From the project README

ADVPL/TLPP Refactoring

This skill defines safe refactoring patterns (RF-001 through RF-006) for improving ADVPL/TLPP code structure without altering behavior: extract function, simplify conditionals with guard clauses, remove dead code, improve naming to Hungarian notation, eliminate duplication, and reduce function parameter count. It also defines the mandatory process -- analyze, prioritize, present a before/after plan, wait for user approval, apply one change at a time, verify -- and hard safety rules (never change business logic, never rename externally-used symbols without a caller check).

Activate this skill when the user wants existing, working code restructured for readability or maintainability: long functions, deep nesting, unclear names, copy-pasted blocks, or functions with excessive parameters. It does not cover fixing bugs or errors (see advpl-debugging), generating brand-new functionality (see advpl-code-generation), a formal quality/security audit (see advpl-code-review), or converting procedural .prw to object-oriented .tlpp (see advpl-to-tlpp-migration, which is a structural paradigm change rather than a behavior-preserving cleanup).

Reference fileRead when
reference.mdAlways -- the only file in this skill; contains all refactoring patterns (RF-001 to RF-006), the refactoring process, and safety rules

Comments

Markdown supported