Logo Trust Session

Trust Session

Cộng đồng
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.

Tổng quan

Nhà phát hànhbabamba2
Kho mãsuperclaude-for-sap
Tên kỹ năngtrust-session
Sao
69
Bản fork
26
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được babamba2 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Trust Session trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/babamba2/superclaude-for-sap/tree/main/skills/trust-session
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Trust Session trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Trust Session ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Trust Session không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

Câu hỏi thường gặp

Kỹ năng AI Trust Session làm được gì?

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.

Vì sao nên dùng Trust Session trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Trust Session là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Trust Session trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/babamba2/superclaude-for-sap/tree/main/skills/trust-session. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Trust Session?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Trust Session với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Trust Session với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Trust Session có miễn phí không?

Có. Kỹ năng này được babamba2 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇