clerk-cli

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

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/divinaarmuela/Content --skill clerk-cli-divinaarmuela
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clerk-cli
Source: https://github.com/divinaarmuela/Content/tree/main/.claude/skills/clerk-cli
Command: npx skills add https://github.com/divinaarmuela/Content --skill clerk-cli-divinaarmuela

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing Clerk authentication resources through raw HTTP calls requires manual key handling, endpoint memorization, and error-prone curl commands. This Skill teaches an AI agent to drive the pre-authenticated clerk CLI, which resolves keys, targets apps and instances, and formats output 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 gateway to the Backend, Platform, and Frontend APIs. - Impersonation and Debugging: Generate short-lived actor tokens with clerk impersonate to sign in as a user for debugging, with full audit trails. - Local Webhook Testing: Tunnel live webhook deliveries to a local handler with clerk webhooks listen and verify signatures offline with clerk webhooks verify. - Instance Configuration and Deploys: Pull, patch, and validate instance config with dry-run safety, toggle features like orgs and billing, and verify production deploys with clerk deploy status. - Use Case: A developer asks the agent to list all banned users on the production instance; the agent runs clerk doctor --json to verify health, then pages through clerk users list --json and filters results with jq without flooding the context window. ## 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 operations without curated subcommands, call the Backend API directly with clerk api /users/<id> using -X PATCH or -X DELETE.

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 <user> with a user ID, exact email, or search term to create a short-lived actor token and sign-in URL. It requires clerk auth login, stamps every token with cli:<email> for auditability, and the token ID printed at creation is needed to revoke it later.

Why does the Clerk CLI report not logged in or not linked in agent mode?▼

Sandboxed agent environments often block the OS keychain, home-directory Clerk config, browser launch, or network access, causing false auth and link failures. The CLI emits a sandbox warning in these cases; rerun the same command on the host shell before trusting the result.

Can I use the Clerk CLI in CI or headless automation?▼

Yes, set CLERK_PLATFORM_API_KEY for Platform API access instead of clerk auth login, which opens a browser and is not unattended. Force non-interactive behavior with --mode agent or CLERK_MODE=agent, and always pass explicit flags like --app and --yes.

How do I safely update Clerk instance configuration?▼

Use clerk config patch for partial updates or clerk config put for full replacement, always with --dry-run first to preview changes. The config commands authenticate via the Platform API, so they need CLERK_PLATFORM_API_KEY or a stored OAuth token, not a secret key.