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…
Retrofit maintenance-line fixes into the project line without Solution Manager ChaRM — the detect/classify loop that a rotting spreadsheet can't do. `harvest` reads released maintenance TRs (E070/E071/E07T over RFC); `classify` diffs each object maint-vs-project via /sap-compare
$ npx -y skills add sapdev-ai/sap-dev --skill sap-retrofit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sap-retrofitContext preview
The summary Claude sees to decide when to auto-load this skill.
Retrofit maintenance-line fixes into the project line without Solution Manager ChaRM — the detect/classify loop that a rotting spreadsheet can't do. `harvest` reads released maintenance TRs (E070/E071/E07T over RFC); `classify` diffs each object maint-vs-project via /sap-compare
name: sap-retrofit description: | Retrofit maintenance-line fixes into the project line without Solution Manager ChaRM — the detect/classify loop that a rotting spreadsheet can't do. `harvest` reads released maintenance TRs (E070/E071/E07T over RFC); `classify` diffs each object maint-vs-project via /sap-compare and gathers project-line change evidence (VRSD versions + E071 dev-TR hits) to label it IN_SYNC / GREEN (project untouched — safe to auto-apply) / YELLOW (project also changed — needs a merge) / RED (can't diff reliably); `status` rolls up the persistent ledger; `draft` writes a reviewable two-way diff + AI merge draft (never deploys); `apply` deploys GREEN objects to the project line behind /sap-transport-request with a post-deploy re-compare, confirm-gated. The maintenance system is read-only forever. Prerequisites: /sap-login profiles (pinned = project line, --maint hint = maintenance line); SAP NCo 3.1 (32-bit). No Z-object, no dev-init. argument-hint: "init --project <id> --maint <hint> [--since YYYYMMDD] [--packages Z*,Y*] | harvest | classify [--max-objects N] | status [--report] | draft <OBJ> | apply --green-only"
Re-apply production (maintenance-line) fixes into the project line as a tracked, evidence-based loop instead of a rotting spreadsheet. **The maintenance line is read-only forever**; the only SAP writes are confirm-gated GREEN deploys to the project line, delegated to the workbench skills.
Task: $ARGUMENTS
**Connection roles:** pinned profile (via /sap-login) = **project line** (the write target). `--maint <hint>` = **maintenance line** (read-only), resolved like /sap-compare's `--against`. `apply` **hard-refuses** if a write would resolve to the maintenance profile.
---
| File | Token / call | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` | *(rule)* | **Rule 0 (highest priority)** — environment guard; enforced by Step 7 via `sap_safety_gate.ps1` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules | | `<SKILL_DIR>/references/sap_retrofit_ledger.ps1` | `-Action init\|append\|set-state\|watermark\|list` | Local workspace + state-machine ledger | | `<SKILL_DIR>/references/sap_retrofit_harvest.ps1` | `-MaintHint … [-Since -Packages -MaxTrs]` | Released maintenance TRs → per-object rows (RFC, read-only) | | `<SKILL_DIR>/references/sap_retrofit_evidence.ps1` | `-Objects "TYPE:NAME,…" -Baseline` | Project-line VRSD/E071/TADIR evidence (RFC, read-only) | | `/sap-compare` (Skill tool) | `<OBJ> --against <maint-hint>` | The maint-vs-project source/DDIC diff (its class-source limit applies) | | `/sap-se38` · `/sap-se37` (Skill tool) | deploy | `apply` deploy delegates (TR via /sap-transport-request inside them) | | `/sap-transport-request` (Skill tool) | TR | Never prompt for a TR — always delegate | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_read_source.ps1` | `Read-SapAbapSource` | `apply` maintenance-source fetch | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_finding_lib.ps1` / `sap_artifact_lib.ps1` | Step 8 | Findings + artifact index |
The workspace `{work_dir}\retrofit\<project>\` is a durable Bucket-A path (a later session must find the ledger) — never under `{RUN_TEMP}`.
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)); Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))"`{WS}` = `{work_dir}\retrofit\<project>`. Set `{RUN_TEMP}` = the `RUN_TEMP=` value printed above (`Get-SapRunTemp` mints + creates the per-run scratch dir holding the log state file) — for logging state; mint it once here and reuse (re-minting breaks the `-Action end` state-file lookup).
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_retrofit_run.json" -Skill sap-retrofit -ParamsJson "{}"`init` | `harvest` | `classify` | `status` | `draft` | `apply`. Except `init`, load `{WS}\project.json` (absent → `RETRO_LEDGER_IO`). Resolve `--maint` via the profile store. **For `apply`: if the maintenance profile resolves to the SAME SID+client as the pinned project profile, hard-refuse** (a retrofit that writes back to maintenance is a bug).
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_retrofit_ledger.ps1" -Action init -Workspace "{WS}" -MaintHint "<hint>" -Packages "<Z*,Y*>" -Since "<YYYYMMDD>"Writes `project.json` (maint hint, packages, watermark=since) + empty `ledger.tsv` + `diffs/`, `drafts/`, `reports/`.
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_retrofit_harvest.ps1" -MaintHint "<hint>" -Since "<watermark>" -Packages "<Z*,Y*>" -MaxTrs 500 -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"
Parse `TR:` and `OBJ: pgmid=… object=… obj_name=… tr=… released=… devclass=…`; append each object via the ledger (`-Action append`, dedupes across TRs, latest TR wins, all recorded). On `STATUS: OK`, advance the watermark (`-Action watermark -Since <today>`); `NO_NEW` → nothing to do. Never advance the watermark on `RFC_ERROR`.
For each HARVESTED object (cap `--max-objects`, default 50): 1. **Diff** — invoke `/sap-compare <OBJ> --against <maint-hint>` via the **Skill tool**; read its `diff.json` + unified diff; copy the bundle into `{WS}\diffs\<OBJ>\`. 2. **Evidence** — run `sap_retrofit_evidence.ps1 -Objects "TYPE:NAME" -Baseline <since>`; parse `EVIDENCE: … tadir=… vrsd=… e071=…`.
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…