better-auth-add-plugin
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Interactive Durable Objects project initialization. Scaffolds new DO project with proper bindings, migrations, and boilerplate code.
$ npx -y skills add secondsky/claude-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/do-setupContext preview
What this command does when you run it.
Interactive Durable Objects project initialization. Scaffolds new DO project with proper bindings, migrations, and boilerplate code.
name: cloudflare-durable-objects:setup description: Interactive Durable Objects project initialization. Scaffolds new DO project with proper bindings, migrations, and boilerplate code.
Interactive command to initialize a new Durable Objects project with proper configuration, bindings, migrations, and boilerplate code.
This command guides through the complete setup process for Cloudflare Durable Objects, ensuring correct configuration from the start. It handles:
Use AskUserQuestion tool to collect setup preferences:
**Question**: "Are you setting up a new project or adding Durable Objects to an existing project?" **Header**: "Project Type" **Options**:
**Question**: "Which storage backend do you want to use for your Durable Object?" **Header**: "Storage Backend" **Options**:
**Question**: "What will your Durable Object primarily be used for?" **Header**: "Use Case" **Options**:
**Question**: "Do you want to set up Vitest for testing your Durable Objects?" **Header**: "Testing" **Options**:
Before proceeding with setup, validate the development environment:
Run validation checks:
# Check Node.js version (18+ required) node --version # Check if wrangler is installed wrangler --version # Check if in valid directory pwd
If **New Project**:
If **Existing Project**:
If wrangler not installed:
npm install -g wrangler@latest
If wrong Node.js version:
# Recommend using nvm to install Node 20+ nvm install 20 nvm use 18
Execute setup based on user selections:
Run npm create cloudflare:
npm create cloudflare@latest my-durable-objects-app -- \ --template=cloudflare/durable-objects-template \ --ts --git --deploy false cd my-durable-objects-app
No scaffolding needed, proceed to configuration.
Generate DO class file based on selected use case pattern:
Based on **Use Case Pattern** selection:
import { DurableObject } from "cloudflare:workers";
export class ChatRoom extends DurableObject {
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.ctx.blockConcurrencyWhile(async () => {
// Initialize SQL schema for message history
if (STORAGE_BACKEND includes "SQL") {
await this.ctx.storage.sql.exec(`
CREATE TABLE IF NOT EXISTS messages (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
message TEXT NOT NULL,
timestamp INTEGER NOT NULL
)
`);
}
});
}
async fetch(request: Request): Promise<Response> {
const url = new URL(request.url);
// WebSocket upgrade
if (request.headers.get("Upgrade") === "websocket") {
const pair = new WebSocketPair();
this.ctx.acceptWebSocket(pair[0]);
return new Response(null, { status: 101, webSocket: pair[1] });
}
return new Response("WebSocket endpoint", { status: 200 });
}
async webSocketMessage(ws: WebSocket, message: string | ArrayBuffer): Promise<void> {
// Broadcast to all connected clients
const websockets = this.ctx.getWebSockets();
websockets.forEach((client) => {
client.send(message);
});
// Store message in SQL (if enabled)
if (STORAGE_BACKEND includes "SQL") {
const data = typeof mes145 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