No slash command · from hypervibe
Internal helper that scaffolds and deploys a Cloudflare Worker in apps/worker/, optionally adding CRON triggers. Invoked by /add-automation after monorepo setup.
Ships in hypervibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
wrangler (to be done BEFORE any other wrangler command in this skill)eval "$(node "${CLAUDE_SKILL_DIR}/../../scripts/wrangler-env-init.mjs")"
This line loads CLOUDFLARE_API_TOKEN from the User scope (Windows registry / shell rc on Mac/Linux) if it is not in process.env, and adds the pnpm bin to the PATH (for bash sessions where pnpm setup has not yet propagated). Without it, wrangler fails with "command not found" on Mac (Spotlight), or may use a different Cloudflare account than the one the user expects.
/bootstrap carries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim.You scaffold and deploy a Cloudflare Worker inside apps/worker/.
The caller (/add-automation) has already:
_setup-wrangler)_convert-to-turborepo)If any of these are not true, refuse and tell the user to invoke /add-automation instead.
The caller passes (or will tell you) two parameters:
NEEDS_CRON - yes or noCRON_EXPRESSION - a standard 5-field cron expression (only if NEEDS_CRON=yes)mkdir -p apps/worker
cd apps/worker
pnpm dlx wrangler init . --yes
This creates a minimal Worker template with wrangler.toml, src/index.ts, and a package.json.
Read the project name from the root package.json:
node -e "process.stdout.write(require('../../package.json').name)"
Read the Cloudflare account ID:
wrangler whoami | grep -oE '[a-f0-9]{32}' | head -1
Update apps/worker/wrangler.toml with:
name = "<project-name>-worker"
main = "src/index.ts"
compatibility_date = "<today's date in YYYY-MM-DD>"
account_id = "<account id>"
Append to wrangler.toml:
[triggers]
crons = ["<CRON_EXPRESSION>"]
Replace apps/worker/src/index.ts with:
export interface Env {
// Add your environment variables here, e.g.:
// SOME_API_KEY: string;
}
export default {
async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext): Promise<void> {
// TODO: your scheduled task logic here
console.log("Cron triggered:", event.cron, "at", new Date().toISOString());
},
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
return new Response("Worker is running", { status: 200 });
},
};
export interface Env {
// Add your environment variables here
}
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
// TODO: handle incoming requests
return new Response("Worker is running", { status: 200 });
},
};
Make sure apps/worker/package.json has:
{
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy",
"tail": "wrangler tail"
}
}
cd apps/worker
wrangler deploy
Capture the deployed URL from the output (looks like https://<project-name>-worker.<your-subdomain>.workers.dev).
If the deploy fails:
wrangler whoami and verify it's set in wrangler.tomlSo the Next.js app can call the worker via HTTP, invoke _push-env-vars with:
WORKER_URL=<worker URL from Step 5>The helper writes to .env local AND pushes to Vercel (production/preview/development) in one operation.
Tell the user:
✅ Cloudflare Worker deployed.
URL:
<worker URL>Code:apps/worker/src/index.tsReal-time logs:pnpm --filter=worker tailLocal dev:pnpm --filter=worker dev
If NEEDS_CRON=yes, also tell the user:
The CRON is handled natively by Cloudflare via
[triggers]inwrangler.toml. Current schedule:<CRON_EXPRESSION>. To change it, editwrangler.tomland redeploy.
Return control to the calling skill (/add-automation). Pass back the worker URL so the orchestrator can include it in its final summary.
Every cloud resource this skill creates or adopts is recorded in the project resource manifest (.hypervibe/resources.json, versioned with the code) - it is what /save-project and /delete-project read first, instead of guessing resources by name. Run the recording right after the resource exists; it is idempotent, silent on success, and stores identifiers only (never secrets). Full reference: the _track-resource skill.
Record the worker right after the first successful deploy:
node "${CLAUDE_SKILL_DIR}/../../scripts/manifest/manifest.mjs" add --project-dir "<project-root>" \
--kind cf-worker --name "<worker-name>" --added-by <calling-skill>
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub flavien-ia/hypervibe-craft --plugin hypervibe90 skills in this plugin
/accessibilityAccessibility audit of a Next.js app: reads the code (images, buttons, links, form fields, keyboard, focus, zoom, motion), measures the live pages with PageSpeed Insights, explains each problem plainly, then applies the fixes the user approves./add-2faAdd two-factor authentication (2FA TOTP) to an existing T3 project's login. Orchestrator - asks which authenticator app the user wants, detects whether the project uses admin auth (single fixed login) or user accounts, and delegates to the right setup. Admin mode - 2FA is mandatory for the single admin, secret + backup codes stored in the Bitwarden vault. User mode - 2FA is optional per user, each user enables it from their account page, secrets + backup codes stored per-user in the database. Requires the project to already have hypervibe auth (`/add-auth`)./add-agent-dashboardAdd a monitoring screen for AI agents in the project admin: cost, run history, turn-by-turn traces, and a button to launch a run by hand. Installed when an agent is created, safe to re-run./add-aiAdd AI to an existing Next.js project: chat assistant, content processing, or generation. Estimates the cost from live prices and provisions a spending-capped key before writing any code. Model-independent through OpenRouter./add-analyticsAdd Google Analytics (GA4) to an existing Next.js project. Includes RGPD cookie consent banner./add-authAdd NextAuth (Auth.js) authentication to an existing T3 project. One structured question decides the mode - admin (fixed login in env vars) or users (DB-backed email+password with signup, signin, account page, delete account, and optional forgot-password if email is configured). OAuth providers (Google, GitHub) are offered as optional add-ons AFTER the user-credentials baseline, never as a replacement. This skill is an orchestrator - it delegates the actual implementation to `_setup-auth-admin` or `_setup-auth-users` depending on the chosen mode.Other plugins' skills for the same job