refactorlisted
Install: claude install-skill matt1as/claude-abap-skills
# clean-abap:refactor
Refactor existing ABAP code to conform to the Clean ABAP rule set in `../CLAUDE.md` (relative to this skill's directory).
## What this command does
You are refactoring ABAP source code to bring it into compliance with the Clean ABAP rule set. **Style and structure only — business logic stays identical.** If a change would alter what the code does, you do not make it; you flag it instead.
## Inputs
Accept any of the following. If nothing is provided, ask which target the user wants.
- An ABAP object name — read it with `arc-1` `SAPRead`
- A package name — enumerate with `arc-1` `SAPRead type=DEVC`, then refactor object by object, never as a single bulk change
- A code block pasted into the conversation — always works, and is the only path when no read-capable server is connected
**Tool routing.** Read the `## Tooling` section in `../CLAUDE.md` before the first tool call. The two halves of this skill land on different servers:
| Step | Primary | Fallback |
|---|---|---|
| Read the source | `arc-1` `SAPRead` | ask the user to paste it |
| Find callers before touching a signature | `arc-1` `SAPNavigate action="references"` | ask the user; if unknown, skip the change |
| Dry-run the refactored source | `arc-1` `SAPDiagnose action="syntax"` with `source` — validates without writing | skip, and rely on activation |
| Write back and activate | `abap-adt` `abap_creation-create_object`, `abap_activate_objects` | `arc-1` `SAPWrite` + `SAPActivate` when writ