Agent skill · Audited from source
Clerk Reference Architecture
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: Reference architecture patterns for Clerk authentication.
Cite
Cite this page
ModelsAtlas. “Clerk Reference Architecture (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/clerk-reference-architecture
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-reference-architectureThe 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: Reference architecture patterns for Clerk authentication.
--- name: clerk-reference-architecture description: 'Reference architecture patterns for Clerk authentication. Use when designing application architecture, planning auth flows, or implementing enterprise-grade authentication. Trigger with phrases like "clerk architecture", "clerk design", "clerk system design", "clerk integration patterns". ' allowed-tools: Read, Write, Edit, Grep version: 1.15.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - clerk - authentication compatibility: Designed for Claude Code --- # Clerk Reference Architecture ## Overview Reference architectures for implementing Clerk in common application patterns: Next.js full-stack, microservices with shared auth, multi-tenant SaaS, and mobile + web with shared backend. ## Prerequisites - Understanding of web application architecture - Familiarity with authentication patterns (JWT, sessions, OAuth) - Knowledge of your tech stack and scaling requirements ## Instructions ### Architecture 1: Next.js Full-Stack Application ``` Browser │ ├─▸ Next.js Middleware (clerkMiddleware) │ └─▸ Validates session token on every request │ ├─▸ Server Components (auth(), currentUser()) │ └─▸ Direct access to user data, no network call │ ├─▸ Client Components (useUser(), useAuth()) │ └─▸ Real-time auth state via ClerkProvider │ ├─▸ API Routes (auth() for userId, getToken() for JWT) │ └─▸ Call external services with Clerk JWT │ └─▸ Webhooks (/api/webhooks/clerk) └─▸ Sync user data to database ``` ```typescript // app/layout.tsx — entry point import { ClerkProvider } from '@clerk/nextjs' export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <ClerkProvider> <html><body>{children}</body></html> </ClerkProvider> ) } ``` ```typescript // middleware.ts — auth boundary import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' const isPublic = createRouteMatcher(['/', '/sign-in(.*)', '/sign-up(.*)', '/api/webhooks(.*)']) export default clerkMiddleware(async (auth, req) => { if (!isPublic(req)) await auth.protect() }) ``` ### Architecture 2: Microservices with Shared Auth ``` Browser ─▸ API Gateway / BFF (Next.js + Clerk) │ ├─▸ Service A (Node.js) ──── verifies JWT ├─▸ Service B (Python) ──── verifies JWT └─▸ Service C (Go) ──────── verifies JWT ``` ```typescript // BFF: Generate service-specific JWT // app/api/proxy/[service]/route.ts import { auth } from '@clerk/nextjs/server' export async function GET(req: Request, { params }: { params: { service: string } }) { const { userId, getToken } = await auth() if (!userId) return Response.json({ error: 'Unauthorized' }, { status: 401 }) // Get JWT with service-specific claims const token = await getToken({ template: params.service }) const serviceUrls: Record<string, string> = { billing: process.env.BILLING_SERVICE_URL!, analytics: process.env.ANALYTICS_SERVICE_URL!, notifications: process.env.NOTIFICATION_SERVICE_URL!, } const response = await fetch(`${serviceUrls[params.service]}/api/data`, { headers: { Authorization: `Bearer ${token}` }, }) return Response.json(await response.json()) } ``` ```typescript // Downstream service: Verify Clerk JWT // services/billing/src/middleware.ts (Express) import { clerkMiddleware, requireAuth } from '@clerk/express' app.use(clerkMiddleware()) app.get('/api/data', requireAuth(), (req, res) => { // req.auth.userId is available res.json({ userId: req.auth.userId }) }) ``` ### Architecture 3: Multi-Tenant SaaS ``` Tenant A (org_abc) ──┐ Tenant B (org_def) ──┤──▸ Shared App ──▸ Shared DB (tenant-scoped queries) Tenant C (org_ghi) ──┘ ``` ```typescript // lib/tenant.ts — tenant-scoped data access import { auth } from '@clerk/nextjs/server' export async function getTenantData<T>(query: (orgId: string) => Promise<T>): Promise<T> { const { orgId } = await auth() if (!orgId) throw new Error('No organization selected') return query(orgId) } // Usage: export async function getProjects() { return getTenantData((orgId) => db.project.findMany({ where: { organizationId: orgId } }) ) } ``` ```typescript // middleware.ts — enforce org context on tenant routes import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' const isTenantRoute = createRouteMatcher(['/app(.*)']) export default clerkMiddleware(async (auth, req) => { if (isTenantRoute(req)) { const { orgId } = await auth.protect() if (!orgId) { // Redirect to org selector if no org is active return Response.redirect(new URL('/select-org', req.url)) } } }) ``` ```typescript // app/select-org/page.tsx import { OrganizationSwitcher } from '@clerk/nextjs' export default function SelectOrg() { return ( <div className="flex min-h-screen items-center justify-center"> <div> <h1>Select Your Organization</h1> <OrganizationSwitcher afterSelectOrganizationUrl="/app/dashboard" hidePersonal={true} /> </div> </div> ) } ``` ### Architecture 4: Mobile + Web with Shared Backend ``` Web App (Next.js + @clerk/nextjs) ──┐ Mobile App (React Native + @clerk/clerk-expo) ──┤──▸ Backend API (Express + @clerk/express) └──▸ Database ``` ```typescript // Backend API: Express with Clerk // server.ts import express from 'express' import { clerkMiddleware, requireAuth, getAuth } from '@clerk/express' const app = express() // Apply Clerk middleware globally app.use(clerkMiddleware()) // Public endpoint app.get('/api/public', (req, res) => { res.json({ message: 'Public endpoint' }) }) // Protected endpoint (works with both web and mobile clients) app.get('/api/profile', requireAuth(), async (req, res) => { const { userId } = getAuth(req) const user = await db.user.findUnique({ where: {
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-reference-architecture/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar 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-reference-architecture/)
<a href="https://modelsatlas.com/skills/jeremylongshore/clerk-reference-architecture/"><img src="https://modelsatlas.com/skills/jeremylongshore/clerk-reference-architecture/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Clerk Reference Architecture
What does the Clerk Reference Architecture skill do?
Is Clerk Reference Architecture safe to install?
What can Clerk Reference Architecture access on my machine?
Which assistants does Clerk Reference Architecture 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 Reference Architecture skill do?
- Is Clerk Reference Architecture safe to install?
- What can Clerk Reference Architecture access on my machine?