clerk-cli

Operate the Clerk CLI to manage users, organizations, sessions, webhooks, and instance configuration.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/celeroncoder/skills --skill clerk-cli-celeroncoder
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: clerk-cli
Source: https://github.com/celeroncoder/skills/tree/main/clerk-cli
Command: npx skills add https://github.com/celeroncoder/skills --skill clerk-cli-celeroncoder

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve? Managing Clerk authentication resources through raw HTTP calls requires manually handling API keys, endpoint discovery, and request formatting. This Skill teaches an AI agent to drive the pre-authenticated clerk CLI instead, so user management, impersonation, webhook testing, deploy verification, and instance configuration happen through a single binary that resolves auth and targeting automatically. ## Core Features & Use Cases - User and organization management: List, create, update, ban, and delete users or orgs via curated commands like clerk users list or the generic clerk api workhorse with dry-run previews for safe mutations. - Impersonation and debugging: Generate short-lived actor tokens with clerk impersonate to sign in as any user for troubleshooting, with full audit trails. - Local webhook testing: Tunnel live Clerk webhook deliveries to a local handler with clerk webhooks listen and verify signatures offline with clerk webhooks verify. - Instance configuration and deploys: Pull, patch, or replace instance config with dry-run safety, toggle features like organizations and billing, and verify production deploy readiness with clerk deploy status. - Use Case: A developer needs to find a stuck user, impersonate them to reproduce a bug, and then enable organizations on the dev instance. The agent runs clerk doctor --json, queries the user, prints an impersonation URL, and previews the org toggle with --dry-run before applying it. ## Quick Start Ask the agent to run clerk doctor to verify the CLI is authenticated and linked, then list the users in your Clerk application.

Frequently Asked Questions about clerk-cli

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

FAQPage Schema
How do I list and manage Clerk users from the command line?โ–ผ

Use clerk users list with flags like --email-address, --limit, and --offset to query users, and clerk users create to add new ones. For updates, bans, or deletes, call clerk api with the user path and always preview mutations with --dry-run first.

How do I test Clerk webhooks locally?โ–ผ

Run clerk webhooks listen --forward-to http://localhost:3000/api/webhooks to open a Svix relay tunnel that forwards live deliveries to your local handler. Add the printed relay URL as a webhook endpoint in the Clerk Dashboard, and verify signatures offline with clerk webhooks verify.

How do I impersonate a Clerk user for debugging?โ–ผ

Run clerk impersonate with a user ID or email to create a short-lived actor token and print a sign-in URL. It requires clerk auth login, stamps every token with your email for auditability, and on production it bypasses the user's MFA so confirm before proceeding.

Does the Clerk CLI work in sandboxed AI agent environments?โ–ผ

The CLI detects agent mode and emits a warning when host-only state like the OS keychain, home-directory config, or network access is blocked. Treat any auth, link, or env failure from a sandboxed run as untrusted and rerun the command on the host shell.

Why does clerk config patch not accept a secret key?โ–ผ

Config commands target the Platform API, which authenticates via CLERK_PLATFORM_API_KEY or the OAuth token from clerk auth login, not a Backend API secret key. Export CLERK_PLATFORM_API_KEY for scripted or CI usage of config pull, patch, and put.