/sc4sap:setupfrom sc4sap
Unified setup and configuration entrypoint for SuperClaude for SAP. Detects legacy single-profile state, creates SAP connection profiles, installs MCP server and optional DEV handlers, registers hooks, and handles error escalation.
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): full — the connection question offers Offline; seewizard-steps.md§ Offline path.
Use /sc4sap:setup as the unified setup and configuration entrypoint for SuperClaude for SAP.
<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>
<Phase_Banner>
Multi-phase skill. Before each Agent(...) dispatch (including the two conditional error-escalation paths below), 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>
<Error_Escalation_Paths>
Setup's happy path runs entirely on the main thread (session model — frontmatter model: inherit) — it's configuration work, not code generation. Two step-ranges escalate on failure:
| Source step(s) | Agent | Model | Why |
|---|---|---|---|
| 4bis RFC backend — preflight failure, handler install error, SICF service misconfigured, OData / SOAP probe returns 5xx | sap-bc-consultant | Opus (frontmatter) | Pure Basis domain — SICF, Gateway service registration, authorizations. Basis consultant owns this ground. |
| 5 Reconnect / 6 GetSession / 7 systemInfo persist / 8 GetInactiveObjects — any failure (HTTP error, auth reject, parse failure, timeout, authorization object missing) | general-purpose (with model: "opus" override) | Opus | 3-layer stack (SAP ADT + MCP server + Claude Code plugin). Most errors are cross-layer (MCP framework bugs, Node runtime issues, profile resolution) — pure SAP consultant has a blind spot. general-purpose + Opus spans Read/Grep/Bash/WebFetch/WebSearch across all three layers. |
Each escalation emits its own phase banner:
▶ phase=4bis.escalate (basis) · agent=sap-bc-consultant · model=Opus
▶ phase=5-8.escalate (triage) · agent=general-purpose · model=Opus
After the escalation agent returns a diagnosis + remediation checklist, the main thread surfaces it to the user and asks whether to retry the failed step or abort setup. </Error_Escalation_Paths>
/sc4sap:setup # full setup wizard
/sc4sap:setup doctor # diagnose installation and SAP connection
/sc4sap:setup mcp # configure abap-mcp-adt-powerup MCP server
/sc4sap:setup spro # auto-generate SPRO config from S/4HANA system
/sc4sap:setup customizations # extract customer Z*/Y* enhancements + extensions
Process the request by the first argument only:
wizard, or --force → run the full setup wizard (Steps 0–13). Read wizard-steps.md (in this skill folder) and execute the steps defined there in order. Step 0 performs legacy detection + profile bootstrap before any question.doctor → route to /sc4sap:sap-doctor with remaining argsmcp → route to /sc4sap:mcp-setup with remaining argsspro → Active-profile precondition (decision §4.5): if <project>/.sc4sap/active-profile.txt is absent AND ~/.sc4sap/profiles/ is empty, error out with "No active SAP profile — run /sc4sap:setup (full wizard) first". If the pointer is absent but profiles exist, error with "No active profile — use /sc4sap:sap-option switch <alias>". Otherwise, run SPRO config auto-generation — read spro-auto-generation.md and follow its 3 steps.customizations (also accepts cust / enhancements) → same active-profile precondition as spro. Then run customer enhancement + extension extraction — read customization-auto-generation.md and follow its 3 steps.<Session_Trust_Bootstrap> MANDATORY — runs as Step 0 before any MCP call, file write, or user question.
Invoke /sc4sap:trust-session with parent_skill=sc4sap:setup to pre-grant MCP tool + file-op permissions for the session. Setup itself creates ABAP objects on DEV tier profiles (ZMCP_ADT_UTILS, ZCL_S4SAP_CM_* ALV handlers) and writes multiple local files (~/.sc4sap/profiles/<alias>/{sap.env, config.json}, <project>/.sc4sap/active-profile.txt, .claude/settings.local.json, hook files) — each of which would otherwise trigger a permission prompt. Note: trust-session only allows writes under .sc4sap/**; writes under ~/.sc4sap/profiles/** are routed through sap-profile-cli.mjs (a Bash invocation) so they go through the normal permission flow — trust-session cannot blanket-approve user-home paths.
.sc4sap/session-trust.log already has a line within the last 24h, skip silently.GetTableContents / GetSqlQuery remain prompt-gated even after trust-session — setup does not need them.Full spec: see ../trust-session/SKILL.md.
</Session_Trust_Bootstrap>
Ask one question at a time. Never batch questions.
- Walk through the steps sequentially and collect each input one by one.
- Do not advance to the next question until the user has answered the current one.
- As soon as the user answers, record/apply the value and move to the next step.
- Even when a single step has multiple fields (e.g., Step 4 SAP connection info), ask one field per message. Example: ask
SAP_URL?→ wait for answer → askSAP_CLIENT?→ wait → askSAP_USERNAME?→ ...- If a value already exists in
.sc4sap/sap.envor.sc4sap/config.json, show the current value and offer "press Enter to keep / type a new value".- Keep prompts short. Do not paste long wall-of-text instructions.
Never dump the entire questionnaire in a single message — users find it frustrating.
wizard-steps.md — the 15-step setup wizard index (Step 0–14; Step 14 offers the optional humanize-korean plugin). Read before running the full wizard. Heavy steps are split out (see below).wizard-step-02-system-identification.md — Step 2 detail (SAP version, ABAP release, Industry).wizard-step-04-profile-creation.md — Step 4 detail (alias + SAP_TIER + connection fields → sap-profile-cli.mjs add). Read before Step 4.wizard-step-09-abap-objects.md — Step 9 detail, including the DEV-only tier gate (QA/PRD REFUSE → CTS import guidance).wizard-step-11-optional-extraction.md — Step 11 (SPRO prompt) + 11b (Customization prompt). Artifacts land under work/<activeAlias>/.wizard-step-12-blocklist-hook.md — Step 12 installs BOTH L1 PreToolUse hooks: block-forbidden-tables.mjs + tier-readonly-guard.mjs.spro-auto-generation.md — SPRO extraction workflow. Read when the first arg is spro or when Step 11 proceeds.customization-auto-generation.md — customer Z*/Y* enhancement + extension extraction. Read when the first arg is customizations (also cust / enhancements) or when running wizard step 11b.rfc-backend-selection.md — Step 4bis RFC backend selection (odata / soap). Writes SAP_RFC_* to the ACTIVE PROFILE env, never to the project folder.odata-classes-install.md — Step 9c OData backend classes install (DEV tier only).hud-statusline.md — HUD status line spec. HUD reads <project>/.sc4sap/active-profile.txt + profile env to render alias + tier badge.../../docs/multi-profile-design.md, ../../docs/multi-profile-setup-gap.md, ../../common/multi-profile-artifact-resolution.md, ../sap-option/migration.md, ../sap-option/profile-management.md.The plugin ships a sc4sap-branded status line that is installed into ~/.claude/settings.json by setup Step 13 (scripts/hud/install-statusline.mjs); plugin.json does not declare it. Read hud-statusline.md for the full specification, including displayed segments, environment variables (SC4SAP_WEEKLY_LIMIT_USD, NO_COLOR), performance characteristics, and how to disable it.
/sc4sap:sap-doctor, /sc4sap:mcp-setup, /sc4sap:sap-option remain valid direct entrypoints. Prefer /sc4sap:setup in documentation and user guidance.~/.sc4sap/profiles/<alias>/sap.env — MCP-server env; password is stored in the OS keychain and referenced via SAP_PASSWORD=keychain:sc4sap/<alias>/<user>.~/.sc4sap/profiles/<alias>/config.json — plugin-side settings (sapVersion, abapRelease, industry, activeModules, namingConvention, systemInfo, activeTransport, blocklistProfile).~/.sc4sap/profiles/<alias>/.abap-utils-installed — Step 9 sentinel (DEV only).~/.sc4sap/profiles/.trash/<alias>-<ts>/ — soft-deleted profiles (7-day auto-purge).<project>/.sc4sap/active-profile.txt — alias of the currently active profile.<project>/.sc4sap/work/<alias>/{program, cbo, customizations, audit, comparisons, spro-config.json} — per-profile artifacts (see ../../common/multi-profile-artifact-resolution.md).<project>/.sc4sap/sap.env.legacy — migration backup (rollback); exists only right after Step 0 migration.<project>/.sc4sap/{sap.env, config.json} — DELETED by Step 0 migration (decision §4.3). Fresh installs never create them.<project>/.sc4sap/blocklist-{extend,custom}.txt — L1 hook extension lists./sc4sap:sap-option./sc4sap:sap-option switch <alias>./sc4sap:sap-option add./sc4sap:sap-option.scripts/hooks/tier-readonly-guard.mjs + L2 MCP guard):
DEV — writes allowed; Step 9 installs on this tier only.QA — read + RunUnitTest only; mutations blocked; Step 9 refuses.PRD — strict read-only; RunUnitTest blocked; Step 9 refuses.customization-auto-generation.md (opens in a new tab)hud-statusline.md (opens in a new tab)nco-connection.md (opens in a new tab)odata-classes-install.md (opens in a new tab)rfc-backend-selection.md (opens in a new tab)spro-auto-generation.md (opens in a new tab)wizard-step-02-system-identification.md (opens in a new tab)wizard-step-04-profile-creation.md (opens in a new tab)wizard-step-09-abap-objects.md (opens in a new tab)wizard-step-11-optional-extraction.md (opens in a new tab)wizard-step-12-blocklist-hook.md (opens in a new tab)wizard-steps.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
inherit31 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/analyze-symptomRead-only, step-by-step root cause analysis for SAP operational errors. Reads the dump summary and failing source via MCP (known-issue web lookup only when the failure is in standard SAP code), widens to transports and where-used only when the clues call for it, narrows hypotheses with minimal user questions, and provides SAP Note search keywords. Never changes code or data./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).npx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sapOther plugins' skills for the same job