Sap Browser Automation 标志

Sap Browser Automation

社区
secondsky
sap-browser-automation

Use when an agent must inspect or operate an authenticated SAP web UI through an in-app Browser, Microsoft Edge CDP, or an existing Playwright client, especially when SAP SSO reuse, isolated Edge profiles, deterministic target selection, screenshots, or browser bootstrap recovery is required.

概览

发布者secondsky
代码仓库sap-skills
技能名称sap-browser-automation
星标数
445
复刻数
117
附带文件
10
许可协议GPL-3.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 secondsky 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Sap Browser Automation AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/secondsky/sap-skills/tree/main/plugins/sap-browser-automation/skills/sap-browser-automation
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/secondsky/sap-skills.git /tmp/sap-skills
mkdir -p .claude/skills
cp -r /tmp/sap-skills/plugins/sap-browser-automation/skills/sap-browser-automation .claude/skills/sap-browser-automation
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Sap Browser Automation,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Sap Browser Automation。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Sap Browser Automation 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

SAP Browser Automation

Use this skill as the shared browser layer for SAP-specific skills. It owns surface selection, authentication bootstrap, isolated Edge/CDP startup, state reuse, target verification, evidence, recovery, and cleanup. The consuming skill still owns the SAP action boundaries: story edits, planning writeback, model changes, Datasphere deployment, SQL execution, and test acceptance.

Related Skills

  • sap-sac-scripting: SAC story/runtime scripting and reporting-story implementation.
  • sap-sac-test-automation: SAC acceptance, discovery packets, Playwright suites, and evidence.
  • sap-sac-planning: SAC planning models, writeback, versions, data actions, and locks.
  • sap-datasphere: Datasphere modeling, deployment, spaces, connections, and administration.
  • browser:control-in-app-browser: Installed in-app Browser runtime and secure manual authentication.

When to Use This Skill

Use this skill whenever an agent must interact with an authenticated SAP web UI, select or inspect a browser target, start Edge with loopback CDP, reuse an approved Edge profile, transfer scoped browser state to an already-installed compatible client, or recover from browser bootstrap/authentication failure. Do not use it for code-only, API-only, CLI-only, or database-native tasks that do not need visible browser state.

Quick Reference

NeedRoute
Manual SSO in the current browserIn-app Browser, then visible signed-in verification
Enterprise Edge or no Playwright installationFresh isolated Edge with copied profile and loopback CDP
Independent compatible browser contextExisting Playwright plus scoped storageState or CDP state transfer
Missing auth or failed browser bootstrapUser-assisted login, recovery, or specification-only handoff

Requested browser and connection are binding

If the user names Chrome, Edge, Chrome DevTools MCP, CDP, or a local DevTools bridge, use only that browser and connection method. Do not silently switch to the In-app Browser, a ChatGPT browser extension, Playwright, Computer Use, another browser, or shell automation. If the requested surface is not available, report the exact blocker and stop at that boundary.

Operating contract

  • Prefer a connector, API, CLI, or database-native check when it can answer the request without a browser.
  • Use the in-app Browser first only when the user has not named a different browser or connection method.
  • Ask the user to authenticate manually in the in-app Browser when its target redirects to SSO. Use its secure authentication capability; never ask for passwords or OTPs in chat.
  • After in-app verification, use the fresh Edge path for reliable automation when the task needs CDP, enterprise extensions, or a reusable profile.
  • Treat MCP configuration and MCP availability as separate checks. After configuration, verify that the server tools are present in the active tool registry. A successful codex mcp get check alone does not make the MCP usable.
  • Require a live handshake, such as list_pages, and verify that the returned pages belong to the requested browser. If the tools are missing after configuration, ask the user to restart Codex or open a new task before continuing.
  • Ask explicit permission before reusing the user's authenticated normal Edge profile or closing Edge.
  • Copy only after Edge is closed, and copy to an isolated profile path. Treat the copy, cookies, tokens, local storage, and storage-state files as credentials.
  • Bind CDP to 127.0.0.1; never expose the port, WebSocket endpoint, profile, or auth state to a network, repository, log, screenshot, or Oracle review.
  • Verify the tenant, host, path, title, authenticated DOM, and target page before interaction. Never guess the first tab or target ID.
  • Default to read-only actions. The consuming SAP skill must explicitly authorize writes, publishing, deployment, planning, model, permission, or destructive actions.
  • Browser startup, CDP attachment, or a successful login redirect is not evidence that the requested SAP task completed.

Load the focused references only when needed:

  • references/edge-cdp-control.md for Edge launch, CDP discovery, target selection, and recovery.
  • references/auth-state-bootstrap.md for copying an authenticated Edge profile, exporting scoped state when available, and injecting it into compatible clients.
  • references/in-app-browser-auth.md for manual in-app authentication and capability boundaries.
  • Run scripts/edge-profile.ps1 for deterministic profile cloning, launch, status, and stop operations.
  • Run scripts/cdp-agent.mjs for target discovery, inspection, interaction, screenshots, and authentication-state transfer. It requires Node.js 22 or newer and no npm packages.

Standard workflow

1. Classify the task and choose a surface

Record the target application, tenant/host, requested URL, read/write intent, evidence required, and whether the user approved profile reuse. Use this order:

  1. Existing non-browser tool if sufficient.
  2. The explicitly requested browser and connection method, after active-tool and live-handshake checks.
  3. In-app Browser for visible authenticated UI and manual SSO when no other browser or connection was requested.
  4. Fresh isolated Edge with loopback CDP for enterprise browser behavior and reusable authentication.
  5. Already-installed Playwright connected over CDP or using local storage state.
  6. Approved desktop/manual assistance or a specification-only handoff.

Do not install Playwright, browser binaries, MCP servers, or extensions in an enterprise environment unless the user explicitly requests and approves that change. If Playwright is unavailable, Edge/CDP remains the primary automation surface.

2. Authenticate in the in-app Browser

When no other browser or connection was requested, open the target using the installed Browser skill. Inspect visible state. If the page requires SSO, pause for the user to complete the login manually through the supported secure auth flow. Verify a positive signed-in signal on the target domain and retain a screenshot or equivalent evidence when allowed.

Do not extract cookies, local storage, session storage, profile databases, passwords, or tokens from the in-app Browser. Its session is independent from Edge. If it cannot expose an authenticated page after manual login, record the failure and continue to the approved Edge path.

This route runs inside Codex or Claude Desktop. Its runtime validation is deferred to those desktop environments and is not part of the standalone Edge/CDP acceptance tests.

3. Capture live Edge state, then bootstrap fresh Edge

Before touching the user's normal Edge profile, state the intended scope and ask for confirmation:

I will capture the approved SAP session from the currently authenticated Edge target, close normal Edge, and clone its selected profile into an isolated automation directory. May I continue?

If the user declines, ask them to authenticate once in the isolated profile. If they approve:

  1. Identify the normal Edge user-data root, selected Default or Profile N, target URL, tenant host, target path/title, approved SAP origin, and local temporary state-file path.
  2. While normal Edge is still running and visibly authenticated, open edge://inspect/#remote-debugging and enable Allow remote debugging for this browser instance.
  3. Run scripts/cdp-agent.mjs export-auth against the normal user-data directory. Require host, path, and/or title filters that resolve exactly one approved page. Repeat --origin for approved SAP or identity-provider cookie scopes.
  4. Close normal Edge and verify no msedge.exe process still owns the source profile.
  5. Run scripts/edge-profile.ps1 -Action CloneLaunch with the selected profile name and a new or empty automation root. The helper preserves Profile N, refuses non-empty clone destinations, launches with --remote-debugging-port=0, and verifies the listener discovered through DevToolsActivePort.
  6. Run scripts/cdp-agent.mjs inspect and verify tenant, path, title, visible signed-in state, and page readiness.
  7. If cloning lost volatile state, run scripts/cdp-agent.mjs import-auth against the isolated target, reload, and repeat the authenticated-state inspection.
  8. If authentication still fails, ask the user to log in once in the isolated profile. Reuse it later with scripts/edge-profile.ps1 -Action LaunchExisting; never clone over a populated automation root.

The complete Windows commands, path checks, CDP probes, and recovery matrix are in references/edge-cdp-control.md and references/auth-state-bootstrap.md.

4. Operate the verified target

Use the isolated Edge instance directly. Run scripts/cdp-agent.mjs --help for the complete command surface. The bundled driver supports deterministic targets, inspection/snapshot, navigation, evaluation, selector or coordinate clicks, text entry, key presses, screenshots, and auth-state export/import without Playwright. Use an existing Playwright installation only when the consuming task needs it; do not install it for this workflow.

Authentication transfer uses CDP Storage.getCookies and Storage.setCookies plus page-scoped localStorage and sessionStorage. Recheck SSO redirects, SameSite behavior, certificates, and visible readiness after import. The in-app Browser remains a separate session.

5. Verify readiness and perform the domain action

Before changing anything, verify:

  • tenant and application identity;
  • authenticated state, not merely a non-login URL;
  • correct Story Designer, Modeler, Data Builder, SQL editor, or test target area;
  • visible readiness markers and absence of blocking errors;
  • approved host/path and selected target page;
  • current model/story/widget metadata when the consuming skill requires it.

Capture page-specific evidence and explicit no-data/error states. Do not treat a spinner disappearing, CDP connecting, or a browser window opening as task completion.

6. Recover or hand off honestly

Use the following fallback sequence:

  1. Retry the selected browser using its documented troubleshooting guidance.
  2. Use the Edge/CDP recovery and DevToolsActivePort fallback.
  3. Ask for one-time manual authentication in the isolated Edge profile.
  4. Use approved desktop/manual assistance if the environment supports it.
  5. If no authenticated target can be verified, stop and provide an implementation-ready specification, the exact missing evidence, and the next manual action.

When the user explicitly named a browser or connection method, do not use this sequence to switch to a different surface. Stop when the requested surface is unavailable or its live handshake fails.

Report authentication as verified, missing, expired, blocked, or unknown; never infer success from browser bootstrap alone.

Troubleshooting

Common failures are handled in the shared Edge reference: refused or missing CDP endpoints, 404 discovery responses, wrong targets, SSO redirects, copied profiles that are not authenticated, policy blocks, and runtime/widget errors. When recovery cannot establish a verified authenticated target, stop and hand off the missing evidence rather than guessing or claiming completion.

Sources and Verification

The public-source review and the distinction between documented behavior and unverified tenant behavior are recorded in docs/project/sap-browser-automation-source-review-2026-07-14.md.

Safety and evidence

Profile copies and auth-state files may contain cookies, refresh tokens, saved passwords, history, extensions, and enterprise session data. Keep them in a user-local path with restricted access. Do not place them under the repository, commit them, send them to Oracle, include them in bug reports, or paste their contents into chat. Redact tenant IDs, story IDs, query strings, session-like URL values, cookie values, WebSocket endpoints, and unrelated tabs from evidence.

For any write-capable action, record the approving user, target, intended mutation, before/after verification, and rollback or cleanup status. The consuming SAP skill remains authoritative for whether the action itself is allowed.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Sap Browser Automation AI 技能有什么作用?

Use when an agent must inspect or operate an authenticated SAP web UI through an in-app Browser, Microsoft Edge CDP, or an existing Playwright client, especially when SAP SSO reuse, isolated Edge profiles, deterministic target selection, screenshots, or browser bootstrap recovery is required.

为什么在 TypingMind 中使用 Sap Browser Automation?

因为您只需安装一次,就能搭配任何模型使用。Sap Browser Automation 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Sap Browser Automation?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/secondsky/sap-skills/tree/main/plugins/sap-browser-automation/skills/sap-browser-automation。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Sap Browser Automation?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Sap Browser Automation 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Sap Browser Automation 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Sap Browser Automation AI 技能免费吗?

是的。secondsky 已在 GitHub 上根据 GPL-3.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇