| name | clerk-debug-bundle |
| description | Collect comprehensive debug information for Clerk issues.
Use when troubleshooting complex problems, preparing support tickets,
or diagnosing intermittent issues.
Trigger with phrases like "clerk debug", "clerk diagnostics",
"clerk support ticket", "clerk troubleshooting".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(node:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| compatible-with | claude-code, codex, openclaw |
| tags | ["saas","clerk","debugging"] |
Clerk Debug Bundle
Current State
!node --version 2>/dev/null || echo 'N/A'
!npm list @clerk/nextjs @clerk/clerk-react @clerk/express 2>/dev/null | grep clerk || echo 'No Clerk packages found'
Overview
Collect all necessary debug information for Clerk troubleshooting and support tickets. Generates an environment report, runtime health check, client-side debug panel, and support bundle.
Prerequisites
- Clerk SDK installed
- Access to application logs
- Browser with developer tools
Instructions
Step 1: Environment Debug Script
import { createClerkClient } from '@clerk/backend'
async function collectDebugInfo() {
const info: Record<string, any> = {
timestamp: new Date().toISOString(),
nodeVersion: process.version,
platform: process.platform,
env: {
hasPK: !!process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
hasSK: !!process.env.CLERK_SECRET_KEY,
pkPrefix: process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY?.slice(0, 8) + '...',
nodeEnv: process.env.NODE_ENV,
},
}
{
clerk = ({ : process..! })
users = clerk..({ : })
info. = { : , : users. }
} (: ) {
info. = { : , : err., : err. }
}
{
pkg = ()
info. = .(pkg. || {})
.( k.())
.( ({ ...acc, [k]: v }), {})
} {
info. =
}
.(.(info, , ))
info
}
()