Agent skill · Audited from source
Clerk Cost Tuning
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: Optimize Clerk costs and understand pricing.
Cite
Cite this page
ModelsAtlas. “Clerk Cost Tuning (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/clerk-cost-tuning
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-cost-tuningThe 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: Optimize Clerk costs and understand pricing.
--- name: clerk-cost-tuning description: 'Optimize Clerk costs and understand pricing. Use when planning budget, reducing costs, or understanding Clerk pricing model. Trigger with phrases like "clerk cost", "clerk pricing", "reduce clerk cost", "clerk billing", "clerk budget". ' allowed-tools: Read, Write, Edit, Grep version: 1.15.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - clerk - cost-optimization compatibility: Designed for Claude Code --- # Clerk Cost Tuning ## Overview Understand Clerk pricing and optimize costs. Clerk charges by Monthly Retained Users (MRU) — a user is counted as retained only when they return 24+ hours after signing up. Covers pricing tiers, MRU reduction strategies, caching to reduce API calls, and usage monitoring. ## Prerequisites - Clerk account active - Understanding of MRU (Monthly Retained Users) - Application usage patterns known ## Instructions ### Step 1: Understand Clerk Pricing Model | Plan | Price | MRU Included | Extra MRU | |------|-------|-------------|-----------| | Free (Hobby) | $0/mo | 50,000 MRU | N/A | | Pro | $25/mo ($20/mo billed annually) | 50,000 MRU | $0.02/MRU | | Business | $300/mo ($250/mo billed annually) | 50,000 MRU | $0.02/MRU | | Enterprise | Custom | Custom | Custom | Key pricing concepts: - **MRU** = unique user who returns to your app 24+ hours after signing up ("first day free" — sign-up-day activity never counts) - Users who sign up and never return are not billed - Users who only visit public pages are not counted - Bot/crawler sessions are not counted - Test/development instances are free and unlimited ### Step 2: Reduce MRU Count ```typescript // Strategy 1: Defer authentication — don't force sign-in until necessary // middleware.ts import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' const requiresAuth = createRouteMatcher([ '/dashboard(.*)', '/settings(.*)', '/api/protected(.*)', ]) export default clerkMiddleware(async (auth, req) => { // Only require auth for specific routes (not entire site) if (requiresAuth(req)) { await auth.protect() } }) ``` ```typescript // Strategy 2: Use anonymous access for read-only features // app/blog/[slug]/page.tsx import { auth } from '@clerk/nextjs/server' export default async function BlogPost({ params }: { params: { slug: string } }) { const { userId } = await auth() // Check but don't require const post = await db.post.findUnique({ where: { slug: params.slug } }) return ( <article> <h1>{post?.title}</h1> <div>{post?.content}</div> {userId ? <CommentForm /> : <p>Sign in to comment</p>} </article> ) } ``` ### Step 3: Cache to Reduce API Calls ```typescript // lib/user-cache.ts import { cache } from 'react' import { currentUser } from '@clerk/nextjs/server' // Deduplicate within single request (free) export const getUser = cache(async () => { return currentUser() }) // Cross-request caching reduces Backend API calls import { unstable_cache } from 'next/cache' import { clerkClient } from '@clerk/nextjs/server' export const getUserMetadata = unstable_cache( async (userId: string) => { const client = await clerkClient() const user = await client.users.getUser(userId) return user.publicMetadata }, ['user-metadata'], { revalidate: 600 } // 10-minute cache ) ``` ### Step 4: Monitor Usage ```typescript // app/api/admin/clerk-usage/route.ts import { auth, clerkClient } from '@clerk/nextjs/server' export async function GET() { const { has } = await auth() if (!has({ role: 'org:admin' })) { return Response.json({ error: 'Admin only' }, { status: 403 }) } const client = await clerkClient() const users = await client.users.getUserList({ limit: 1 }) return Response.json({ totalUsers: users.totalCount, // Estimate MRU based on recent sign-ins estimatedMRU: 'Check Clerk Dashboard > Billing for actual MRU', dashboardUrl: 'last-active?after=30d', }) } ``` ### Step 5: Clean Up Inactive Users ```typescript // scripts/cleanup-inactive-users.ts import { createClerkClient } from '@clerk/backend' const clerk = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY! }) async function findInactiveUsers(daysInactive = 90) { const cutoff = Date.now() - daysInactive * 24 * 60 * 60 * 1000 const allUsers = await clerk.users.getUserList({ limit: 500 }) const inactive = allUsers.data.filter( (user) => (user.lastSignInAt || 0) < cutoff ) console.log(`Found ${inactive.length} users inactive for ${daysInactive}+ days`) console.log('Consider: notification campaign, data export, or account cleanup') return inactive } findInactiveUsers() ``` ## Output - Pricing model understood with MRU thresholds - Route-level auth to minimize unnecessary MRU counts - Request-level and cross-request caching reducing API calls - Usage monitoring endpoint for admins - Inactive user identification script ## Error Handling | Issue | Cause | Solution | |-------|-------|----------| | Unexpected bill increase | MRU spike from bot traffic | Add bot detection, restrict auth to needed routes | | Feature limitations | Free tier limits (no SSO, etc.) | Upgrade to Pro ($25/mo, or $20/mo billed annually) | | High API call volume | No caching | Add React `cache()` + `unstable_cache()` | | MRU count mismatch | Counting test users | Use separate dev instance (free, unlimited) | ## Examples ### Cost Estimation Script ```typescript function estimateMonthlyCost(mru: number): string { if (mru <= 50_000) return 'Free tier ($0/mo)' const overage = mru - 50_000 const cost = 25 + overage * 0.02 return `Pro tier: $${cost.toFixed(2)}/mo (${overage.toLocaleString()} extra MRU at $0.02 each)` } console.log(estimateMonthlyCost(15_000)) // "Free tier ($0/mo)" console.log(estimateMonthlyCost(60_000)) // "Pro tier: $225.00/mo (10,000 extra MRU at $0.02 each)" ``` ## Resources - [Clerk Pricing](https://clerk.com/pricin
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-cost-tuning/)
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-cost-tuning/)
<a href="https://modelsatlas.com/skills/jeremylongshore/clerk-cost-tuning/"><img src="https://modelsatlas.com/skills/jeremylongshore/clerk-cost-tuning/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Clerk Cost Tuning
What does the Clerk Cost Tuning skill do?
Is Clerk Cost Tuning safe to install?
What can Clerk Cost Tuning access on my machine?
Which assistants does Clerk Cost Tuning 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 Cost Tuning skill do?
- Is Clerk Cost Tuning safe to install?
- What can Clerk Cost Tuning access on my machine?