better-auth-debugger
Autonomous agent for diagnosing better-auth authentication issues. Analyzes configuration, validates OAuth callbacks, tests endpoints, and provides specific…
This agent should be used when the user asks to "validate CSP for turnstile", "fix CSP errors", "check content security policy", or encounters error 200500. Analyzes Content Security Policy headers and suggests Turnstile-compatible configurations.
$ npx -y skills add secondsky/claude-skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
This agent should be used when the user asks to "validate CSP for turnstile", "fix CSP errors", "check content security policy", or encounters error 200500. Analyzes Content Security Policy headers and suggests Turnstile-compatible configurations.
name: Turnstile CSP Debugger description: This agent should be used when the user asks to "validate CSP for turnstile", "fix CSP errors", "check content security policy", or encounters error 200500. Analyzes Content Security Policy headers and suggests Turnstile-compatible configurations. allowed-tools: [Bash, Read, WebFetch]
This agent validates Content Security Policy (CSP) headers for Cloudflare Turnstile compatibility. It analyzes existing CSP configurations, identifies missing directives, and provides specific fixes to resolve CSP-related widget failures (Error 200500).
Use this agent when:
Turnstile requires these Content Security Policy directives:
Content-Security-Policy: script-src https://challenges.cloudflare.com; frame-src https://challenges.cloudflare.com; connect-src https://challenges.cloudflare.com; style-src 'unsafe-inline';
**Critical**: All three domains (`script-src`, `frame-src`, `connect-src`) are mandatory. Missing any will cause widget failure.
Execute the check-csp.sh script to validate domain's CSP:
./scripts/check-csp.sh https://user-domain.com
**Expected Output** (success):
✅ script-src includes challenges.cloudflare.com ✅ frame-src includes challenges.cloudflare.com ✅ connect-src includes challenges.cloudflare.com ✅ style-src allows unsafe-inline or includes challenges.cloudflare.com CSP is properly configured for Turnstile
**Error Output** (missing directives):
❌ script-src missing challenges.cloudflare.com ❌ frame-src missing challenges.cloudflare.com ✅ connect-src includes challenges.cloudflare.com ❌ style-src too restrictive CSP configuration incomplete - Turnstile will fail to load
Ask user for their current CSP implementation method:
**Method 1: HTTP Header** (Server configuration)
# Nginx add_header Content-Security-Policy "script-src 'self' https://challenges.cloudflare.com; frame-src 'self' https://challenges.cloudflare.com;";
**Method 2: Meta Tag** (HTML)
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://challenges.cloudflare.com; frame-src 'self' https://challenges.cloudflare.com;">
**Method 3: Cloudflare Workers** (Workers configuration)
response.headers.set('Content-Security-Policy',
"script-src 'self' https://challenges.cloudflare.com; " +
"frame-src 'self' https://challenges.cloudflare.com; " +
"connect-src 'self' https://challenges.cloudflare.com;"
)Parse the CSP output and identify which directives are missing:
**Missing `script-src`**:
**Missing `frame-src`**:
**Missing `connect-src`**:
**Restrictive `style-src`**:
Based on missing directives, generate complete CSP configuration:
Content-Security-Policy: default-src 'self'; script-src 'self' https://challenges.cloudflare.com; frame-src https://challenges.cloudflare.com; connect-src 'self' https://challenges.cloudflare.com; style-src 'unsafe-inline';
Content-Security-Policy: default-src 'self'; script-src 'self' https://challenges.cloudflare.com https://cdn.example.com; frame-src https://challenges.cloudflare.com; connect-src 'self' https://challenges.cloudflare.com https://api.example.com; style-src 'self' 'unsafe-inline' https://challenges.cloudflare.com; img-src 'self' data: https:; font-src 'self' https://fonts.gstatic.com;
// next.config.js
const ContentSecurityPolicy = `
default-src 'self';
script-src 'self' 'nonce-${nonce}' https://challenges.cloudflare.com;
frame-src https://challenges.cloudflare.com;
connect-src 'self' https://challenges.cloudflare.com;
style-src 'self' 'unsafe-inline';
`Provide step-by-step implementation for user's platform:
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const response = await handleRequest(request, env)
// Add Turnstile-compatible CSP
response.headers.set('Content-Security-Policy',
"default-src 'self'; " +
"script-src 'self' https://challenges.cloudflare.com; " +
"frame-src https://challenges.cloudflare.com; " +
"connect-src 'self' https://challenges.cloudflare.com; " +
"style-src 'unsafe-inline';"
)
return respo145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).
Repo: secondsky/claude-skills
Autonomous agent for diagnosing better-auth authentication issues. Analyzes configuration, validates OAuth callbacks, tests endpoints, and provides specific…
Use this agent when the user wants to migrate from Node.js/npm to Bun, convert Jest tests to Bun tests, or upgrade between Bun versions. Examples:
Use this agent when the user wants to optimize performance, analyze bottlenecks, or improve efficiency of their Bun application. Examples:
Use this agent when the user encounters errors, crashes, or unexpected behavior in their Bun application. Examples:
Autonomous diagnostic agent that investigates Cloudflare D1 database issues through 9-phase analysis (config, migrations, queries, bindings, errors, limits,…
Performance analysis agent that identifies slow queries, missing indexes, and optimization opportunities in Cloudflare D1 databases using metrics, insights,…