clerk-chrome-extension-patterns

Implement Clerk authentication patterns for Chrome extensions with popup and service worker workflows.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Aditya07024/mindsyncpro --skill clerk-chrome-extension-patterns-aditya07024
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-chrome-extension-patterns
Source: https://github.com/Aditya07024/mindsyncpro/tree/main/mobile/.agents/skills/clerk-chrome-extension-patterns
Command: npx skills add https://github.com/Aditya07024/mindsyncpro --skill clerk-chrome-extension-patterns-aditya07024

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the complexity of implementing secure Clerk authentication flows in Chrome extensions, including popup, side panel, service worker, and headless extension scenarios.

Core Features & Use Cases

  • Extension Authentication Patterns: Configure ClerkProvider, redirect handling, and supported sign-in methods for Plasmo-based Chrome extensions.
  • Background and Content Script Auth: Use createClerkClient, token retrieval, and message passing patterns for service workers and isolated content scripts.
  • OAuth and Session Sync: Implement syncHost workflows for web app authentication, OAuth delegation, SAML support, stable CRX IDs, and Clerk origin configuration.

Quick Start

Use the clerk-chrome-extension-patterns skill to set up Clerk authentication for my Chrome extension popup and background service worker.

Frequently Asked Questions about clerk-chrome-extension-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Clerk authentication in a Chrome extension popup and background service worker?

To set up Clerk authentication in a Chrome extension, configure ClerkProvider for the popup and use createClerkClient for the background service worker. This pattern handles token retrieval and message passing between extension components securely.

Why does Clerk OAuth redirect fail in my Chrome extension and how do I configure syncHost?

Clerk OAuth redirects fail in Chrome extensions without a stable extension origin and syncHost configuration. Configure syncHost to establish a trusted web app origin for session synchronization, ensuring reliable OAuth delegation and redirect handling.

Can I use ClerkProvider with Plasmo to handle content script authentication?

Yes, ClerkProvider integrates with Plasmo to manage authentication across popup and side panel interfaces. For isolated content scripts, use message passing patterns to communicate authentication state from the background service worker.

Do I need a stable CRX ID for Clerk session synchronization in Chrome extensions?

Yes, a stable CRX ID is required for Clerk session synchronization in Chrome extensions. A consistent extension origin ensures ClerkProvider and syncHost configurations maintain valid OAuth delegation and session state across extension updates.