Agent skill · Audited from source
Clerk Security Basics
skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 8 Oct 2026 · source 4f83675ca38a
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Implement security best practices with Clerk authentication.
Cite
Cite this page
ModelsAtlas. “Clerk Security Basics (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/clerk-security-basics
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 4f83675ca38a · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherjeremylongshore GitHub userOwner of the repository this skill is read from
- Source folderjeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/clerk-pack/skills/clerk-security-basicsThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict4f83675ca38aA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Implement security best practices with Clerk authentication.
--- name: clerk-security-basics description: 'Implement security best practices with Clerk authentication. Use when securing your application, reviewing auth implementation, or hardening Clerk configuration. Trigger with phrases like "clerk security", "secure clerk", "clerk best practices", "clerk hardening". ' allowed-tools: Read, Write, Edit, Grep version: 1.15.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - clerk - security - authentication compatibility: Designed for Claude Code --- # Clerk Security Basics ## Overview Implement security best practices for Clerk authentication: environment variable protection, middleware hardening, API route defense, webhook verification, and session security. ## Prerequisites - Clerk SDK installed and configured - Understanding of OWASP authentication best practices - Production deployment planned or active ## Instructions ### Step 1: Secure Environment Variables ```bash # .env.local — never commit this file NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_... # Safe to expose (public) CLERK_SECRET_KEY=sk_live_... # NEVER expose client-side CLERK_WEBHOOK_SECRET=whsec_... # Server-only ``` ```gitignore # .gitignore — ensure secrets stay out of git .env.local .env.*.local .env.production ``` Validate at startup that secret keys are not leaked: ```typescript // lib/security-check.ts export function assertServerOnly() { if (typeof window !== 'undefined') { throw new Error('This module must only be used server-side') } if (!process.env.CLERK_SECRET_KEY) { throw new Error('CLERK_SECRET_KEY is not configured') } } ``` ### Step 2: Hardened Middleware Configuration ```typescript // middleware.ts import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' import { NextResponse } from 'next/server' const isPublicRoute = createRouteMatcher([ '/', '/sign-in(.*)', '/sign-up(.*)', '/api/webhooks(.*)', ]) export default clerkMiddleware(async (auth, req) => { // Protect all non-public routes if (!isPublicRoute(req)) { await auth.protect() } // Add security headers const response = NextResponse.next() response.headers.set('X-Frame-Options', 'DENY') response.headers.set('X-Content-Type-Options', 'nosniff') response.headers.set('Referrer-Policy', 'strict-origin-when-cross-origin') response.headers.set( 'Content-Security-Policy', "frame-ancestors 'none'; form-action 'self' https://clerk.com https://*.clerk.accounts.dev" ) return response }) ``` ### Step 3: Secure API Routes ```typescript // app/api/admin/route.ts import { auth } from '@clerk/nextjs/server' import { NextRequest } from 'next/server' export async function POST(req: NextRequest) { const { userId, has } = await auth() // 1. Verify authentication if (!userId) { return Response.json({ error: 'Unauthorized' }, { status: 401 }) } // 2. Verify authorization (permission-based, not role-based) if (!has({ permission: 'org:admin:access' })) { return Response.json({ error: 'Forbidden' }, { status: 403 }) } // 3. Validate and sanitize input const body = await req.json() if (typeof body.name !== 'string' || body.name.length > 200) { return Response.json({ error: 'Invalid input' }, { status: 400 }) } // 4. Rate limit sensitive operations // (Use a rate limiter like @upstash/ratelimit) return Response.json({ success: true }) } ``` ### Step 4: Secure Webhook Verification ```typescript // app/api/webhooks/clerk/route.ts import { Webhook } from 'svix' import { headers } from 'next/headers' export async function POST(req: Request) { const secret = process.env.CLERK_WEBHOOK_SECRET if (!secret) { // Log but don't expose internal state console.error('Missing CLERK_WEBHOOK_SECRET') return new Response('Internal error', { status: 500 }) } const headerPayload = await headers() const svixHeaders = { 'svix-id': headerPayload.get('svix-id') || '', 'svix-timestamp': headerPayload.get('svix-timestamp') || '', 'svix-signature': headerPayload.get('svix-signature') || '', } // Reject requests missing required headers if (!svixHeaders['svix-id'] || !svixHeaders['svix-signature']) { return new Response('Missing verification headers', { status: 400 }) } const body = await req.text() const wh = new Webhook(secret) try { const event = wh.verify(body, svixHeaders) // Process verified event... return new Response('OK', { status: 200 }) } catch { // Don't leak verification details return new Response('Verification failed', { status: 400 }) } } ``` ### Step 5: Session Security Best Practices ```typescript // Enforce session checks in sensitive operations import { auth } from '@clerk/nextjs/server' export async function dangerousAction() { const { userId, sessionId } = await auth() if (!userId || !sessionId) { throw new Error('Valid session required') } // For extra-sensitive operations, verify the session is fresh // by checking session claims or requiring re-authentication const { sessionClaims } = await auth() const sessionAge = Date.now() / 1000 - (sessionClaims?.iat || 0) if (sessionAge > 300) { // 5 minutes throw new Error('Session too old for this operation. Please re-authenticate.') } } ``` Configure session settings in Clerk Dashboard: - **Session lifetime**: 7 days (default) — reduce for sensitive apps - **Inactivity timeout**: Enable for compliance requirements - **Multi-session mode**: Disable unless explicitly needed ## Output - Environment variables secured with leak prevention - Middleware with security headers (CSP, X-Frame-Options, etc.) - API routes with auth + authz + input validation - Webhook endpoint with Svix signature verification - Session freshness checks for sensitive operations ## Error Handling | Error | Cause | Solution | |-------|-------|----------| | Secret key exposed client-side | Impor
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4f83675
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills git -C claude-code-plugins-plus-skills checkout 4f83675ca38a
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
4f83675ca38a
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/jeremylongshore/clerk-security-basics/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All security skills →jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Deploy and orchestrate Vertex AI ADK agents using A2A protocol. Manages
Add this badge to your README
[](https://modelsatlas.com/skills/jeremylongshore/clerk-security-basics/)
<a href="https://modelsatlas.com/skills/jeremylongshore/clerk-security-basics/"><img src="https://modelsatlas.com/skills/jeremylongshore/clerk-security-basics/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Clerk Security Basics
What does the Clerk Security Basics skill do?
Is Clerk Security Basics safe to install?
What can Clerk Security Basics access on my machine?
Which assistants does Clerk Security Basics work with?
How current is this page?
Sources
- github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/ — the audited source at commit 4f83675ca38a and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Clerk Security Basics skill do?
- Is Clerk Security Basics safe to install?
- What can Clerk Security Basics access on my machine?