agents/skills/project-init/SKILL.md
Personalizes a fork of this Cloudflare multi-worker monorepo—Alchemy application ids (`await alchemy` literals + `--app`), npm workspace names (`--filter`), README, and UI—so Cloudflare dashboards and Turbo filters are not confusing. Use when the user created a repo from the template, wants to deploy their own app, or asks to rename workers, rebrand, or remove generic starter kit copy. **Skip** when `origin` matches root **`package.json`** **`repository.url`** (canonical template maintenance) unless the user explicitly asks.
npx skillsauth add firtoz/cf-multiworker-starter-kit project-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when someone is building their app on top of this starter kit—not when maintaining the canonical template (see project-init.mdc: compare origin with root repository.url).
Guard: If you are on the canonical template checkout, do not run this flow unless the user explicitly requests renaming or templating work.
Note — infra naming is code-first
PRODUCT_PREFIX once in worker-peer-scripts.ts (ALCHEMY_APP_IDS derives each Alchemy appId).deploy / destroy / dev scripts use the alchemy-cli workspace bin with alchemy.app in each package.json — don’t duplicate --app strings by hand.await alchemy("…") literals in each alchemy.run.ts aligned with that table, then bun run typegen.Adding a DO package or worker binding after fork setup — use the small focused skills, not one giant doc:
durable-objects/*, Alchemy + Hono.alchemy.run.ts, workspace deps.workers/rpc, Turbo dev / destroy:*, cyclic WorkerStub / WorkerRef.Ask the user (or infer from context):
alchemy("myslug-frontend") style (not $VAR + "-frontend"). Example: skybook → skybook-frontend, skybook-database, … (see root README — Name your product → Code-first infra names).package.json name) — often skybook-web, skybook-db, … — separate from Alchemy --app — used mainly for turbo run … --filter=….durable-objects/chatroom-do; web binds ChatroomDo; internal secret CHATROOM_INTERNAL_SECRET (already in env flows).packages/db + optional D1_DATABASE_NAME / D1_DATABASE_ID in .env.local / .env.production for remote/local debugging; ALCHEMY_APP_IDS.database (packages/db/alchemy.run.ts) drives migrations (alchemy-cli --stage prod deploy from packages/db, etc.).alchemy.run.ts has one await alchemy(<appId>, { … }); STAGE comes from alchemy-cli --stage (or CI STAGE).alchemy("…") must match ALCHEMY_APP_IDS for that package (frontend, chatroom, …).alchemy-cli resolves alchemy dev|deploy|destroy --app … from package.json → alchemy.app (same keys as ALCHEMY_APP_IDS) — avoid extra hard-coded --app strings that can drift.PRODUCT_PREFIX drives idsALCHEMY_APP_IDS + PRODUCT_PREFIX — Canonical Alchemy appId strings. package.json → alchemy.app uses those keys (frontend, chatroom, ping, other, database, stateHub, admin) plus arbitrary suffix segments for ${PRODUCT_PREFIX}-<suffix> (generator-created DO packages). Forks change PRODUCT_PREFIX once.| Package folder | Typical appId (PRODUCT_PREFIX = starter) | Turbo --filter uses workspace name (starter) |
|----------------|----------------------------------------------------------|--------------------------------------------------------|
| apps/web | starter-frontend (ALCHEMY_APP_IDS.frontend) | @internal/web |
| durable-objects/chatroom-do | starter-chatroom | chatroom-do |
| durable-objects/ping-do | starter-ping | ping-do |
| durable-objects/other-worker | starter-other | other-worker |
| packages/db | starter-database | @internal/db |
| packages/state-hub | ${PRODUCT_PREFIX}-state-hub (ALCHEMY_APP_IDS.stateHub) | state-hub |
Worker(DEFAULT_WORKER_RESOURCE_ID) with DEFAULT_WORKER_RESOURCE_ID = "worker"; ReactRouter uses DEFAULT_REACT_ROUTER_WEB_RESOURCE_ID ("web"); D1 D1Database(DEFAULT_D1_DATABASE_RESOURCE_ID) with db. Omit explicit name: so Cloudflare script names derive from ${alchemyAppId}-${resource}-${stage}.ping-do ↔ other-worker): omitDefaultPhysicalWorkerScriptName(<peer-alchemy-app>, app.stage) feeds WorkerRef.service / WorkerStub.name, matching omit-default Worker("worker") physical names — see cf-worker-rpc-turbo.Cross-package consumers still import provider ./alchemy exports (hub bindings from web). className on DurableObjectNamespace must match your TS exported class (PingDo…).
After edits: bun run typegen from the repo root. env.d.ts reflects exported ./alchemy.
package.json)package.json: set "name" to the fork project slug (replaces cloudflare-multiworker-template).apps/web/package.json: set "name" (e.g. my-saas-web) — Turbo filter usage; add "alchemy": { "app": "frontend" } (id still matches alchemy.run.ts + ALCHEMY_APP_IDS.frontend …).package.json: alchemy.app must match ALCHEMY_APP_IDS ↔ alchemy("…") in alchemy.run.ts; deploy/destroy/dev run alchemy-cli --stage ….packages/state-hub: alchemy.run.ts stays on ALCHEMY_APP_IDS.stateHub; alchemy.app is stateHub and scripts use alchemy-cli --stage … (provision-only shared Cloudflare Alchemy state for non-local STAGE).workspace:* dependencies: If you rename a workspace package (chatroom-do folder / name), update every consumer and bun install.Rewrite README.md for the product:
bun install, bun run dev, bun run deploy:prod (and deploy:staging / deploy:preview as needed).ALCHEMY_PASSWORD/CHATROOM_INTERNAL_SECRET — cf-workers-env-local.--app IDs (starter-* (with your PRODUCT_PREFIX) → your slug) alongside **workspace **name****.apps/web/app/welcome/welcome.tsx — page title / intro.apps/web/app/routes/home.tsx — meta title and description.apps/web/app/routes/chat.tsx — meta if you keep chat.CONTRIBUTING.md — replace <your-repo> with the clone URL where present.Search for cloudflare-multiworker-template, your-org/cloudflare-multiworker-template, old alchemy("web") / alchemy("ping-do") if any remain. Nested READMEs under apps/web, durable-objects/*.
bun run typegen
bun run typecheck
bun run lint
bun run build
Fix any failures before considering initialization complete.
development
Repo-root commands, typegen and typecheck cadence, lint, deploy, adding packages with bun, and Alchemy app layout. Use at the start of a task, before PR, or when choosing turbo/typegen commands.
development
Fork and template gotchas (env import, routes, typegen, forms, D1, Turbo, HMR, new DO packages). Use when working on apps/web or durable-objects, or when behavior diverges from this stack’s conventions.
testing
Turborepo task configuration patterns for monorepo management. Use when configuring turbo.json tasks, setting up task dependencies, managing cache inputs/outputs, or working with cross-package dependencies in the monorepo.
development
React Router v7 routing patterns and environment variable configuration. Use whenever you touch React Router–related code (routes, links, params, loaders, actions, route config, or env in route context).