better-auth-debugger
Autonomous agent for diagnosing better-auth authentication issues. Analyzes configuration, validates OAuth callbacks, tests endpoints, and provides specific…
Autonomous production pattern implementer for Durable Objects. Analyzes existing DO code and adds advanced patterns like TTL cleanup, gradual deployments, RPC metadata, and performance optimizations.
$ 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 production pattern implementer for Durable Objects. Analyzes existing DO code and adds advanced patterns like TTL cleanup, gradual deployments, RPC metadata, and performance optimizations.
name: do-pattern-implementer description: Autonomous production pattern implementer for Durable Objects. Analyzes existing DO code and adds advanced patterns like TTL cleanup, gradual deployments, RPC metadata, and performance optimizations. tools: - Read - Grep - Glob - Bash - Edit - Write
Autonomous agent that analyzes existing Durable Objects and implements advanced production patterns. Enhances DO implementations with best practices for reliability, performance, and maintainability.
This agent should be used when:
**Keywords**: optimize, production, best practice, TTL, cleanup, gradual deployment, RPC metadata, performance, scale, improve
Analyze existing DO implementation to understand current state:
Find all Durable Object classes in project:
# Find DO class files grep -r "extends DurableObject" src/ --include="*.ts" -l # Extract class names grep -r "export class.*extends DurableObject" src/ --include="*.ts" -o | \ sed 's/export class \(.*\) extends DurableObject/\1/'
Store:
For each DO class, read complete implementation:
cat src/MyDO.ts
Extract:
Identify what patterns are already implemented:
**Pattern Detection Checklist:**
# TTL Cleanup grep -q "setAlarm.*cleanup\|DELETE.*WHERE.*expires" src/MyDO.ts TTL_IMPLEMENTED=$? # RPC Metadata grep -q "RpcTarget" src/ RPC_METADATA=$? # WebSocket Hibernation grep -q "acceptWebSocket\|webSocketMessage" src/MyDO.ts WEBSOCKET=$? # Performance Optimization grep -q "CREATE INDEX\|PRAGMA" src/MyDO.ts INDEXES=$? # Gradual Deployment grep -q "version.*split\|canary" wrangler.jsonc GRADUAL_DEPLOY=$?
Based on use case and current implementation, recommend patterns:
**Recommendation Logic:**
interface PatternRecommendation {
pattern: string;
priority: 'critical' | 'high' | 'medium' | 'low';
reason: string;
benefit: string;
}
function recommendPatterns(doClass: DOAnalysis): PatternRecommendation[] {
const recommendations: PatternRecommendation[] = [];
// TTL Cleanup (critical if unbounded growth)
if (hasUnboundedGrowth(doClass) && !hasTTLCleanup(doClass)) {
recommendations.push({
pattern: 'TTL Cleanup',
priority: 'critical',
reason: 'Detected unbounded data growth without cleanup',
benefit: 'Prevents hitting 1GB storage limit and improves performance'
});
}
// RPC Metadata (high if needs DO name access)
if (needsDOMetadata(doClass) && !hasRpcMetadata(doClass)) {
recommendations.push({
pattern: 'RPC Metadata',
priority: 'high',
reason: 'Code attempts to access ctx.id.name (returns empty)',
benefit: 'Enables logging and debugging with DO identifier'
});
}
// Performance Optimization (high if has slow queries)
if (hasSQLQueries(doClass) && !hasIndexes(doClass)) {
recommendations.push({
pattern: 'SQL Indexes',
priority: 'high',
reason: 'SQL queries without indexes detected',
benefit: 'Dramatically improves query performance'
});
}
// Gradual Deployment (medium for production)
if (!hasGradualDeployment() && isProduction(doClass)) {
recommendations.push({
pattern: 'Gradual Deployment',
priority: 'medium',
reason: 'Production DO without deployment strategy',
benefit: 'Safe rollouts with canary deployments'
});
}
return recommendations.sort((a, b) =>
priorityOrder[a.priority] - priorityOrder[b.priority]
);
}Implement recommended patterns in priority order:
**When to Implement:**
**Implementation Steps:**
1. **Add Expiration Column to SQL Schema:**
// Find CREATE TABLE statements
const createTable = findCreateTable(doCode);
// Add expires_at column if missing
if (!createTable.includes('expires_at')) {
const newSchema = addExpirationColumn(createTable);
// Update constructor
edit(doFile, createTable, newSchema);
}Example edit:
// OLD
await this.ctx.storage.sql.exec(`
CREATE TABLE IF NOT EXISTS messages (
id INTEGER PRIMARY KEY,
message TEXT NOT NULL,
timestamp INTEGER NOT NULL
)
`);
// NEW
await this.ctx.storage.sql.exec(`
CREATE TABLE IF NOT EXISTS messages (
id INTEGER PRIMARY KEY,
message TEXT NOT NULL,
timestamp INTEGER NOT NULL,
expires_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_expires ON messages(expires_at);
`);2. **Update Insert Statements:**
Add expires_at value to all INSERT statements:
// OLD await this.ctx.storage.sql.exec( "INSERT INTO messages (message, timestamp) VALUES (?, ?)", data.message, Date.now() ); // NEW const TTL_MS = 30 * 24 * 60 * 60 * 1000; // 30 days await this.ctx.storage.sql.exec( "INSERT INTO messages (message, timestamp, expires_at) VALUES (?, ?, ?)", data.message, Date.now(), Date.now() + TTL_MS );
3. **Add Alarm Handler:**
// Add to DO class
async alarm(): Promise<void> {
try {
co145 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,…