Initialize Your Project
After create-red-app scaffolds the codebase, run /red-init once to turn the starter into your project. It is an interactive setup skill: it asks questions, shows a summary, waits for your confirmation, then applies the changes.
Prerequisites
Section titled “Prerequisites”- Open Claude Code in the RED project root.
- The project was scaffolded with
bun create red-app my-project --license <key>. .red-versionexists and is committed..red-licenseexists and is git-ignored.
If .red-version or .red-license is missing, the skill stops and asks you to scaffold with create-red-app first.
Run the Skill
Section titled “Run the Skill”/red-initThe skill follows a fixed sequence so setup stays reviewable.
Phase 0: Preflight
Section titled “Phase 0: Preflight”The skill verifies:
.red-licenseexists..red-versionexists..gitignoreignores.red-license..red-versionremains tracked because future updates use it as the RED base version.
Phase 0b: Convex Backend
Section titled “Phase 0b: Convex Backend”RED uses Convex for backend functions, storage, scheduling, and reactive data. The skill asks how you want to configure it:
- Existing project — provide a deployment name like
my-app-123. The skill writes.env.localwithCONVEX_DEPLOYMENT,VITE_CONVEX_URL, andVITE_CONVEX_SITE_URL. - Create a new project — run
bunx convex dev --oncein a separate terminal. The Convex CLI needs browser login and project selection, so the skill waits for you to confirm when it completes. - Skip for now — continue setup and configure Convex later.
After Convex setup, the skill checks .env.local. If the Convex CLI wrote CONVEX_URL or CONVEX_SITE_URL, the skill renames them to VITE_CONVEX_URL and VITE_CONVEX_SITE_URL because Vite only exposes VITE_ variables to the frontend.
Phase 0c: Deployment Auth Environment Variables
Section titled “Phase 0c: Deployment Auth Environment Variables”When Convex is configured (Options A or B above), the skill bootstraps auth-related deployment env vars before seeding the admin user:
BETTER_AUTH_SECRET— a freshly generated secret for Better Auth session and cookie signing. Without it, sign-in andbun run seedfail.SITE_URL— the browser origin your app runs on (defaulthttp://localhost:5173for local Vite dev). This drives CORS on auth routes,trustedOrigins, and email links until you set Site URL in Admin > Configure > General.
If you skip Convex setup, the skill lists the exact npx convex env set commands in the completion message so you can run them after bunx convex dev --once.
Private key material is never written to the repo, local env files, or the wizard output.
Phase 1: Project Name
Section titled “Phase 1: Project Name”Choose the name shown in the app, emails, and admin UI.
Phase 2: Domain Path
Section titled “Phase 2: Domain Path”RED ships with an integrated Briefs + AI reference application. Choose one:
- Keep RED as-is — the Briefs + AI app stays intact as a working reference.
- Make it yours — replace the Briefs surface with your own first-class entity and dashboard while keeping the AI engine, workspaces, and tasks as infrastructure.
For a custom entity, the skill asks for entity name and purpose, key fields, an optional child entity, and whether the AI assistant should act on the new entity.
Phase 3: Auth and Access
Section titled “Phase 3: Auth and Access”Choose:
- Signup mode — open signup, waitlist first, or invite only.
- Organization creation — users can create organizations, or only admins can create them.
These choices update the default configuration used by the app and admin settings.
Phase 4: Optional Peripheral Modules
Section titled “Phase 4: Optional Peripheral Modules”Choose which optional modules to keep:
- Billing — Autumn plans, entitlements, metered usage, and Stripe checkout.
- API Keys — org-scoped API keys with JWT token exchange at
/api/v1/auth/tokenand rate limiting.
Core platform modules (auth, AI, workspaces, tasks, and others) always stay. Modules you remove are deleted from code and integration points are cleaned up.
Phase 4c: API Keys JWT Keys
Section titled “Phase 4c: API Keys JWT Keys”If you keep API Keys and Convex is configured, the skill generates an ES256 P-256 keypair and sets APIKEY_JWT_PRIVATE_KEY and APIKEY_JWT_PUBLIC_KEY on the deployment. These power token exchange and the /.well-known/jwks.json endpoint used by Convex customJwt validation.
If you remove API Keys or skipped Convex setup, this step is skipped (deferred commands appear in the completion message when applicable).
Phase 4b: Documentation Site
Section titled “Phase 4b: Documentation Site”RED includes apps/docs/, which documents RED itself. Most product teams remove it during initialization. Keep it only if you want to repurpose it as your own docs site.
Phase 5: Summary and Confirmation
Section titled “Phase 5: Summary and Confirmation”The skill shows a summary of every choice, including which deployment env vars were set or deferred. No files are changed until you confirm.
Phase 6: Apply Changes
Section titled “Phase 6: Apply Changes”After confirmation, the skill applies changes in order:
- Updates the project name in configuration.
- Keeps or replaces the domain path (Briefs surface).
- Applies auth and organization defaults.
- Removes unselected optional modules.
- Removes
apps/docs/if requested. - Runs
bun run lintandbunx convex dev --oncewhen Convex is configured. - Runs
bun run seedif Convex is configured (requires Phase 0c env vars). - Removes starter-kit seed scripts.
If Convex was skipped, backend seeding and seed-script removal are deferred.
Phase 7: Verify
Section titled “Phase 7: Verify”When Convex is configured, the skill:
- Derives the Convex HTTP base URL from
.env.local. - If API Keys was kept, curls
/.well-known/jwks.json(expectskid: apikey-v1,alg: ES256) to confirm the public key is set, andPOST /api/v1/auth/tokenwith a bogus key (expects 401) to confirm the route is live. The bogus-key call can’t verify the signing keys — an invalid key is rejected with 401 before the misconfiguration check runs — so end-to-end signing is confirmed by exchanging a real key after seeding.
After Initialization
Section titled “After Initialization”Run the app:
bun devIf Convex was skipped, configure it first:
bunx convex dev --oncenpx convex env set BETTER_AUTH_SECRET "$(openssl rand -base64 32)"npx convex env set SITE_URL "http://localhost:5173"( set -e tmpdir="$(mktemp -d)" trap 'rm -rf "$tmpdir"' EXIT openssl ecparam -name prime256v1 -genkey -noout | openssl pkcs8 -topk8 -nocrypt -out "$tmpdir/sk.pem" openssl ec -in "$tmpdir/sk.pem" -pubout -out "$tmpdir/pk.pem" npx convex env set APIKEY_JWT_PRIVATE_KEY -- "$(cat "$tmpdir/sk.pem")" npx convex env set APIKEY_JWT_PUBLIC_KEY -- "$(cat "$tmpdir/pk.pem")")bun run seedThen open http://localhost:5173, sign in with the seeded admin credentials, and verify the app loads with no console errors.
Important Notes
Section titled “Important Notes”- Treat
/red-initas first-time setup for a freshly scaffolded project. - Do not delete core platform modules: auth, admin, audit, config, email, users, organizations, AI, workspaces, or tasks.
- Set
RESEND_API_KEYin Convex environment variables before relying on real email delivery. - For production, update
SITE_URLin the Convex env (or Site URL in Admin > Configure > General) to your production origin.