Skip to content
Development
Skill

/sap-git

Install-free, read-only git backend for custom ABAP: gives Z code the PR-style review, blame, readable TR diffs, and whole-package-on-disk that abapGit would — without installing abapGit (often politically impossible on customer systems) and without ever writing to SAP. snapshot

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-git --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-git

Context preview

The summary Claude sees to decide when to auto-load this skill.

Install-free, read-only git backend for custom ABAP: gives Z code the PR-style review, blame, readable TR diffs, and whole-package-on-disk that abapGit would — without installing abapGit (often politically impossible on customer systems) and without ever writing to SAP. snapshot

SKILL.md

sap-git.SKILL.md
name: sap-git
description: |
  Install-free, read-only git backend for custom ABAP: gives Z code the PR-style review, blame,
  readable TR diffs, and whole-package-on-disk that abapGit would — without installing abapGit
  (often politically impossible on customer systems) and without ever writing to SAP. snapshot
  serializes a PACKAGE / TR / object-list scope to an abapGit-ISH tree over proven RFC reads and
  commits it to a local git repo with the TRs currently referencing the scope annotated in the
  message; diff re-serializes and shows working-system-vs-last-snapshot as a git diff; log/status
  are local git reads. Fully headless (no GUI/VBS), zero SAP writes. Fidelity is tri-state and
  honest: programs / function modules / message classes are FULL (RPY + T100 reads); DDIC
  (tables/data-elements/domains/table-types/views) and classes are PARTIAL deterministic metadata
  JSON (direct DD0xL / SEO reads — class SOURCE over RFC is unsupported, so classes ship as
  explicit metadata stubs; full DDIC via the Z_GENERIC_RFC_WRAPPER_TBL DDIF_*_GET path is v1.5);
  unsupported types are SKIPPED_UNSUPPORTED, never silently dropped. A hard determinism contract
  (volatile DDIC fields stripped, rows sorted by key) makes snapshot-twice yield an EMPTY diff —
  the property that makes diff trustworthy. It REFUSES any import/push/apply request (v1 is
  read-only; use the deploy skills). NOT abapGit-import-compatible (metadata is our JSON). No Z
  objects deployed. Prerequisites: git in PATH; pinned RFC profile via /sap-login; NCo 3.1
  (32-bit). /sap-dev-init is optional but recommended (its wrapper unlocks full DDIC fidelity in v1.5).
argument-hint: "snapshot PACKAGE <ZPKG> [--subpackages] | TR <TRKORR> | --objects <file> [--repo <dir>] [--message \"...\"] [--no-commit] | diff <scope> [--object <N>] [--stat] | log [--object <N>] [--max N] | status"

SAP Git Skill

You put custom ABAP under local git: serialize a scope to disk over read-only RFC, commit with TR annotations, and diff/blame with real `git`. You never write to SAP and never push. Fidelity is honest per object (FULL / PARTIAL / COULD_NOT_CHECK / SKIPPED_UNSUPPORTED).

Task: $ARGUMENTS

---

Shared Resources

| File | Token / call | Purpose | |---|---|---| | `<SKILL_DIR>/references/sap_git_repo.ps1` | `-Action ensure\|commit\|diff\|log\|status\|reset` | Local git plumbing (no SAP) | | `<SKILL_DIR>/references/sap_git_serialize.ps1` | `-Scope -RepoDir` | RFC serializer (scope -> tree + manifest) | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_read_source.ps1` | dot-sourced (by serializer) | `Read-SapAbapSource` for PROG/FM | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_object_resolver.ps1` | dot-sourced | Scope/object resolution | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1` | dot-sourced | `Register-SapArtifact` | | `/sap-login` | sub-skill | Pinned RFC profile | | `/sap-dev-init` | sub-skill | (optional) deploys the wrapper for v1.5 full DDIC |

---

Step 0 — Resolve Work Directory

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))"

Step 0.5 — Start Logging

powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_git_run.json" -Skill sap-git -ParamsJson "{}"

---

Step 1 — Parse Arguments & Refuse Writes

Modes: `snapshot` | `diff` | `log` | `status`. **Any `import` / `push` / `apply` / "write back to SAP" phrasing -> REFUSE** with: "sap-git is a read-only backend (v1); to deploy use /sap-se38 / /sap-se37 / /sap-se24 / /sap-se11." Scope forms: `PACKAGE <p> [--subpackages]`, `TR <trkorr>`, `--objects <file>`. Flags: `--repo <dir>`, `--message "<extra>"`, `--no-commit`, `--object <N>`, `--stat`, `--max N`, `--save-to <file>`.

Step 1.5 — Preflights

  • `git --version` (via `sap_git_repo.ps1 -Action status`) — missing -> `GIT_NOT_INSTALLED`

(fix: winget install Git.Git). snapshot/diff also need a pinned RFC profile (`/sap-login`).

  • Wrapper presence is NOT required in v1 (DDIC ships PARTIAL either way); note `fidelity=FULL_CORE`

regardless — the wrapper only matters for the v1.5 full-DDIC path.

Step 2 — Repo Resolve/Init

Repo dir = `--repo`, else `Get-SapSettingValue 'sap_git_repo_dir' '{work_dir}\git'` + `\<SID>_<CLIENT>` (one repo per system-client). Run:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_git_repo.ps1" -Action ensure -RepoDir "<repo>" -Sid <SID> -Client <CLIENT> -SapUser <USER>

`DIRTY: 1` -> refuse `GIT_REPO_DIRTY` (fix: commit/stash manually or pass a fresh `--repo`) — this guarantees diff's post-run `git reset --hard` can only ever discard files THIS run wrote.

Step 3 — Serialize (snapshot / diff)

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_git_serialize.ps1" -Scope "PACKAGE <ZPKG>" -RepoDir "<repo>" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"

(`-Subpackages`, `-ObjectsFile <file>` for the other scope forms.) Parse each `GIT: <TYPE> <NAME> <fidelity>` line + the `SERIALIZE: total=.. full=.. partial=.. cnc=.. skipped=..` summary. Empty scope -> `SNAPSHOT_EMPTY_SCOPE`, stop. Every affected object with no wrapper degrades to PARTIAL / COULD_NOT_CHECK — a class stub or DDIC metadata is NEVER presented as a full serialization.

Step 4 — snapshot: TR annotation + commit

Read the TRs currently holding scope objects (E071 join E070 + E07T texts — honest label "TRs referencing scope at snapshot time", not "since last snapshot"). Build the commit message (`snapshot <scope>` + SID/client + release marker + the TR lines + any `--message`) into `{RUN_TEMP}\commit_msg.txt`, then (unless `--no-commit`):

`

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.