← ClaudeAtlas

refactorlisted

Refactor existing ABAP code to Clean ABAP style without changing behavior. Use when the user asks to refactor, clean up, modernize, or tidy ABAP code. Applies the rule set in ../CLAUDE.md in deterministic passes (naming, declaration, expression, method shape, error, class) and asks before writing back via MCP. Targets modern ABAP only — BTP ABAP Environment or S/4HANA on-prem in the ABAP Cloud development model.
matt1as/claude-abap-skills · ★ 9 · Code & Development · score 77
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. - A code block pasted into the conversation (the most reliable path today) - An ABAP object name — only works if a community MCP exposes source reads. The official `SAPSE.adt-vscode` 1.0 MCP does not. - A package name — only works with a community MCP that exposes repository search and source reads. Refactor object by object, never as a single bulk change. If only the official MCP is connected, ask the user to paste the source from ADT in VS Code; then paste the refactored version back manually. ## Procedure 1. **Load the rule set.** Read every `## RULE:` block in `../CLAUDE.md`. Those are the only refactoring targets. 2. **Get the source.** If pasted inline, use it. If only an object name was given, attempt source-read via whichever MCP is connected; if no MCP exposes source reads, ask the user to paste it from ADT. The official `SAPSE.adt-vscode` 1.0 MCP does not have a source-read tool. 3. **Run the review first.** Internally, perform the same analysis as `/clean-a