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…
Author a new transaction-specific SAP skill from multiple natural-language scenarios. Runs /sap-gui-probe for each scenario, then merges the resulting probe folders into one coherent skill folder: SKILL.md with mode dispatch, one references/sap_<name>_<mode>.vbs per probe,
$ npx -y skills add sapdev-ai/sap-dev --skill sap-gui-skill-scaffold --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sap-gui-skill-scaffoldContext preview
The summary Claude sees to decide when to auto-load this skill.
Author a new transaction-specific SAP skill from multiple natural-language scenarios. Runs /sap-gui-probe for each scenario, then merges the resulting probe folders into one coherent skill folder: SKILL.md with mode dispatch, one references/sap_<name>_<mode>.vbs per probe,
name: sap-gui-skill-scaffold description: | Author a new transaction-specific SAP skill from multiple natural-language scenarios. Runs /sap-gui-probe for each scenario, then merges the resulting probe folders into one coherent skill folder: SKILL.md with mode dispatch, one references/sap_<name>_<mode>.vbs per probe, parameter tokens derived by cross-probe diff (values that vary across probes become %%TOKEN%%; values that stay constant bake in), popup-branch guards at every step where any probe observed a wnd[1] popup. Output is a ready-to-test draft. Prerequisites: active SAP GUI session (use /sap-login first). argument-hint: "<new-skill-name> --goal \"<one-line goal>\" | <name> --scenario \"...\" --scenario \"...\" | <name> --manifest <path>"
You author a new transaction-specific SAP skill from a small set of natural-language scenarios. Each scenario is probed via /sap-gui-probe; the resulting probe folders are merged by cross-probe diff to identify parameters (values that vary) vs. constants (values that stay the same). The output is a scaffolded skill folder under `{work_dir}\skill_scaffolds\<name>_<ts>\`.
Task: $ARGUMENTS
---
| File | Purpose | |---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | Mandatory operating rules | | `<SAP_DEV_CORE_SHARED_DIR>/rules/settings_lookup.md` | Settings model — merge per-key on `.value` (env var → `settings.local.json` → `userconfig.json` → `settings.json`); non-per-connection writes go to `userconfig.json` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/language_independence_rules.md` | GUI-scripting language independence — generated VBS templates MUST follow these rules (identify by component ID + DDIC field name, status-bar checks via `MessageType` codes, VKey instead of menu-text, no branching on `.Text`/`.Tooltip`/window titles) | | `<SAP_DEV_CORE_SHARED_DIR>/rules/abap_code_quality_rules.md` | ABAP code-quality rules — when scaffolding skills that emit or paste ABAP source (deploy / codegen / fix templates), the generated SKILL.md must reference this file and the templated VBS must not embed literal MESSAGE strings or other quality anti-patterns | | `<SKILL_DIR>/references/scenario_catalog.tsv` | Known-stuck-point catalog consulted by **Step 0.9** (`--goal` mode). Tab-separated; keyed by `txn` + `object_type`; each row maps a trap to a `scenario_type` + `applies` gate + `probe_hint`. Read by Claude (Read tool), not VBS. | | `<SKILL_DIR>/references/run_mode_test.ps1` | **Step 5.5** test-runner — substitutes a generated mode VBS's tokens, runs it via 32-bit cscript, captures end-state (MessageType / popup / screen) into `result.json`. | | `<SKILL_DIR>/references/verify_create_object.ps1` | **Step 5.5** create-mode verifier — routes by object type (DDIC → `sap_se11_post_activate_verify.ps1`; PROGRAM/FM/CLASS → RFC). Returns ACTIVE / INACTIVE / MISSING. Run under 32-bit PowerShell. |
---
**Resolve `work_dir` via the env-aware helper** — do NOT take `work_dir` from a direct `settings.json` read (that ignores the `SAPDEV_AI_WORK_DIR` env var and `userconfig.json`). Use the `WORK_DIR=` value printed by:
powershell -NoProfile -ExecutionPolicy Bypass -Command ". '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_settings_lib.ps1'; . '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Write-Output ('WORK_DIR=' + (Get-SapWorkDir))"The settings note below still applies to the OTHER keys.
**Settings reads/writes follow `shared/rules/settings_lookup.md`** — merge per-key on the `.value` field (env var → `settings.local.json` → `userconfig.json` → `settings.json`); non-per-connection writes go to `userconfig.json`. Read sap-dev-core's `settings.json` (2 levels up from `<SKILL_DIR>`). Read `work_dir`. Default: `C:\sap_dev_work`.
Derive:
New-Item -Path '{WORK_TEMP}' -ItemType Directory -Force | Out-Null
New-Item -Path '{SCAFFOLD_FOLDER}' -ItemType Directory -Force | Out-Null
$RUN_TEMP = (& { . '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Get-SapRunTemp })Use `New-Item -Force` rather than `cmd /c … mkdir` — Windows' built-in `mkdir` silently no-ops when the parent path is missing under some cmd.exe extension states, leaving `{SCAFFOLD_FOLDER}` uncreated and Step 0.5's `-StateFile` write below raising `DirectoryNotFoundException`. `New-Item -Force` is reliable cross-shell and creates intermediate directories.
---
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{SCAFFOLD_FOLDER}\sap_gui_skill_scaffold_run.json" -Skill sap-gui-skill-scaffold -ParamsJson "{\"new_skill\":\"<name>\",\"scenario_count\":\"<N>\"}"The probe runs invoked in Step 2 inherit this run as their parent via the `SAPDEV_PARENT_RUN_ID` env var, so `/sap-log-analyze` can reconstruct the scaffold → probe call tree.
---
First, confirm at least one SAP GUI session is attached:
C:/Windows/SysWOW64/cscript.exe //NoLogo "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_check_gui_login_status.vbs"
If status is not `LOGGED_IN`, stop and tell the user to run `/sap-login` first. Log end Status=FAILED ErrorClass=NO_SESSION.
Second, resolve the **active-session pin** via the connection lib:
. '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap
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…