sap-activate-object
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Diagnoses "no authorization" failures deterministically over RFC and proposes the exact PFCG fix — no more pasting an SU53 screenshot and hand-searching SUIM. Given the failed authorization object (+ optional field values, read off SU53 / an ST22 dump / an application-log
$ npx -y skills add sapdev-ai/sap-dev --skill sap-auth-diagnose --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sap-auth-diagnoseContext preview
The summary Claude sees to decide when to auto-load this skill.
Diagnoses "no authorization" failures deterministically over RFC and proposes the exact PFCG fix — no more pasting an SU53 screenshot and hand-searching SUIM. Given the failed authorization object (+ optional field values, read off SU53 / an ST22 dump / an application-log
name: sap-auth-diagnose description: | Diagnoses "no authorization" failures deterministically over RFC and proposes the exact PFCG fix — no more pasting an SU53 screenshot and hand-searching SUIM. Given the failed authorization object (+ optional field values, read off SU53 / an ST22 dump / an application-log message), it evaluates the target user against the AUTHORITATIVE runtime user buffer (`SUSR_USER_AUTH_FOR_OBJ_GET`, remote-enabled on S/4HANA 1909 + ECC 6) with faithful AUTHORITY-CHECK semantics — one authorization instance must satisfy every field, '*' matches anything, VON..BIS ranges honoured — so the verdict can never disagree with the real kernel check the way a hand-rolled AGR_1251/UST12 join can. It then classifies each failure (`MISSING_OBJECT` / `MISSING_VALUE` / `BUFFER_STALE`) plus user-level `USER_LOCKED` / `USER_EXPIRED` / `ROLE_EXPIRED`, names the closest role the user already has (with what it currently grants), and writes a diagnosis TSV + fix-proposal + ready-to-send security request. Read-only toward roles and users — the fix is always a proposal, never a write. Prerequisites: SAP profile via /sap-login (RFC); SAP NCo 3.1 (32-bit). su53 (GUI auto-scrape of the failed objects) and trace (STAUTHTRACE) modes are the documented next phase — until then the operator supplies the failed object (Claude decodes a pasted SU53 into the check input). argument-hint: "check --object <OBJ> [--values F=V,F2=V2] [--user <U>] [--ticket <id>] | check --input <tsv> | (su53 | trace = next phase)"
You answer **"why can't user `<U>` do `<X>`"** with a machine check, not prose: decode the failed authorization object, evaluate it against the user's real runtime buffer, name the closest role, and hand back an exact, actionable fix — all read-only.
Task: $ARGUMENTS
---
| File | Token / call | Purpose | |---|---|---| | `<SKILL_DIR>/references/sap_auth_diagnose_rfc.ps1` | `-Action check` | Buffer read + faithful AUTHORITY-CHECK eval + AGR_* fix correlation | | `<SKILL_DIR>/references/auth_check_input_sample.tsv` | template | Commented batch-input sample (`checkid⇥object⇥field⇥value`) | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1` | dot-sourced | NCo 3.1 connect/disconnect (pinned-profile fallback) | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1` | dot-sourced | Diagnosis / fix-proposal artifact registration | | `<SAP_DEV_CORE_SHARED_DIR>/tables/required_authorizations.tsv` | reference | The capability→object→field grammar this reuses | | `/sap-login` | sub-skill | Pinned RFC profile | | `/sap-su01` | sub-skill | Pointed to in the fix (role assign) — never auto-invoked |
**Input grammar** — a *check* is one authorization object plus the field/value set that must ALL be satisfied by a single authorization instance (exactly one AUTHORITY-CHECK):
a `checkid` form one group. Empty value = presence-only check.
`--user` defaults to the pinned connection's user. `--values` empty = "does the user have this object at all".
---
Resolve `work_dir` + `{RUN_TEMP}` (canonical one-liner — `sap_connection_lib.ps1` is dot-sourced there — with `Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))` appended). `{RUN_TEMP}` = the per-run scratch dir holding the log state file; mint it once here and reuse (re-minting breaks the `-Action end` state-file lookup). Start logging (`sap_log_helper.ps1`, state `{RUN_TEMP}\sap_auth_diagnose_run.json`). Pure RFC — no GUI session.
Modes: `check` (v1). `su53` / `trace` → **next phase** (Scope below): tell the operator to read the failed object off SU53 / the dump / the app message and pass it to `check` (if they paste an SU53 screen or screenshot, YOU decode object + field + value from it and build the check input — that decoding is the point, and needs no GUI automation). Validate that at least one object is supplied; else `AUTH_INPUT_INVALID`, STOP.
Pinned RFC profile required (`/sap-login`) — missing → `RFC_LOGON_FAILED`, STOP. No GUI fallback in v1.
**3a. Assemble the check(s).** From `--object`/`--values`, or `--input <tsv>`. When the operator pastes SU53 output/screenshot, extract each failed check into a `{RUN_TEMP}` TSV (`checkid⇥object⇥field⇥value`) — one `checkid` per SU53 record, one row per field.
**3b. Run the engine:**
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_auth_diagnose_rfc.ps1" -Action check -User "<U>" -InputFile "<tsv>" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"
(or `-Object <O> -Values "F=V;F2=V2"` for a single check). Parse the lines:
`BUFFER_STALE` / `COULD_NOT_CHECK`), `fully`, the requested values, `closest_role`, what that role currently `grants`, and the object text (`otext`).
assignment), with name/validity/text.
**3c. Classify + render.** For each failing check, the verdict IS the diagnosis:
role that grants it (the request TXT names the object/field/value); if a specific PFCG role is the intended home, point the operator at it. `closest_role=-`.
Fix: extend `closest_role
SAP development automation skills for AI coding assistants. Windows-only — the skills drive SAP GUI for Windows via GUI Scripting (plus optional RFC via SAP NCo); there is no macOS/Linux path.
Repo: sapdev-ai/sap-dev
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a ranked, trap-annotated,…
Runs the SAP ABAP Test Cockpit (ATC) end-to-end as a quality gate: builds an SCI Object Set scoped to the target object(s), creates an ATC Run Series bound to…
Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via SAP NCo 3.1, calls…
Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto > Object Directory Entry). Routes by…
Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming (variable conventions), type (DDIC…