/sc4sap:analyze-symptomfrom sc4sap
Performs structured root cause analysis for SAP operational incidents by connecting to the live SAP system through MCP. Collects evidence from dumps, system state, transports, and code call graphs before asking questions.
Ships in sc4sap. 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.
Read when SKILL.md points to them.
Offline profile (
common/offline-mode.md): degraded — dump text / source pasted by the user; no dump feed, no transports.
Performs structured root cause analysis for SAP operational incidents by connecting to the live SAP system through MCP. Auto-collects evidence from dumps, system state, recent transports, and code call graphs before asking the user any question — the one exception is an optional "do you already suspect a cause?" question in full mode, asked before evidence is read.
<Response_Prefix>
Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention.
</Response_Prefix>
<Target_Object>The target object is looked up on the active profile's system only. Not found → stop and ask per ../../common/multi-profile-artifact-resolution.md § Target object not on the active system — never substitute a similar name, never switch profiles on your own.</Target_Object>
<Phase_Banner>
Multi-phase skill. Before each Agent(...) dispatch, emit ▶ phase=<id> (<label>) · agent=<name> · model=<Opus|Sonnet|Haiku> per ../../common/model-routing-rule.md § Phase Banner Convention. Resolve the dispatch mode first per ../../common/model-dispatch-mode.md: auto (default) uses the model below/in the rule; user-defined asks the user Opus / Sonnet / Haiku (recommended one first) before each dispatch group.
</Phase_Banner>
<Use_When>
<Do_Not_Use_When>
/sc4sap:create-program or direct MCP Update* calls/sc4sap:analyze-code/sc4sap:create-object<Session_Trust_Bootstrap> MANDATORY — runs as Step 0 before any MCP call or user interaction.
Invoke /sc4sap:trust-session with parent_skill=sc4sap:analyze-symptom to pre-grant all MCP tool + file-op permissions for this session (eliminates per-tool "Allow this tool?" prompts during auto-investigation — RuntimeAnalyzeDump, ListTransports, GetWhereUsed, etc.).
Host: sc4sap-web) → skip entirely; the host governs permissions..sc4sap/session-trust.log already has a line within the last 24h, skip silently. Otherwise run it.Full spec: see ../trust-session/SKILL.md.
</Session_Trust_Bootstrap>
<Core_Principles>
full — never in quick-dump, on an escalation, or in a later round) and tested explicitly — CONFIRMED / REFUTED / NOT TESTABLE, as a separate verdict line not counted among the 2–3 hypotheses. See workflow-steps.md § Step 1.../../common/verification-evidence.md.<CUSTOMIZATION_DIR>/<MODULE>/{enhancements,extensions}.json (the path Step 1 resolves once — never search for it) and correlate — a Z* class in a dump may be a known BAdI impl, a customized MV45AFZZ/ZXRSRU01 may be a recorded form-based exit, a failing field may be a recorded append. Follow common/customization-lookup.md. If the cache is absent, suggest /sc4sap:setup customizations but do not block the current analysis.
</Core_Principles><Analysis_Framework> All hypotheses must map to one of these 8 root cause categories:
| Category | Typical Symptoms | Key Signals |
|---|---|---|
| Master / Input data | Only specific data fails, others succeed | Data values, related master records |
| Authorization | Only specific users fail | SU53, STAUTHTRACE, recent role changes |
| Customizing | Only specific org units affected | SPRO values, recent customizing transports |
| Interface / RFC / Batch | External integration fails | SM58, SMQ1/2, SM37, WE02, BD87 |
| Custom development | Z*/Y* objects in call stack | Recent Z* transports, GetWhereUsed |
| Standard SAP bug | Only standard objects in stack; right after SP upgrade | SAP Note search, kernel/SP level |
| Performance / Locks / DB | Timeouts, increased wait times | ST05, SAT, SM12, SQLM |
| Operational procedure | Step order or prerequisite violated | Month-end, dependency job status |
Every hypothesis presented to the user must declare its category explicitly. </Analysis_Framework>
<Evidence_Collection_Matrix> Evidence collection strategy — prefer MCP auto-query, fall back to manual TCode guidance:
| Symptom Type | MCP Auto-Query | Manual TCode |
|---|---|---|
| Short dump / runtime error — first | RuntimeListFeeds (dumps, time window) when no dump ID is known → RuntimeGetDumpById metadata (~7 KB, termination link) → failing include; formatted dump (~50 KB) only when needed | ST22 |
| Known issue — only when the failure point is standard SAP code | WebSearch / WebFetch (SAP Notes, KBAs, SAP Community) — standard identifiers only | SAP for Me |
| Performance / long runtime | RuntimeListProfilerTraceFiles, RuntimeAnalyzeProfilerTrace (existing traces only — never start a run) | ST05, SAT, SQLM |
| Suspect program/class logic | GetInclude/GetProgram/GetClass/GetFunctionModule, GetAbapAST, GetAbapSemanticAnalysis, GetWhereUsed | SE80, SE24, SE38 |
| Recent change tracking | ListTransports, GetTransport, GetObjectInfo (Author/Changed-by) | SE09, SE10, SE16 → E070 |
| Z*/Y* object or customized SAP include in trace | Local file read (path from Step 1, no search): <CUSTOMIZATION_DIR>/<MODULE>/enhancements.json (→ badiImplementations[], smodExits[], formBasedExits[]) and <CUSTOMIZATION_DIR>/<MODULE>/extensions.json (→ appendStructures[]) | n/a — local cache only |
| Enhancement / BAdI | GetEnhancements, GetEnhancementImpl, GetEnhancementSpot | SE18, SE19, SMOD, CMOD |
| System / session info | GetSession | /n (status), /o SM04 |
| Table schema (not rows) | GetTable, GetStructure, GetView, GetDataElement, GetDomain | SE11 |
| Unit test results | GetUnitTestResult, RunUnitTest | SE80 → test class |
| Authorization error | Hand off to /sc4sap:role-matrix triage (user ID, T-code, SU53 screen capture attached) — missing object / values, roles that grant them, SoD impact; read-only | SU53, STAUTHTRACE |
| Application log | (MCP not supported) | SLG1 |
| System log | (MCP not supported) | SM21 |
| Update error | (MCP not supported) | SM13 |
| RFC / tRFC / qRFC | (MCP not supported) | SM58, SMQ1, SMQ2 |
| Background job | Facts first — runs, steps, concurrent aborts, dumps, changing requests — per job-idoc.md (scripts/ops/incident.mjs, read-only; no job log in phase 1) | SM37 · aborted jobs of a period: /sc4sap:ops-health-check |
| IDoc | Facts first — header, status text, volume of the type + partner, changing requests — per job-idoc.md (scripts/ops/incident.mjs, read-only; no status records in phase 1) | WE02, WE05, BD87 · IDocs in error of a period: /sc4sap:ops-health-check |
| OData / Fiori | (MCP not supported) | /IWFND/ERROR_LOG, /IWBEP/ERROR_LOG |
Rule: For any MCP-supported item, never ask the user — query it directly. </Evidence_Collection_Matrix>
<Workflow_Steps>
MANDATORY: Follow the step sequence defined in workflow-steps.md.
Per-step model allocation (the main thread follows the session model — model: inherit; heavy analysis is delegated):
| Step | Owner | Model | Role |
|---|---|---|---|
| 0 Trust | skill-to-skill | Sonnet | permission bootstrap — skipped on a headless host |
| 1 Initial Triage | main | Sonnet | clue parsing (a screenshot counts) + GetSession + MODE (quick-dump | full, and quick-dump is the default — see workflow-steps.md § Step 1) + customization path + user's hypothesis |
| 2 Investigate + Narrow + Report | sap-debugger — model: "sonnet" for quick-dump, model: "opus" for full | Sonnet / Opus | Read-only. quick-dump: dump summary → failing source; returns BLOCKED — needs full when the dump alone is not enough, and main re-dispatches the round as full on Opus. full: dump / scoped transports / code / enhancement / customization; web lookup only for standard-code failures. Writes the user-facing report per output-format.md (hypotheses, questions, Note keywords, next steps). One dispatch per round. |
| 3 Relay | main | Sonnet | output the report verbatim; wait for answers → repeat Step 2 |
| 4 Follow-up Routing | main | Sonnet | pointers only when the user asks for the fix (apply the proposal in SE38/ADT outside this skill, /sc4sap:analyze-code, module consultant) — never a write call |
sap-debugger's tool set already covers the dumps feed (RuntimeListFeeds), RuntimeGetDumpById, profiler, transport queries, code reads, enhancement lookup, and customization cache reads — see the agent's Investigation_Protocol for the full inventory. A quick-dump round is read-mostly work (dump → source → explanation), which common/model-routing-rule.md keeps on Sonnet (§ Tier 2 — the debugger still explains the dump, so it is not a pure Haiku fetch); full rounds need cross-file reasoning (dump × transport × source × customization) and stay on Opus. Ambiguity resolves to quick-dump, never to full: the cheap path escalates itself when it cannot finish, and the expensive one has no way back.
</Workflow_Steps>
<Question_Strategy> Rule: max 3 questions per response. Never re-ask what MCP already answered.
Priority when information is missing:
Situation-specific follow-ups:
ListTransports + GetWhereUsed, then) Does TR candidate X match the timing of the incident?GetSession. Does the same symptom reproduce on QAS/DEV?<Output_Format>
Per-round report template and the final-round consolidated report structure live in output-format.md. Follow it literally for both intermediate rounds and the final analysis.
</Output_Format>
<MCP_Tools_Used>
Main thread: GetSession only (Step 1). Everything else runs inside the sap-debugger dispatch, so dump payloads, source and transport lists never sit in the orchestrator context. The authoritative tool list and call limits live in the dispatch prompt in workflow-steps.md § Step 2: dump (RuntimeListFeeds dumps feed, RuntimeGetDumpById metadata, formatted view only when needed), one failing include (GetInclude / GetProgram / GetClass / GetFunctionModule), scoped transports (ListTransports, GetTransport, GetObjectInfo), GetWhereUsed, enhancements, existing profiler traces, DDIC schema reads. Never GetProgFullCode, GetTableContents, GetSqlQuery or any write tool.
</MCP_Tools_Used>
<Common_Pitfalls_To_Avoid>
RuntimeListFeeds dumps feed — RuntimeListDumps can return an empty list)summary key facts of RuntimeAnalyzeDump / RuntimeGetDumpById (they pick the wrong chapter), or reading a whole program with GetProgFullCodeListTransportsTask: $ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
inheritnpx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sap31 skills in this plugin
/adobe-from-pdfBuild an Adobe form (SFP — interface, context and XDP layout) from a PDF of the printed form, the way smartform-from-pdf builds a SmartForm, upload it to the DEV system, print it there and score the print against the source page. Awaiting approval — not runnable yet./adobe-previewDraw the expected print of an Adobe form (SFP, S/4HANA) as HTML pages in mm (plus JPG / PDF with a local browser) — the XFA layout with its master pages, flowed tables with repeated headers, page breaks, captions, pictures (dates, numbers, currency shifts), rich text with embedded fields, rounded boxes and images — filled with invented sample values sized to the interface's DDIC types. On a development system it can print SAP's example forms through ADS and score the preview against SAP's own PDF./analyze-codeABAP code analysis — size-gated review (one Opus sap-code-reviewer, or Haiku sap-checker detectors + Opus judge for large objects), Haiku evidence check on every finding, then a canned report or a richer briefing on the main thread/ask-consultantDirect operational Q&A with a SAP module consultant agent. Auto-routes the question to the matching sap-{module}-consultant and answers against the configured SAP environment (version, industry, country, active modules)./assistBusiness assistant for the connected SAP system — looks up and changes specific documents through the installed business actions (query → preview → user confirm → execute), one confirmed step at a time. Use for requests about concrete SAP data such as open purchase orders, goods receipt, delivery complete, PO release, production order release / confirmation / TECO, sales order create or change, delivery / billing block, post goods issue, billing, FI document display or reversal, payment block, G/L posting, internal order status, cost center actuals, cost repost or activity allocation, document output status or reprint, shipments, picking, packing / handling units, shipment costs, warehouse transfer orders and requirements, bin and warehouse stock (ECC LE / WM), maintenance notifications and orders, equipment, functional locations and maintenance plans (ECC PM), EWM warehouse tasks, warehouse orders, bins, stock locations, handling units and delivery warehouse progress (S/4 EWM, lookups only). Korean requests too — 미결 PO, 입고, 완결, 납기 변경, 승인, 생산오더, 실적 등록, 기술적 완료, 판매오더, 출하 보류, 청구 보류, 출고 전기, 청구 생성, 전표 조회, 역분개, 지급보류, 분개 전기, 내부오더, 코스트센터 실적, 비용 재전기, 활동 배부, 출력 상태, 재출력, 운송/선적 생성, 피킹, 포장, HU, 운송비, 이전오더(TO) 생성/확정/취소, 이전요청(TR), 저장빈, 창고 재고, 재고실사, 보전오더, 보전통지, 고장 통지, 설비, 기능위치, 보전계획, 보전오더 기술적 완료, 미결 창고작업, 창고작업 조회, 창고오더, 빈 저장빈, 재고 위치, 납품 창고 진행, 검사로트, 사용결정, 검사결과 입력, 품질통지. Not for how / why / configuration questions (ask-consultant)./cbo-relation-mapDraw how the customer objects of one or more CBO packages relate — one self-contained HTML relation map built from the reference graph of /sc4sap:stock-cbo (DDIC typing, check tables, search helps, value tables, row types, view bases, plus includes, calls, submits, transactions, reads and writes from source). Overview with the most connected objects, usage and groups of related objects; a search-driven neighbourhood view drawn like Obsidian's graph (relation presets, filters by kind / type / basis / usage / package); impact of a change up to the TCodes; shortest paths; a table CRUD tab; a Fields tab (who creates / reads / updates / deletes each table field, incl. customer appends of standard tables, and the TCodes and jobs that reach the writers); source lines behind every relation; PNG / CSV export. Customer (Z / Y / namespace) objects only. Collects the graph itself when it is missing (whole package or used TCodes only; eco = map-only collection).Other plugins' skills for the same job