better-auth-add-plugin
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Test workflow instances locally and remotely with validation and metrics. Use when user wants to test workflow execution, validate behavior, or measure performance.
$ npx -y skills add secondsky/claude-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/workflow-testContext preview
What this command does when you run it.
Test workflow instances locally and remotely with validation and metrics. Use when user wants to test workflow execution, validate behavior, or measure performance.
name: cloudflare-workflows:test description: Test workflow instances locally and remotely with validation and metrics. Use when user wants to test workflow execution, validate behavior, or measure performance.
Interactive testing for Cloudflare Workflows with execution monitoring and validation.
Use AskUserQuestion:
**Question**: "Which workflow would you like to test?"
**If "List available workflows"**:
# Parse wrangler.jsonc grep -A 3 "workflows" wrangler.jsonc | grep "name"
Display list, ask user to select
---
Use AskUserQuestion:
**Question**: "How would you like to test?"
**Store as**: `testType`
---
Use AskUserQuestion:
**Question**: "Provide test parameters"
**If "Custom JSON"**:
**If "Use default"**:
{
"id": "test-123",
"timestamp": "${currentTimestamp}"
}---
**Start dev server**:
# Start wrangler dev in background wrangler dev & DEV_PID=$! # Wait for startup sleep 3
**Create instance**:
# Trigger workflow via HTTP endpoint
curl -X POST "http://localhost:8787" \
-H "Content-Type: application/json" \
-d '${testParams}'**Capture response**:
**Monitor execution**:
# Poll for completion
while true; do
STATUS=$(curl -s "http://localhost:8787?instanceId=${instanceId}")
echo "Status: ${STATUS}"
if [[ "${STATUS}" == *"complete"* ]]; then
break
fi
sleep 2
done**Display results**:
Local Test Results:
- Instance ID: ${instanceId}
- Status: ${finalStatus}
- Duration: ${duration}s
- Result: ${result}**Stop dev server**:
kill $DEV_PID
---
**Create instance via deployed Worker**:
# Get Worker URL from wrangler
WORKER_URL=$(wrangler deployments list --name ${workerName} | grep "https://" | head -n 1)
# Create instance
curl -X POST "${WORKER_URL}" \
-H "Content-Type: application/json" \
-d '${testParams}'**Monitor with wrangler**:
# Get instance ID from response
INSTANCE_ID=$(echo "${response}" | jq -r '.id')
# Describe instance
wrangler workflows instances describe ${workflowName} ${INSTANCE_ID}**Poll for completion**:
MAX_ATTEMPTS=30
ATTEMPT=0
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
STATUS=$(wrangler workflows instances describe ${workflowName} ${INSTANCE_ID} | grep "Status:")
echo "Attempt $((ATTEMPT+1))/$MAX_ATTEMPTS: ${STATUS}"
if [[ "${STATUS}" == *"complete"* ]]; then
break
fi
sleep 2
((ATTEMPT++))
done**Display results**:
Remote Test Results:
- Instance ID: ${INSTANCE_ID}
- Status: ${finalStatus}
- Duration: ${duration}s
- Steps Completed: ${stepsCompleted}
- Result: ${result}---
Check test outcomes:
**Validation Checks**:
**If validation fails**:
⚠️ Test Validation Issues:
${validationErrors}
Recommendations:
1. Check error logs: wrangler tail ${workerName}
2. Debug instance: /workflow-debug ${workflowName} ${instanceId}
3. Review workflow logic---
Calculate and display metrics:
Performance Metrics:
- Total Duration: ${totalDuration}s
- Steps Executed: ${stepsExecuted}
- Average Step Time: ${avgStepTime}s
- Retry Count: ${retryCount}
- Estimated Cost: $${estimatedCost}
Cost Breakdown:
- Requests: ${requestCount} × $0.15/million = $${requestCost}
- Duration: ${durationGBS} GB-s × $0.02/million = $${durationCost}
- Total: $${totalCost}**Recommendations** (based on metrics):
---
Test Summary:
- Workflow: ${workflowName}
- Test Type: ${testType}
- Status: ${passOrFail}
- Duration: ${totalDuration}s
- Cost: $${totalCost}
${testType == "Both" ? `
Comparison:
- Local: ${localDuration}s
- Remote: ${remoteDuration}s
- Difference: ${Math.abs(localDuration - remoteDuration)}s
` : ''}
Next Steps:
${status == "pass" ? `
✅ Test passed! Ready for deployment.
1. Deploy: wrangler deploy
2. Monitor: wrangler workflows instances list ${workflowName}
3. Set up alerts for production
` : `
❌ Test failed. Debug needed.
1. Review error logs
2. Use /workflow-debug for diagnosis
3. Fix issues and re-test
`}
Commands:
- Re-test: /workflow-test
- Debug: /workflow-debug
- Benchmark: ./scripts/benchmark-workflow.sh ${workflowName} 10---
145 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
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Interactive setup wizard for better-auth authentication. Guides through database, framework, OAuth providers, and plugin configuration.
Explain Better Auth error codes and provide solutions with code examples
Display Better Auth available authentication providers and their configuration