plugins/sap-browser-automation/skills/sap-browser-automation/SKILL.md
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.
npx skillsauth add secondsky/sap-skills sap-browser-automationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
| Need | Route |
| --- | --- |
| Manual SSO in the current browser | In-app Browser, then visible signed-in verification |
| Enterprise Edge or no Playwright installation | Fresh isolated Edge with copied profile and loopback CDP |
| Independent compatible browser context | Existing Playwright plus scoped storageState or CDP state transfer |
| Missing auth or failed browser bootstrap | User-assisted login, recovery, or specification-only handoff |
127.0.0.1; never expose the port, WebSocket endpoint, profile, or auth state to a network, repository, log, screenshot, or Oracle review.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.scripts/edge-profile.ps1 for deterministic profile cloning, launch, status, and stop operations.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.Record the target application, tenant/host, requested URL, read/write intent, evidence required, and whether the user approved profile reuse. Use this order:
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.
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.
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:
Default or Profile N, target URL, tenant host,
target path/title, approved SAP origin, and local temporary state-file path.edge://inspect/#remote-debugging and enable Allow remote debugging for this browser instance.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.msedge.exe process still owns the source profile.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.scripts/cdp-agent.mjs inspect and verify tenant, path, title, visible signed-in state, and page readiness.scripts/cdp-agent.mjs import-auth against the isolated target,
reload, and repeat the authenticated-state inspection.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.
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.
Before changing anything, verify:
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.
Use the following fallback sequence:
DevToolsActivePort fallback.Report authentication as verified, missing, expired, blocked, or unknown; never infer success
from browser bootstrap alone.
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.
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.
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.
tools
Use when automating SAP BW query inspection, InfoProvider metadata reads (characteristics, key figures), metadata-verified specification review, unsaved draft preparation, or human-confirmed query draft population through Eclipse or HANA Studio with BW Modeling Tools.
tools
Evidence-based assessment of whether an SAP API/interface usage scenario aligns with the SAP API Policy (v.4.2026a). Use whenever someone asks whether a way of calling SAP is allowed/compliant — e.g. Published API vs internal/private/"confidential" API status, "Documented Use", whether a third-party tool / iPaaS / middleware / RPA bot / AI agent / MCP server may call SAP APIs, agentic or generative-AI access to SAP, bulk data extraction or replication into a lake/warehouse, custom Z/Y OData or RFC/BAPI wrappers and Clean Core, ADT/developer-tooling boundaries, ODP-RFC and other "not permitted" interfaces, partner Integration Certification, or RISE integration remediation. Trigger even when the policy is not named, e.g. "are we allowed to…", "is it compliant to…", "can we connect X to SAP…", "will this break under the new API policy". Produces a sourced technical assessment with a confidence level — explicitly NOT legal advice and NOT a final SAP compliance decision.
development
SAP-RPT-1-OSS local tabular prediction workflows for FI/CO prototype datasets. Use when preparing SAP finance CSV exports for classification or regression experiments with source-verified setup, leakage checks, and governance review.
tools
SAP Analytics Cloud (SAC) automated testing skill for designing capability-gated browser discovery and deterministic Playwright test suites for SAC stories, dashboards, reports, planning workflows, comments, permissions, visual regression, and reusable QA automation. This skill should be used when building SAC end-to-end tests, onboarding SAC dashboards into Playwright, creating dashboard profiles or scenario YAML, using Microsoft Edge/CDP, Chrome DevTools MCP, Vercel Labs agent-browser, or manual discovery for SAC components, testing SAC optimized stories, configuring SAC auth storage state, managing visual/data baselines, testing comments, planning writeback, data actions, multi actions, role-based views, restricted Windows/company environments, or creating SAC failure triage artifacts.