advpl-refactoring

advpl-refactoring is a skill for Claude Code from thalysjuvenal/advpl-specialist. It costs 125 tokens per session (421 once invoked), scanned A, original, MIT.

A guide for restructuring existing ADVPL or TLPP code used with TOTVS Protheus while keeping its behavior unchanged. ADVPL and TLPP are programming languages used in that business-software platform.

In plain words
What is it for?
It is for extracting long functions, simplifying nested conditions, removing dead code, improving names, reducing duplication, and handling too many function parameters.
Why use it?
It helps make complicated or repetitive code easier to read and maintain without changing what the program does.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the advpl-specialist plugin — 18 skills, 14 commands, 2 hooks shipped together

Good fit It is for extracting long functions, simplifying nested conditions, removing dead code, improving names, reducing duplication, and handling too many function parameters.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thalysjuvenal/advpl-specialist/advpl-refactoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thalysjuvenal/advpl-specialist --skill advpl-refactoring
Clone the repo
git clone --depth 1 https://github.com/thalysjuvenal/advpl-specialist

Made for: Claude Code.

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 advpl-refactoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/advpl-refactoring/github.svg)](https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/advpl-refactoring)
Your own site
<a href="https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/advpl-refactoring"><img src="https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/advpl-refactoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for advpl-refactoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/thalysjuvenal/advpl-specialist/advpl-refactoring"><img src="https://agentmods.dev/badge/skills/thalysjuvenal/advpl-specialist/advpl-refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 421 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00125 $0.00421
Opus 5 $0.00063 $0.00211
Sonnet 5 $0.00025 $0.00084
Haiku 4.5 $0.00013 $0.00042

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

Security

Grade A, and why

advpl-refactoring 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 11d 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.

skills/advpl-refactoring/SKILL.md · 15 lines

What it actually says

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 file Read when
reference.md Always -- the only file in this skill; contains all refactoring patterns (RF-001 to RF-006), the refactoring process, and safety rules
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 15 lines · 125 tokens per session scan A e92ed263e554

Subscribe to this mod's changes

advpl-refactoring is a skill published in the GitHub repository thalysjuvenal/advpl-specialist (186 stars, last pushed 21d ago), licensed MIT. It adds 125 tokens to every session and 421 once invoked, about $0.0006 per session on Opus 5. 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.