Skip to content
Development
Skill

/sap-gui-skill-scaffold

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,

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-gui-skill-scaffold --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/sap-gui-skill-scaffold

Context 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,

SKILL.md

sap-gui-skill-scaffold.SKILL.md
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>"

SAP GUI Skill Scaffold

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

---

Shared Resources

| 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. |

---

Step 0 — Resolve work directory + scaffold folder

**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:

  • `{WORK_TEMP}` = `{work_dir}\temp`
  • `{RUN_TEMP}` = the per-run scratch dir (`Get-SapRunTemp` mints + creates `{work_dir}\temp\run_<id>`) — used for ad-hoc probe/cleanup scratch (e.g. the `scaffold_cleanup.json` verb file) so concurrent scaffolds never collide on a fixed name
  • `{TS}` = current timestamp `yyyyMMdd-HHmmss`
  • Parse new skill name + scenarios from `$ARGUMENTS` (see Step 1).
  • `{SCAFFOLD_FOLDER}` = `{work_dir}\skill_scaffolds\<new-skill-name>_<TS>`
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.

---

Step 0.5 — Start logging

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.

---

Step 0.7 — Pre-flight: GUI session + active-session pin

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
Read more
Ships withsap-dev

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.

Get the whole plugin

Other skills on sap-dev.