/sap-abap:reverse-engineerfrom sap-abap
Explain how existing SAP ABAP code works or why it fails, by finding the entry point (transaction, report, BAdI, user exit, RFC, batch job) and following the call chain, data flow and where-used, with a Mermaid diagram and evidence from the code. Use when someone asks "how does X work", "where is this field filled", "why does Y happen", "what calls this function module", "what does this Z program do", "trace this transaction", "which BAdI changes this value", or needs to understand legacy code before a change, a refactor or a bugfix. Read-only, never changes code. Not for writing documentation for others (use documentation) and not for fixing the bug (use bugfix).
Ships in sap-abap. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Answer "how does this work" and "why does this happen" with evidence from the code, not from general SAP knowledge. Custom SAP systems are full of user exits, BAdIs, enhancements and copied programs; a confident answer from memory is often wrong. Every claim in the answer points to a program, include and line.
Say which setup you are using; it decides how far the trace can go.
1. Pin the question. Restate it as one sentence with an observable behaviour: "Why does field X on screen Y show value Z for document type A?" If it is vague, ask one question to sharpen it.
2. Find the entry point. Transaction (SE93), report, BAdI or enhancement spot, user exit, RFC-enabled function module, IDoc process code, batch job step (SM37) or workflow. Name it with the program and include.
3. Follow the chain. Walk from the entry point to where the behaviour happens. Record each hop: caller, callee, include and line, and what data passes. Include implicit hops that are easy to miss: active BAdI implementations, implicit enhancements, user exits (CMOD/SMOD), update task function modules, field symbols changed by reference.
4. Draw the data flow. One Mermaid diagram (sequence or flowchart) from entry point to the behaviour. Keep it to the hops that matter, under about 15 nodes.
5. For a "why" question, rank the causes. List likely causes in order, each with the code lines that support it and what would rule it out. Then STOP: a person confirms the cause in the debugger (breakpoint at the lines you name) before anyone fixes anything.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub marian-kamenistak/sap-ai-skills --plugin sap-abap10 skills in this plugin
/bugfixFix a bug in SAP ABAP code from a Jira bug, an ST22 short dump, an error message or an application log, by tracing the call chain back to the cause, proving it with the code, writing a test that reproduces it and then the smallest fix. Use when someone shares a short dump (runtime error, exception, CX_ class), says "this report crashes", "fix this dump", "wrong value after save", "job fails every night", "users get error message X", "why does this BAdI fail", or a production incident lands in DEV for a fix. Not for unclear new requirements (use spec-grill), not for cleanup without a defect (use refactor)./cds-rewriteRewrite the data logic of an ABAP report, class or function module into CDS view entities, with tests that prove the output is unchanged and a runtime comparison before and after. Use when a Z program reads data with SELECTs inside loops, FOR ALL ENTRIES, nested SELECTs, or builds joins, filters and totals in ABAP; when someone asks to "move this to CDS", "code pushdown", "make this report faster on HANA", "modernize this report", "replace these SELECTs with a view", or prepares a report for Fiori, RAP or an OData API. Not for update logic (INSERT/UPDATE/MODIFY), not for pure UI changes, not for objects outside the customer namespace./code-reviewReview SAP ABAP code in a transport, package, diff or exported files, using ATC findings as the base plus a checklist for Clean ABAP, security (missing AUTHORITY-CHECK, SQL injection), performance on HANA (SELECT in loops, SELECT *, FOR ALL ENTRIES with an empty table) and the team's naming rules, with a severity and a proposed fix per finding. Use when someone asks to "review this transport", "review my ABAP", "check this code before release", "is this ready for QAS", "code review this diff", "what's wrong with this program", or before transport-release. Not for fixing the findings (the author decides; use refactor or implement), not for reviewing SAP standard code./documentationWrite technical documentation for an SAP ABAP object or package from the code itself, covering purpose, inputs and outputs, tables read and written, who calls it and what it calls, a Mermaid sequence diagram and known risks, as Markdown for Confluence or a Jira ticket. Use when someone asks to "document this class", "write docs for this Z program", "explain this package for the wiki", "write a technical spec from the code", "onboarding doc for this interface", "what does this function module do, written up", or after implement or transport-release. Not for answering a one-off "how does it work" question (use reverse-engineer), not for writing a functional specification (use spec-grill)./implementBuild a new SAP ABAP feature from an approved specification to activated, tested code in DEV assigned to a transport, with two technical options for a person to choose from and ABAP Unit tests for each acceptance criterion. Use when someone says "implement this ticket", "build this", "develop this change", "add this field / check / output to the Z program", "write the BAdI implementation", "create the class for this spec", or hands over a spec that scored 8/10 or more in spec-grill. Not for unclear tickets (run spec-grill first), not for bugs (use bugfix), not for restructuring old code without new behaviour (use refactor)./refactorRefactor legacy SAP ABAP code in small, tested steps toward Clean ABAP without changing behaviour, starting with characterization tests that pin down today's output. Use when someone asks to "clean up this program", "refactor this Z report", "make this testable", "split this huge method", "replace FORM routines with a class", "modernize the syntax", "remove duplicated code", "this code is unreadable", or prepares old code for a change. Not for new behaviour (use implement), not for moving data reads into CDS views (use cds-rewrite), not for fixing a known bug (use bugfix).