clerk-cli

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/Rajaryan1726/ai-code-review-system --skill clerk-cli-rajaryan1726
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clerk-cli
Source: https://github.com/Rajaryan1726/ai-code-review-system/tree/main/client/.agents/skills/clerk-cli
Command: npx skills add https://github.com/Rajaryan1726/ai-code-review-system --skill clerk-cli-rajaryan1726

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 for user, organization, session, webhook, and instance-config operations with correct auth resolution, agent-mode behavior, and safe mutation previews. ## Core Features & Use Cases - Backend, Platform, and Frontend API access: Use clerk api <path> with automatic key resolution, method detection, --dry-run previews, and endpoint discovery via clerk api ls. - User and org management: List, create, update, ban, and impersonate users; manage organizations, memberships, invitations, sessions, and JWT templates. - Instance configuration and deploys: Pull, patch, and replace instance config, toggle orgs and billing, pull env keys, and verify production deploys with clerk deploy status. - Local webhook testing: Tunnel deliveries to a local handler with clerk webhooks listen and verify signatures offline with clerk webhooks verify. - Use Case: Ask the agent to list all banned users on your production instance; it runs clerk doctor --json first, saves clerk users list --json output to a file, and queries it with jq instead of flooding the conversation. ## Quick Start Ask the agent to run clerk doctor and then list the ten most recently created users on your linked 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 Clerk users from the command line?▼

Run clerk users list with optional filters like --email-address, --query, --limit, and --offset. In agent mode or with --json it returns a {data, hasMore} envelope, so you can paginate without calling /users/count.

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 deliveries to your local handler. Add the printed relay URL as a webhook endpoint in the Clerk Dashboard, and verify saved deliveries offline with clerk webhooks verify.

Does the Clerk CLI require an account or login?▼

Most instance commands work without an account: clerk init mints an unclaimed app with temporary development keys, and commands like users, config pull/patch, and api follow the local sk_ key. Account-only commands include apps, impersonate, link, and enable billing.

How do I safely run destructive Clerk API mutations?▼

Always preview with --dry-run first, then re-run the mutation without it. In agent mode confirmation prompts are silently skipped, so --dry-run is the only safety net for deletes, config put, and other destructive calls.

Why does the Clerk CLI report not logged in inside an agent sandbox?▼

Sandboxes often block the OS keychain, home-directory Clerk config, browser launch, or network access, so auth and link state cannot be read. The CLI emits a host-capability warning; rerun the same command on the host shell before trusting the failure.

How do I target a specific Clerk app or production instance?▼

Pass --app <app_id> and --instance dev, prod, or an ins_ ID to override the linked project profile. This works from any directory without linking the repo and is recommended for critical operations.