clerk-cli

Operate the Clerk CLI for authentication, user management, and Backend or Platform API calls.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill clerk-cli-dimonikrv
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clerk-cli
Source: https://github.com/DimonikRV/ghost-pilot-project/tree/main/.agents/skills/clerk-cli
Command: npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill clerk-cli-dimonikrv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing Clerk resources (users, organizations, sessions, instance config, env keys) through raw HTTP requests requires manual key resolution, app targeting, and error handling. This Skill teaches an AI agent to drive the pre-authenticated clerk CLI instead, so auth, key resolution, and formatting are handled automatically. ## Core Features & Use Cases - User and organization management: List, create, update, ban, or delete users and manage organizations, memberships, sessions, and invitations via curated commands or clerk api calls. - Instance configuration and env keys: Pull, patch, or replace instance config with dry-run previews, and materialize publishable/secret keys into .env.local with clerk env pull. - Deploy verification and diagnostics: Run clerk doctor --json health checks and verify production deploys with clerk deploy status, including agent-mode sandbox warnings. - Use Case: When a user asks to "list all banned Clerk users in production", the agent runs clerk users list --instance prod --json, saves the output to a file, and queries it with jq instead of flooding the context window. ## Quick Start Ask the agent to run clerk doctor --json to verify the CLI is authenticated and linked, then request any Clerk task such as listing users or pulling environment keys.

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 --limit, --email-address, and --order-by to query users, and clerk users create to add new ones. For updates, bans, or deletes, call clerk api /users/<id> with -X PATCH, POST, or DELETE, always previewing mutations with --dry-run first.

How do I make Clerk Backend API calls without writing curl requests?▼

Run clerk api <path>, which auto-resolves secret keys, detects the HTTP method from the request body, and targets the linked app and instance. Discover available endpoints first with clerk api ls <keyword> instead of guessing paths.

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

Sandboxes often block the OS keychain, home-directory Clerk config, browser launch, and network access that the CLI depends on. When the CLI emits its sandbox warning, rerun the same command on the host shell before trusting any auth, link, or env failure.

Can I use the Clerk CLI non-interactively in CI or agent mode?▼

Yes, agent mode activates automatically when stdout is not a TTY or via --mode agent. Pass --yes for mutations, --json for structured output, and set CLERK_PLATFORM_API_KEY for headless authentication instead of browser-based login.

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. Config commands authenticate through the Platform API, so they need CLERK_PLATFORM_API_KEY or a stored OAuth token, not a secret key.