/sc4sap:role-matrixfrom sc4sap
Creates and maintains an editable SAP role-matrix HTML workbook with business roles, PFCG roles, T-code matrices, user assignments, authorization objects, and SoD conflict checks. Supports new design from consultant proposals or reading from a connected SAP system. Also triages 'no authorization' errors for a user/T-code via SU53 analysis.
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 — new design only (no ST03N narrowing);syncand triage are blocked.
One editable HTML workbook per role design — the classic SAP role-matrix workbook (seven sheets and a cover) as a page the security owner, module consultants and the business edit together. Built new from a consultant's proposal, or read from the roles that already exist in SAP.
Role design is a project deliverable that changes every week: business roles are argued over with the business, T-codes move between roles, users are assigned before go-live, SoD conflicts must be found before an auditor does. Spreadsheets drift from what PFCG really holds. This skill keeps one model, draws the workbook from it, checks it (unmapped roles, T-codes in no role, SoD conflicts per user and inside a role), and can read the real roles from SAP so the document starts from the system — not from memory.<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>Roles are read 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.</Target_Object>
<Use_When>
triage.mdverify in workflow.md § Operations
</Use_When><Do_Not_Use_When>
/sc4sap:module-to-process; project plan → /sc4sap:project-dashboard
</Do_Not_Use_When><Session_Trust_Bootstrap>
MANDATORY — Step 0. Invoke /sc4sap:trust-session with parent_skill=sc4sap:role-matrix. Skip silently if .sc4sap/session-trust.log has a line within the last 24h.
</Session_Trust_Bootstrap>
<Decisions_Fixed> Settled with the user (2026-10-28) — do not ask again:
| Topic | Decision |
|---|---|
| Layout | The classic workbook: cover (document info, sheet guide, legend, computed summary, checks), 1 business roles, 2 technical roles, 3 business role × T-code (F/C/D), 4 user × business role (X), 5 authorization objects, 6 SoD, 7 change history |
| Company form | Forms differ by company. The workbook above is the default; on request a company layout (layout.md) read from the company's own form (.html / .docx) sets sheet titles and order, columns and headers, own columns, level codes, cover fields, colours, font and logo — editing, CSV, checks and SoD stay the same |
| Output | ONE self-contained HTML page per document with spreadsheet-style editing (range select, F/C/D/X typed over a range, Excel copy / paste, fill down, undo, rename an ID everywhere) and CSV per sheet. No xlsx |
| Mode | Always ask: new design or read from SAP; a third mode triage (one user + one T-code authorization error) runs triage.md — no workbook is built |
| SAP reads | Role design tables (AGR_DEFINE, AGR_TEXTS, AGR_FLAGS, AGR_AGRS, AGR_TCODES, AGR_1251, AGR_1252) and the assignment table AGR_USERS (user ID and validity only). Names, departments and positions of users are typed in the page. USR* tables are never read |
| New design | The module consultant proposes business roles, T-codes with levels, technical roles (master + derived per org value), authorization objects (SU24 view) and SoD rules; narrowed to the T-codes users run when ST03N usage is available |
| SoD | Rules by business-role pair or by T-code sets (library scripts/role/sod-library.json); conflicts are computed per user and inside a single role |
| Versions | 0.1 steps in sheet 7; each Save in the page adds a row; --major for 1.0 |
| </Decisions_Fixed> |
/`: `-roles.json` (model), `-role-matrix-v-.html`, `_src/`. Tool: `node "/scripts/role/build-role-doc.mjs" … --dir ` (the header of that file lists every command).
A `Language: Korean | English | Japanese` line (or "Write the report in …") sets the document language: Korean → `--lang ko`, English → `--lang en`, Japanese → `--lang ja` on `init` / `sync`. None → the profile `config.json` `language`. A draft that names its own `lang` keeps it — set the draft `lang` to the same value.
Triage (user + T-code + error) → MUST read [`triage.md`](triage.md) and follow it instead. Otherwise MUST read [`workflow.md`](workflow.md) before Step 1. Model fields: [`model-schema.md`](model-schema.md) — read before writing a draft or editing a model file.
<Output_Format>
Role matrix <CODE> · <project> · v<ver> · <new design | read from SAP <SID> (<n> roles)>
Business roles <n> · technical roles <n> · T-codes <n> · users <n> · auth rows <n> · SoD rules <n> (broken <n>)
Checks: <err> errors · <warn> warnings — <top 3>
Page: <html>
Next: edit in the browser → Save → "import <file>", "SoD 규칙 추가 (MM, FI)", "SAP에서 다시 읽기", "회사 양식 적용 (<form>.docx)"
</Output_Format>
What SKILL.md sets; muted values are Claude Code's defaults
inheritThree short reads, in order
sap-authorization, role-matrix, sod-check, pfcg, authorization-audit
npx 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/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).Other plugins' skills for the same job