What problem does it solve?
This Skill solves the challenge of implementing Clerk authentication in Chrome extensions where popup/side panel flows cannot reliably handle OAuth/SAML and where background service workers and content scripts must follow strict token and origin constraints.
Core Features & Use Cases
- Popup/Side Panel Auth Guardrails: Uses Clerk extension UI components correctly while enforcing that OAuth and SAML are delegated rather than executed in the extension UI.
- syncHost Delegation for Web-App-Based OAuth/SAML: Keeps extension auth in sync with a companion web app so users can authenticate once and the extension reflects that state.
- createClerkClient for Background/Headless: Fetches and refreshes session tokens in service workers via the correct client import and the background: true option.
- Content Script Token Access via Message Passing: Enables page-side UI injection based on authenticated state by requesting tokens from the background worker rather than calling Clerk directly.
- Stable CRX ID and Allowed Origins: Prevents auth breakage after rebuilds by pinning the extension key/ID and updating Clerk allowed origins accordingly.
Quick Start
Use the clerk-chrome-extension-patterns skill to set up your popup auth and, when you need OAuth or SAML, configure syncHost with host_permissions plus a stable CRX ID so the extension can delegate and reliably read session state.