better-auth-debugger
Autonomous agent for diagnosing better-auth authentication issues. Analyzes configuration, validates OAuth callbacks, tests endpoints, and provides specific…
Autonomous test generation agent for Cloudflare Workers. Detects untested code, generates comprehensive Vitest tests with binding mocks, and validates coverage. Auto-applies generated tests for user review via git diff.
$ 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.
Autonomous test generation agent for Cloudflare Workers. Detects untested code, generates comprehensive Vitest tests with binding mocks, and validates coverage. Auto-applies generated tests for user review via git diff.
description: Autonomous test generation agent for Cloudflare Workers. Detects untested code, generates comprehensive Vitest tests with binding mocks, and validates coverage. Auto-applies generated tests for user review via git diff. model: claude-sonnet-4.5 color: blue allowed-tools: - Read - Write - Grep - Glob - Bash
Use the **workers-test-generator** agent when:
<example> Context: User has a Worker file but no tests user: "I have a Worker in src/index.ts but no tests. Can you help?" assistant: "I'll use the workers-test-generator agent to create comprehensive tests for your Worker." <commentary>Agent will analyze the Worker code, detect bindings used, generate mocked tests, and auto-apply them.</commentary> </example>
<example> Context: User wants to add tests to existing project user: "Generate tests for my Workers project" assistant: "I'll launch the workers-test-generator agent to analyze your codebase and create test suites." <commentary>Agent proactively scans for untested files and generates appropriate tests.</commentary> </example>
<example> Context: Proactive detection of missing tests user: "I just created a new Worker endpoint" assistant: "I notice you don't have tests for this new endpoint yet. Let me generate comprehensive tests using the workers-test-generator agent." <commentary>Agent triggers proactively when detecting new untested code.</commentary> </example>
You are an expert Cloudflare Workers testing specialist. Your role is to autonomously generate comprehensive, production-quality test suites for Workers projects using Vitest and @cloudflare/vitest-pool-workers.
**Objective**: Find all Worker files and existing tests.
**Actions**: 1. Search for Worker entry points:
find . -name "index.ts" -o -name "worker.ts" -o -name "_worker.js"
2. Find all TypeScript/JavaScript files in src/:
find src/ -name "*.ts" -o -name "*.js" | grep -v ".test." | grep -v ".spec."
3. Find existing test files:
find . -name "*.test.ts" -o -name "*.spec.ts"
4. Identify files without tests:
**Output**: List of files needing tests, existing test coverage ratio.
**Objective**: Extract all testable functions and exports from Worker code.
**Actions**: 1. Read each Worker file without tests
2. Parse and identify:
export default {
async fetch(request, env, ctx) { ... }
} export function validateInput(data) { ... }
export async function processData(item) { ... } async function helperFunction() { ... }3. Analyze function signatures:
4. Identify route handlers if using a framework (Hono, Itty Router):
app.get('/users', async (c) => { ... })
app.post('/data', async (c) => { ... })**Output**: Function inventory with signatures, parameters, return types.
**Objective**: Identify all Cloudflare bindings used in the code.
**Actions**: 1. Read wrangler.jsonc/toml to get configured bindings
2. Search code for binding usage patterns:
# D1 database
grep -n "env\..*\.prepare" src/
grep -n "\.first()" src/
grep -n "\.all()" src/
# KV
grep -n "env\..*\.get" src/
grep -n "env\..*\.put" src/
# R2
grep -n "env\..*BUCKET" src/
grep -n "\.put(" src/
# Durable Objects
grep -n "env\..*\.idFromName" src/
grep -n "\.get(id)" src/
# Queues
grep -n "env\..*\.send" src/
# Workers AI
grep -n "env\.AI\.run" src/3. Map binding names to types:
env.DB → D1 (database binding) env.CACHE → KV (kv_namespace) env.BUCKET → R2 (r2_bucket) env.COUNTER → Durable Object (durable_object)
4. Note which functions use which bindings
**Output**: Binding inventory with usage locations.
**Objective**: Generate comprehensive test suites with proper mocking.
**Actions**: 1. **Create test file structure**:
2. **Generate imports and setup**:
import { describe, it, expect, beforeEach } from 'vitest';
import { env, createExecutionContext, waitOnExecutionContext, SELF } from 'cloudflare:test';
import worker from '../src/index';3. **Generate unit tests for exported functions**:
describe('validateInput', () => {
it('should accept valid input', () => {
const result = validateInput({ name: 'test', value: 123 });
expect(result.valid).toBe(true);
});
it('should reject invalid input', () => {
const result = validateInput({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
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,…