From sc4sap
Routes operational questions to SAP module consultants for SPRO guidance, business-process advice, configuration walkthroughs, integrations, and localization rules.
npx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sapThis skill uses the workspace's default tool permissions.
Single entrypoint for asking a SAP module consultant agent an operational question. The skill auto-selects the right consultant(s) from the question text + project config, honors the configured SAP environment, and returns a faithful answer — no code generation, no object creation, just the consultant's judgment.
Conducts Socratic interview to clarify vague SAP/ABAP requirements on objects, packages, transports, patterns, integrations, data models, and testing before generating validated specs.
Assists with ABAP code for SAP systems: internal tables, structures, ABAP SQL, OOP, RAP, CDS views, EML statements, ABAP Cloud, strings, dynamic programming, RTTI/RTTC, field symbols, data references, exceptions, unit testing.
Assists with SAP Analytics Cloud scripting in Analytics Designer and Optimized Story Experience, for script creation, debugging, performance optimization, planning, data filtering, and API usage.
Share bugs, ideas, or general feedback.
Single entrypoint for asking a SAP module consultant agent an operational question. The skill auto-selects the right consultant(s) from the question text + project config, honors the configured SAP environment, and returns a faithful answer — no code generation, no object creation, just the consultant's judgment.
`/sc4sap:ask-consultant` is the "ask a human consultant" button inside Claude. Users hit it when they need SPRO guidance, business-process advice, configuration walkthroughs, integration touchpoints, localization rules, or BAdI / CMOD / append decisions — the kind of question normally answered by an SD / MM / FI / CO / PP / PS / PM / QM / TR / HCM / WM / TM / BW / Ariba / Basis consultant. The skill does NOT write code or change the SAP system; it reads config + consults the agent + returns the answer.<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 every parallel consultant spawn and the optional synthesis pass), emit ▶ phase=<id> (<label>) · agent=<name> · model=<Opus 4.7|Sonnet 4.6|Haiku 4.5> per ../../common/model-routing-rule.md § Phase Banner Convention.
</Phase_Banner>
<Team_Mode>
When module routing produces ≥ 2 consultants, Step 4 doubles as teamMode Round 1. If Round 1 POSITIONs diverge (per team-mode.md § Divergence check), escalate to Rounds 2-3 and use the teamMode synthesis variant instead of Step 5 legacy synthesis. Single-consultant questions and aligned Round 1 → legacy synthesis (Step 5) unchanged. See team-mode.md for orchestration + shared task list layout + response prefix variant. Base protocol: ../../common/team-consultation-protocol.md.
</Team_Mode>
<Use_When>
/sc4sap:create-program.
</Use_When><Do_Not_Use_When>
/sc4sap:create-program or /sc4sap:create-object./sc4sap:analyze-symptom./sc4sap:analyze-code.common/data-extraction-policy.md.
</Do_Not_Use_When><Session_Trust_Bootstrap> MANDATORY — runs as Step 0 before the consultant dispatch.
Invoke /sc4sap:trust-session with parent_skill=sc4sap:ask-consultant so the consultant agent's read-only MCP calls (SearchObject, GetTable, GetPackage, GetWhereUsed, etc.) proceed without prompting.
.sc4sap/session-trust.log already has a line within the last 24h, skip silently.Agent dispatches MUST pass mode: "dontAsk".Full spec: see ../trust-session/SKILL.md.
</Session_Trust_Bootstrap>
<Environment_Context> MANDATORY — the consultant answers against the project's configured SAP environment, not generic best-practice. Before dispatching, load:
.sc4sap/config.json → sapVersion (ECC / S4 On-Prem / S4 Cloud Public / S4 Cloud Private), abapRelease, industry, country, activeModules.sc4sap/sap.env → SAP_URL, SAP_CLIENT, SAP_LANGUAGE, SAP_INDUSTRY, SAP_COUNTRY, SAP_ACTIVE_MODULES (as fallback)Pass these to the consultant via the dispatch prompt so its answer reflects the actual landscape. If any key is missing, ask the user before dispatching — do NOT let the consultant invent assumptions.
The consultant agent's Mandatory_Baseline (Tier 1 + Tier 2 per ../../common/context-loading-protocol.md) ensures it loads spro-lookup.md, customization-lookup.md, active-modules.md, and configs/{MODULE}/*.md at session start.
</Environment_Context>
<Module_Routing> Map the user's question to the target module(s). Priority:
Supported consultants (15 total):
sap-sd-consultant, sap-mm-consultant, sap-fi-consultant, sap-co-consultant, sap-pp-consultant, sap-ps-consultant, sap-pm-consultant, sap-qm-consultant, sap-tr-consultant, sap-hcm-consultant, sap-wm-consultant, sap-tm-consultant, sap-bw-consultant, sap-ariba-consultantsap-bc-consultant
</Module_Routing><Workflow_Steps> Per-step model allocation (skill frontmatter pins the main thread to Haiku; Agent dispatches carry their own model):
<Session_Trust_Bootstrap>. (Haiku · skill-to-skill)config.json + sap.env; surface resolved values on the FIRST turn only (one line: SAP: <version> · <industry> · <country> · active: <modules>). (Haiku · main thread)<Module_Routing>. If ambiguous, ask one question and stop. (Haiku · main thread)Agent(...) per resolved module (parallel in a single message when 2–3 modules match).
Emit phase banner per dispatch:
▶ phase=4 (consultant-<MODULE>) · agent=sap-<module>-consultant · model=Opus 4.7
Dispatch shape:
Agent({
subagent_type: "sc4sap:sap-<module>-consultant", // frontmatter already pins claude-opus-4-7
description: "<MODULE> consultation — <topic>",
prompt: <user question + environment context + expected format>,
mode: "dontAsk"
})
teamMode variant: when N ≥ 2, Step 4 doubles as Round 1 of teamMode — use the Round 1 spawn shape in team-rounds.md § Round 1 (adds team_name, name, charter-file reference; consultants write POSITION files instead of returning directly).sap-writer with model: "sonnet" override. Writer's base model is Haiku (pure formatting); Sonnet override gives the light cross-domain reasoning needed to detect agreement / disagreement between consultant answers without jumping to Opus.
Emit banner:
▶ phase=5 (synthesis) · agent=sap-writer · model=Sonnet 4.6
Dispatch shape:
Agent({
subagent_type: "sc4sap:sap-writer",
model: "sonnet", // override base Haiku — synthesis needs light reasoning
description: "Cross-module synthesis — <modules>",
prompt: """
Synthesize the following consultant answers for the user question.
Identify shared points, flag disagreements (with a one-line "WHY they differ" note),
and produce a cross-module summary. Do NOT re-answer the question — only compose
from the supplied consultant outputs.
User question: <question>
Environment: <sapVersion> · <industry> · <country> · modules: <list>
Consultant answers:
<MODULE_A>: <answer_a>
<MODULE_B>: <answer_b>
[...]
""",
mode: "dontAsk"
})
teamMode variant: if Round 1 POSITIONs diverged (per team-rounds.md § Divergence check), do NOT run the legacy synthesis above — follow team-rounds.md Rounds 2-3 then team-mode.md § Synthesis (task-list–driven writer dispatch).
On single-consultant case: SKIP Step 5 entirely — main thread (Haiku) just forwards the consultant's answer to Step 6./sc4sap:create-program (if the answer leads to a new build), /sc4sap:program-to-spec (if user wants the existing asset documented), /sc4sap:analyze-code (if quality review needed). (Haiku · main thread)No writes: this skill never calls Create* / Update* / Delete* / Activate* / CreateTransport. If the consultant's answer suggests a change, the user must run a separate creation / modification skill.
No row extraction: GetTableContents and GetSqlQuery are NOT used. Schema / DDIC reads are fine (GetTable, GetStructure, GetDataElement, GetDomain, SearchObject).
</Workflow_Steps>
<Output_Format> Return the consultant's answer verbatim, prefixed with the consultant identity and the environment context it used:
[Model: <main-model> · Dispatched: Opus×<n> (<consultant names>)]
🧭 Consultant: sap-<module>-consultant
🌐 Environment: <sapVersion> · <industry or "—"> · <country or "—"> · active modules: <list>
<consultant's faithful answer>
---
💡 Next steps (optional):
- /sc4sap:create-program — if this leads to a new build
- /sc4sap:program-to-spec — to document an existing asset
- /sc4sap:analyze-code — to review existing code
For multi-module dispatches, the 🧭 Consultant line lists all names, the body leads with the sap-writer synthesis (Sonnet) — shared points, disagreements, cross-module summary — followed by one verbatim subsection per consultant.
Dispatch-summary examples in the prefix:
[Model: Haiku 4.5 · Dispatched: Opus×1 (sap-mm-consultant)][Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer synthesis)][Model: Haiku 4.5 · Dispatched: Opus×2 (sap-mm-consultant, sap-fi-consultant), Sonnet×1 (sap-writer team-synthesis) · Team: 2 members × 2 rounds]
</Output_Format><Related_Skills>
/sc4sap:deep-interview — use before ask-consultant if the question is too vague to route./sc4sap:compare-programs — complementary when the consultant's answer references existing variants./sc4sap:analyze-cbo-obj — complementary when the consultant's answer depends on knowing what custom assets already exist.
</Related_Skills><MCP_Tools_Used>
SearchObject, GetObjectInfo — existence checks as the consultant worksGetPackage, GetPackageContents — CBO scope confirmationGetTable, GetStructure, GetDataElement, GetDomain, GetView — DDIC metadataGetWhereUsed — call-graph queriesGetTableContents, GetSqlQuery, any Create* / Update* / Delete* / Activate*
</MCP_Tools_Used>Task: {{ARGUMENTS}}