/sap-project:sap-img-find "<natural-language question>" [--top N] [--launch] [--refresh] | harvest [--refresh] | show <ACTIVITY> | launch <ACTIVITY>from sap-project
Maps natural-language questions about SAP configuration to exact SPRO/IMG paths and transaction codes by semantically searching a locally harvested IMG index.
Ships in sap-project. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You answer "where in SPRO do I configure X?" semantically: harvest the IMG index once, then
prefilter + rank against the question, always showing the full path + tcode so a wrong hit is
cheap. launch only navigates (never saves) behind a confirm gate.
Task: $ARGUMENTS
| File | Token / call | Purpose |
|---|---|---|
<SKILL_DIR>/references/sap_img_harvest.ps1 | -CacheDir -Profile | One-time RFC harvest -> per-system cache (img_index.tsv + meta.json) |
<SKILL_DIR>/references/sap_img_query.ps1 | -CacheDir -Keywords -OutFile | Lexical prefilter -> shortlist (full index never enters context) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1 · sap_connection_lib.ps1 · sap_settings_lib.ps1 | dot-source | RFC connect + img_cache_dir setting |
/sap-login · /sap-config-compare | sub-skills | Session/profile / (v2) compare an activity's tables cross-system |
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). Resolve img_cache_dir (default
{work_dir}\cache\img_index) via sap_settings_lib.ps1; the per-system cache is
{img_cache_dir}\<SID>_<client>\. Start logging (sap_log_helper.ps1).
"<question>" (find, default) | harvest | show <ACTIVITY> | launch <ACTIVITY>. Pinned RFC
profile via /sap-login.
Cache missing -> auto-run harvest (tell the user: one-time, a couple minutes). meta.json older
than the TTL (30 days) -> WARN IMG_CACHE_STALE, proceed, suggest --refresh. --refresh ->
harvest first.
... sap_img_harvest.ps1 -CacheDir "<cache>" -Profile <hint>
IMGH: per-table row counts + IMGH: INDEX activities=.. index_rows=... A core table reading 0
rows -> IMG_HARVEST_INCOMPLETE (never a silently thin index). Writes img_index.tsv (activity /
tcode / node_text / spro_path / objects) + meta.json.
sap_img_query.ps1 -Keywords "<list>" -OutFile "{RUN_TEMP}\img_shortlist.tsv" -> the shortlist.Print one activity's dossier from the cache (all SPRO paths, tcode, maintenance objects).
IMG_ACTIVITY_NOT_FOUND if absent.
Resolve target: generated TCODE from the index (priority 1) -> /n<tcode>; else a maintenance
object -> SM30/SM34 in Display; else print the manual SPRO path (IMG_LAUNCH_NO_TARGET, INFO).
CONFIRM gate: "Open IMG activity <ID> (<text>) via <tcode|SM30 obj> on <SID>/<client>?
The skill only NAVIGATES, never saves. (yes/no)". The tcode path drives /n<tcode> and verifies
arrival via session.Info.Transaction; the SM30/SM34 fallback VBS is not yet shipped
(to-be-recorded): emit NEEDS_RECORDING and capture it once via /sap-gui-probe --record.
On no -> SKIPPED.
Register-SapArtifact (scope SYSTEM_<SID>_<client>; kind img_find_result for a find,
img_index for a harvest; coverage CHECKED, or COULD_NOT_CHECK when the cache is stale/incomplete
and the user proceeded) for /sap-evidence-pack.
Log end (SUCCESS/FAILED/SKIPPED + error_class). Error classes: IMG_LAYOUT_UNKNOWN,
IMG_HARVEST_INCOMPLETE, IMG_CACHE_STALE (WARN), IMG_ACTIVITY_NOT_FOUND, IMG_LAUNCH_NO_TARGET
(INFO), IMG_LAUNCH_FAILED; reused RFC_LOGON_FAILED / GUI_TIMEOUT.
--against cross-system presence (config-compare
pattern); config-workbook paragraph output (DOKIL/DOKHL doc text). v2: project/add-on IMG
structures (v1 scopes the SAP Reference IMG); S/4 Fiori-relocated (SSCUI) activities flagged.IMG_LAYOUT_UNKNOWN, never a guessed harvest.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sap-im, spro, configuration-finder, rfc, natural-language-search
npx claudepluginhub sapdev-ai/sap-dev --plugin sap-project40 skills in this plugin
/sap-auth-diagnoseDiagnoses "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).
/sap-auth-requirementsDerives the SAP authorization requirements a custom development actually needs — the
deliverable Z-transactions never hand the security team. derive reads a program/FM source over
RFC, extracts the EXPLICIT AUTHORITY-CHECK surface plus the IMPLICIT one (CALL TRANSACTION ->
S_TCODE, SUBMIT -> S_PROGRAM, OPEN/DELETE DATASET/TRANSFER -> S_DATASET, CALL FUNCTION
DESTINATION -> S_RFC, DDIC table writes -> S_TABU_DIS incl. dynamic MODIFY (var)), traces each
value to its nearest literal, and validates every object/field/activity against the live
catalog (TOBJ / TACTZ) — emitting a required-auth matrix with per-row CONFIRMED / INFERRED
honesty plus an SU24 proposal draft. su24-audit lists Z/Y tcodes against USOBX_C / USOBT_C and
flags the real gap: NO_PROPOSAL / CHECK_DISABLED / ONLY_S_TCODE / PROPOSAL_PRESENT with a
staleness date. Pure RFC + offline extraction (no wrapper FM, no dev-init, runs on a bare
security profile); a static value that cannot be resolved is INFERRED, never silently
CONFIRMED. Class/interface source needs an SE24 GUI download (pass --source-files) or degrades
to COULD_NOT_CHECK. Owns the AUTHREQ_* finding namespace so it never double-reports with
/sap-review-abap's security dimension. v2: su24-maintain / su21-create (confirm-gated GUI).
Prerequisites: pinned /sap-login RFC profile; NCo 3.1 (32-bit).
Other plugins' skills for the same job