Logo vun Trust Session

Trust Session

Communautéit
babamba2
trust-session

INTERNAL-ONLY permission bootstrap. Pre-approves Agent dispatch + `.sc4sap/` state-file I/O for the session so parent-skill pipelines run without prompts. SAP MCP handlers are auto-approved by the `permission-approver` PreToolUse hook (except GetTableContents / GetSqlQuery, which stay prompt-gated). MUST be invoked by a parent skill (create-program, setup, team, analyze-*, create-object) — direct user invocation is rejected with a redirect message.

Iwwersiicht

Editeurbabamba2
Repositorysuperclaude-for-sap
Skill-Nummtrust-session
Stären
69
Forks
26
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum babamba2 op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Trust Session an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/babamba2/superclaude-for-sap/tree/main/skills/trust-session
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/babamba2/superclaude-for-sap.git /tmp/superclaude-for-sap
mkdir -p .claude/skills
cp -r /tmp/superclaude-for-sap/skills/trust-session .claude/skills/trust-session
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Trust Session an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Trust Session automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Trust Session net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

SC4SAP Trust Session (Internal-Only)

Session-scoped permission bootstrap for automated pipelines. When a long-running parent skill enters its automated phases, sub-agent dispatch (Agent/Task) and .sc4sap/ state-file writes would otherwise trigger permission prompts. This skill pre-grants those so the parent pipeline proceeds uninterrupted.

⚠️ This skill is NOT user-facing. It exists only as a sub-routine of other skills. user-invocable: false hides it from the / menu and Claude Code refuses a typed /sc4sap:trust-session; the gate in <Standalone_Invocation_Refusal> below covers the remaining case — the model invoking it through the Skill tool without a parent skill.

<Permission_Model_Note> SAP MCP handler permissions are NOT managed by this skill anymore. They are auto-approved at call time by the permission-approver PreToolUse hook (scripts/permission-approver.mjs, wired in hooks/hooks.json), which returns permissionDecision: "allow" for every mcp__plugin_sc4sap_sap__* / mcp__mcp-abap-adt__* tool except the two row-data extraction tools (GetTableContents, GetSqlQuery), which fall through to normal prompting plus the block-forbidden-tables safeguard. The hook runs in BOTH the main thread and sub-agents, regardless of session permission mode — this replaces the former settings.local.json MCP enumeration and the deprecated mode: "dontAsk" Agent-dispatch parameter (ignored by current Claude Code; sub-agents now inherit the parent session's permission mode). trust-session therefore only handles the NON-MCP grants below. </Permission_Model_Note>

<Response_Prefix> Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention. </Response_Prefix>

<Standalone_Invocation_Refusal> MANDATORY gate — runs as Step 0 before any file write.

Detect whether this skill is being invoked standalone or by a parent skill:

  • Parent skill present: the invocation is chained from /sc4sap:create-program, /sc4sap:setup, /sc4sap:analyze-cbo-obj, /sc4sap:analyze-code, /sc4sap:analyze-symptom, /sc4sap:create-object, /sc4sap:program-to-spec, /sc4sap:package-to-process, /sc4sap:module-to-process, /sc4sap:compare-programs, or /sc4sap:program-to-manual. The caller passes parent_skill={name} as the first argument OR the invocation appears inside another skill's execution trace in the current turn.
  • Standalone (no parent): invoked through the Skill tool outside any parent skill's execution, or the arguments do not identify a known parent. (A user-typed /sc4sap:trust-session never reaches this skill — user-invocable: false blocks it.)

On standalone invocation, refuse and redirect:

⚠️ /sc4sap:trust-session is an internal-only skill. Direct invocation is not allowed.

To grant session-wide permissions for an automated pipeline, run one of the following
parent skills instead (each auto-invokes trust-session at entry):

  • /sc4sap:create-program       — program creation pipeline (invokes at Phase 1)
  • /sc4sap:create-object        — single object creation
  • /sc4sap:analyze-cbo-obj      — CBO package inventory walk
  • /sc4sap:analyze-code         — code review
  • /sc4sap:analyze-symptom      — dump / error root-cause analysis

→ A separate trust-session run is unnecessary — the parent skill handles it for you.

After printing the message, STOP. Do NOT modify .claude/settings.local.json. Do NOT write .sc4sap/session-trust.log. </Standalone_Invocation_Refusal>

<Use_When>

  • Called automatically as Phase 0 / entry step of a parent skill (see list above)
  • Parent skill passes parent_skill={name} argument to identify itself </Use_When>

<Do_Not_Use_When>

  • No parent skill is running → refuse per <Standalone_Invocation_Refusal>
  • Running on a production SAP system without change authorization </Do_Not_Use_When>

<What_This_Skill_Does> Single-layer, non-MCP permission grant written to .claude/settings.local.json → permissions.allow (project-local, persists). Scope policy: sub-agent dispatch + .sc4sap/ state I/O only. SAP MCP is handled by the hook; everything else stays prompt-gated.

  • Sub-agent dispatch — allowed:
    • Agent(*) — required so parallel review fan-out and any other sub-agent dispatch run without prompts. Each sub-agent's MCP calls are still auto-approved individually by the permission-approver hook; its non-MCP tool calls follow this same allowlist.
  • Internal state file I/O — allowed (path-scoped):
    • Edit(.sc4sap/**) — runtime state files only (state.json, spec.md, plan.md, review.md, report.md, cbo/**, session-trust.log, etc.). Writes outside .sc4sap/** still prompt.
    • Read(.sc4sap/**), Read(sc4sap/**) — read and search project state and rule files.
    • Claude Code path checks match only Read(path) (covers Read/Glob/Grep) and Edit(path) (covers Edit/Write/NotebookEdit). Never write Write(path) / Glob(path) / Grep(path) — they never match and Claude Code warns at startup.
  • Everything else — NOT added to allow (normal prompt behavior preserved):
    • Bash(...) — prompt per command.
    • Write / Edit outside .sc4sap/** — prompt (protects sc4sap/ source, .claude/, elsewhere).
    • WebFetch / WebSearch and any non-SAP MCP namespace (mcp__claude_ai_Notion__*, mcp__ide__*, …) — prompt.
    • SAP MCP handlers — NOT added here; the hook approves them at call time (do NOT enumerate them in settings.local.json).

Idempotent: if an entry already exists, do not duplicate.

Row-data extraction stays gated: GetTableContents / GetSqlQuery (both namespaces) are never auto-approved — the hook passes them through to the normal prompt, and block-forbidden-tables enforces the blocklist. See common/data-extraction-policy.md. </What_This_Skill_Does>

<Execution_Steps> 0. Standalone gate — if <Standalone_Invocation_Refusal> conditions match, refuse and STOP.

  1. Read .claude/settings.local.json (create {"permissions":{"allow":[]}} skeleton if missing).
  2. Strip forbidden broad entries if present — remove these from permissions.allow when found (they violate the scoped policy):
    • Broad wildcards: Read(*), Write(*), Edit(*), Glob(*), Grep(*).
    • SAP MCP entries added by a prior version or by an "Always allow" click — the hook now owns MCP approval, so enumerated mcp__plugin_sc4sap_sap__* / mcp__mcp-abap-adt__* entries are redundant and the wildcards mcp__plugin_sc4sap_sap__* / mcp__mcp-abap-adt__* MUST be removed (a wildcard would silently auto-approve GetTableContents / GetSqlQuery, defeating the safeguard). Removing enumerated non-gated MCP entries is optional cleanup; removing the two gated tools and any MCP wildcard is MANDATORY.
    • Non-SAP MCP wildcards: mcp__claude_ai_Notion__*, mcp__ide__*.
    • Stale path rules from prior versions (never matched by Claude Code; cause a startup warning): Write(.sc4sap/**), Glob(.sc4sap/**), Glob(sc4sap/**), Grep(.sc4sap/**), Grep(sc4sap/**). Remove these exact strings only — leave any other user-added rule untouched.
  3. Append scoped entries to permissions.allow only if not already present:
    Agent(*)
    Read(.sc4sap/**)
    Read(sc4sap/**)
    Edit(.sc4sap/**)
  4. Preserve all other existing entries verbatim (env, hooks, other permissions).
  5. Write the updated JSON back with 2-space indent.
  6. Print one-line confirmation: "✅ Session trust granted by {parent_skill} — Agent dispatch + .sc4sap/ state I/O auto-approved. SAP MCP handlers are auto-approved by the permission-approver hook; Bash, WebFetch, file edits outside .sc4sap/, GetTableContents, GetSqlQuery remain prompt-gated."
  7. Record activation in .sc4sap/session-trust.log (append line: {ISO-timestamp} granted-by={parent_skill}) for audit. </Execution_Steps>

<Enforcement_Contract>

  • Parent skills invoke trust-session with parent_skill={self-name} at entry, before their first sub-agent dispatch.
  • SAP MCP permission prompts are handled by the permission-approver hook — parent skills do NOT pass any mode parameter to Agent (the parameter is deprecated and ignored by current Claude Code).
  • If the user has DISABLE_SC4SAP=1 (or DISABLE_OMC=1) set, skip the allowlist writes and warn.
  • Standalone refusal is non-negotiable — even if the user insists, the refusal message stands. </Enforcement_Contract>

<State_Files>

  • .claude/settings.local.json — permissions allowlist (modified)
  • .sc4sap/session-trust.log — audit trail </State_Files>

Task: $ARGUMENTS

Heefeg gestallte Froen

Wat mécht de KI-Skill Trust Session?

INTERNAL-ONLY permission bootstrap. Pre-approves Agent dispatch + `.sc4sap/` state-file I/O for the session so parent-skill pipelines run without prompts. SAP MCP handlers are auto-approved by the `permission-approver` PreToolUse hook (except GetTableContents / GetSqlQuery, which stay prompt-gated). MUST be invoked by a parent skill (create-program, setup, team, analyze-*, create-object) — direct user invocation is rejected with a redirect message.

Firwat Trust Session op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Trust Session besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Trust Session an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/babamba2/superclaude-for-sap/tree/main/skills/trust-session an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Trust Session benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Trust Session benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Trust Session domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Trust Session gratis?

Jo. De Skill gëtt vum babamba2 ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇