skills
- Type
- Skill
- Scanned
- Nov 13, 2026
- Version
- e131b19b06dd
- Files read
- 145
This collection of Clerk agent skills guides AI coding assistants through setting up authentication, billing, organizations, and webhooks across web and mobile frameworks, as well as managing Clerk resources via the CLI and Backend REST API. The biggest risks are that the Backend API skill pre-approves unrestricted shell commands while reading untrusted user data, and the CLI and setup skills instruct the agent to run unpinned clerk@latest packages on the host shell outside the sandbox with access to OS keychain credentials.
What it can reach
- Shell commands
- Executes shell commands including curl, node, python3, vercel, and npx -y clerk@latest to inspect API specs, scaffold auth code, and call Clerk APIs, with unrestricted Bash pre-approved in clerk-backend-api.
- Secrets
- Accesses and writes Clerk API keys and OAuth tokens (CLERK_SECRET_KEY, CLERK_PLATFORM_API_KEY, webhook signing secrets, local .env files, and OS keychain credentials via the Clerk CLI).
- Network
- Sends requests to Clerk Backend, Platform, and Frontend APIs, fetches OpenAPI specs from GitHub, fetches documentation from clerk.com, and can open a Svix webhook relay tunnel forwarding to localhost.
- Files
- Reads and modifies application source files, framework configs, .env files, temporary credential payloads, and global agent skill folders during clerk init.
- Browser
- Launches the system browser and binds a localhost callback server during interactive Clerk CLI login or app-claiming flows.
Findings
-
HighUnrestricted Bash tool pre-approved in Backend API skill
skills/clerk-backend-api/SKILL.md:4
Unlike the other skills in this repository (which only allow WebFetch), clerk-backend-api sets unscoped Bash in allowed-tools. In coding agents that honor allowed-tools, bare Bash pre-approves arbitrary shell commands without asking the user for confirmation. Because this skill fetches untrusted user records from Clerk (such as names, emails, and user-writable unsafe_metadata) and prints the raw JSON into the agent context, a prompt injection planted in a user profile by a stranger who signed up for the app could trick the agent into running arbitrary shell commands or destructive API calls with CLERK_SECRET_KEY without a permission prompt.
Fix: Remove bare Bash from allowed-tools or scope it strictly to the read-only spec helper scripts (for example, Bash(bash scripts/*)) so mutating curl and shell commands still require user approval.
-
MediumSkill instructs the agent to bypass sandbox isolation and run on the host shell
The clerk-cli skill instructs the AI agent to run Clerk CLI commands (including clerk api, clerk config, clerk env pull, and clerk apps) directly on the user's host shell instead of inside the agent's sandbox, and to automatically re-run failed sandboxed commands on the host before reporting to the user. Running outside the sandbox exposes the user's OS keychain OAuth token (which has account-wide Platform API access across all of the user's Clerk apps, including production), home-directory state, local .env secrets, and network access, while interactive confirmations for most mutations are disabled in agent mode.
Fix: Do not instruct agents to bypass the sandbox by default or automatically re-run failed commands on the host; require explicit user confirmation before requesting host execution and prefer scoped environment keys.
-
LowUnpinned runtime download and execution of clerk@latest
skills/clerk-setup/SKILL.md:16
Multiple skills (clerk-setup, clerk-cli, clerk-expo, and clerk-swift) instruct the agent to run clerk@latest directly from npm using package runners with confirmation prompts disabled (such as npx -y clerk@latest and bunx clerk@latest), while discouraging pinned installations. Because these commands run with access to local .env files containing CLERK_SECRET_KEY and (when run on the host) OS keychain credentials, a supply-chain compromise of the latest npm tag would immediately execute untrusted code with secret access.
Fix: Pin the Clerk CLI to a known-good version matching the skill release or run a version locked in the project's devDependencies rather than fetching @latest with -y at runtime.
-
LowPre-write check prints characters of CLERK_SECRET_KEY into stdout and model context
skills/clerk-backend-api/SKILL.md:20
Before every write request, clerk-backend-api requires the agent to run echo $CLERK_SECRET_KEY | head -c 10. Because Clerk secret keys use an 8-character prefix (sk_test_ or sk_live_), printing 10 characters sends both the environment type and the first 2 characters of the secret key itself into command output, chat logs, and the external AI provider's context when a boolean presence check would suffice.
Fix: Verify that CLERK_SECRET_KEY is non-empty without printing secret characters, such as testing [ -n "${CLERK_SECRET_KEY:-}" ] && echo set || echo missing.
-
LowUnescaped user name interpolated into HTML email in webhook template
skills/clerk-webhooks/SKILL.md:122
The welcome-email webhook handler example extracts first_name and last_name from the user.created event payload and interpolates them directly into an HTML email body without escaping. If a developer adopts this template, a stranger signing up with HTML or links in their name field can inject arbitrary HTML into emails sent from the application's authenticated domain.
Fix: HTML-escape user-supplied fields (first_name, last_name) before interpolating them into HTML email templates, or send a plain-text body.
