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 "debug Cloudflare Images errors", "troubleshoot upload failures", "diagnose CORS issues", "fix transformation errors", or encounters errors 5408, 9401-9413, multipart/form-data encoding issues, or API connectivity problems.
$ 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 "debug Cloudflare Images errors", "troubleshoot upload failures", "diagnose CORS issues", "fix transformation errors", or encounters errors 5408, 9401-9413, multipart/form-data encoding issues, or API connectivity problems.
name: troubleshooting-agent description: This agent should be used when the user asks to "debug Cloudflare Images errors", "troubleshoot upload failures", "diagnose CORS issues", "fix transformation errors", or encounters errors 5408, 9401-9413, multipart/form-data encoding issues, or API connectivity problems. allowed-tools: ["Read", "Bash", "Grep", "WebFetch"]
Autonomous agent for diagnosing and resolving Cloudflare Images upload, transformation, and API errors.
When invoked, systematically diagnose Cloudflare Images issues using the following workflow:
If user mentions a specific error code:
**Load `references/top-errors.md`** to identify the error and solution.
Common error codes:
If upload is failing:
**Step 1: Verify API Configuration**
# Check environment variables
echo "CF_ACCOUNT_ID: ${CF_ACCOUNT_ID:0:5}..." # First 5 chars only
echo "CF_API_TOKEN: ${CF_API_TOKEN:0:10}..." # First 10 chars only
# Test API connectivity
curl -X GET \
"https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/images/v1" \
-H "Authorization: Bearer ${CF_API_TOKEN}"Expected response: `{"success": true, "result": {...}}`
**Step 2: Validate File Encoding**
Load `references/api-reference.md` section on multipart/form-data encoding.
Common issues:
**Step 3: Check CORS Configuration**
If browser upload failing:
Load `templates/direct-upload-frontend.html` to verify CORS headers.
Required CORS headers from API:
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST, OPTIONS Access-Control-Allow-Headers: Content-Type, Authorization
If transformation failing:
**Step 1: Validate Transformation Parameters**
Check parameter syntax:
**Step 2: Test Transformation URL**
# Test basic transformation
curl -I "https://imagedelivery.net/${ACCOUNT_HASH}/${IMAGE_ID}/public?width=800"
# Expected: 200 OK with Content-Type: image/jpeg or image/webp**Step 3: Check Browser Compatibility**
Load `references/format-optimization.md` for browser support:
If direct upload failing:
**Step 1: Verify Upload URL Generation**
# Generate one-time upload URL
curl -X POST \
"https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/images/v2/direct_upload" \
-H "Authorization: Bearer ${CF_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"requireSignedURLs": false}'Expected: `uploadURL` and `id` in response
**Step 2: Test Upload URL**
Load `templates/direct-upload-frontend.html` for complete working example.
Common issues:
If using Cloudflare Workers:
**Step 1: Verify Binding Configuration**
Check `wrangler.jsonc`:
{
"images": [
{
"binding": "IMAGES",
"account_id": "..."
}
]
}**Step 2: Test Binding**
// In Worker
export default {
async fetch(request: Request, env: Env) {
console.log('IMAGES binding:', typeof env.IMAGES);
// Should log: "object"
const list = await env.IMAGES.list();
console.log('Images count:', list.images.length);
return new Response('OK');
}
}**Step 3: Check Transformations Enabled**
# Verify transformations are enabled for zone
curl -X GET \
"https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/settings/polish" \
-H "Authorization: Bearer ${CF_API_TOKEN}"If signed URLs not working:
Load `references/signed-urls-guide.md` for complete workflow.
**Step 1: Verify Signature Generation**
# Generate signed URL
EXPIRY=$(date -u -d "+1 hour" +%s)
SIGNATURE=$(echo -n "${IMAGE_ID}${EXPIRY}" | openssl dgst -sha256 -hmac "${SIGNING_KEY}" -binary | base64 -w0 | tr '+/' '-_' | tr -d '=')
echo "https://imagedelivery.net/${ACCOUNT_HASH}/${IMAGE_ID}/public?exp=${EXPIRY}&sig=${SIGNATURE}"**Step 2: Test Signed URL**
curl -I "${SIGNED_URL}"
# Expected: 200 OKCommon issues:
If variants not working:
Load `references/variants-guide.md` for complete setup.
**Step 1: List Existing Variants**
# List all variants
curl -X GET \
"https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/images/v1/variants" \
-H "Authorization: Bearer ${CF_API_TOKEN}"**Step 2: Verify Variant Configuration**
Check:
**Step 3: Test Variant URL**
curl -I "https://imagedelivery.net/${ACCOUNT_HASH}/${IMAGE_ID}/${VARIANT_NAME}"
# Expected: 200 OKIf images loading slowly:
**Step 1: Check CDN Caching**
# Check cache status
curl -I "https://imagedelivery.net/${ACCOUNT_HASH}/${IMAGE_ID}/public" | grep -i cf-cache-s145 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,…