Initialize and scaffold the complete monorepo project structure based on the technology stack and architecture decisions. Sets up the frontend, backend, shared packages, configuration, dev scripts, and a working hello-world across the full stack. Use when the team is ready to start coding and the stack and architecture are decided. Also use when someone says "set up the project", "scaffold this", "initialize the repo", or "let's start building". This skill creates a production-quality project foundation, not just boilerplate.
Resources
1Install
npx skillscat add biruk741/cc-plugins/plugins-hackathon-pilot-skills-scaffold Install via the SkillsCat registry.
Project Scaffolding Skill
Read .hackathon/STACK.md (or stack-config.json), .hackathon/ARCHITECTURE.md, and .hackathon/contracts/shared-types.ts first.
Hard gate: Both stack and architect phases must be complete.
Important Context
This skill creates the foundation that developers will build on for the rest of the hackathon. Getting this right saves hours of debugging configuration issues. Getting it wrong can cascade into constant friction.
Pre-Scaffold: Documentation Research
Before writing any code, spin up the doc-researcher agent to fetch the latest documentation and best practices for the chosen tools. This is critical because:
- Framework APIs change frequently
- The agent's training data may be slightly outdated
- Best practices evolve
The doc-researcher should check:
- The chosen frontend framework's latest project setup guide
- The chosen backend framework's latest getting-started docs
- The monorepo tool's workspace configuration
- The ORM's setup and migration guide
- The deployment platform's requirements (what file structure it expects)
Scaffold Checklist
All items must be completed. The verification script (scripts/verify-scaffold.sh) checks each one.
1. Repository Root
-
package.jsonwith workspace configuration -
turbo.json(or equivalent monorepo config) -
.gitignore(comprehensive — node_modules, .env, .turbo, dist, etc.) -
.env.examplewith all required environment variables documented -
tsconfig.base.json(shared TypeScript config) -
.eslintrcoreslint.config.js(shared lint config) -
.prettierrc(shared formatting — critical for multi-dev consistency) -
README.mdwith project name, setup instructions, and available scripts
2. Frontend App (apps/web/)
- Framework initialized (Next.js / Vite+React)
- TypeScript configured, extending base tsconfig
- Tailwind CSS configured and working
- A layout component with basic navigation structure
- A home page that renders successfully
- API client configured (Hono RPC client or equivalent) pointing to backend
- Environment variable for API URL
- Dev script that starts with hot-reload
3. Backend App (apps/api/)
- Framework initialized (Hono / Elysia)
- TypeScript configured, extending base tsconfig
- A health check endpoint (
GET /health→{ status: "ok" }) - Route structure matching the architecture's API domains
- Database connection configured (even if empty schema)
- CORS configured for frontend dev server
- Environment variable handling (.env loaded)
- Dev script that starts with hot-reload
- Type exports for the RPC client
4. Shared Package (packages/shared/)
-
package.jsonwith name@project/shared - TypeScript configured
- Types from
.hackathon/contracts/shared-types.tscopied intosrc/types/ -
src/index.tsthat re-exports everything - Both apps can import from
@project/shared
5. UI Package (packages/ui/) — Placeholder
-
package.jsonwith name@project/ui - Basic setup ready for the design system skill to populate
- Both frontend app can import from
@project/ui
6. Config Package (packages/config/) — Optional
- Shared ESLint config
- Shared TypeScript config
- Shared Tailwind config (if applicable)
7. Development Experience
- Root-level
pnpm devstarts both frontend and backend - Root-level
pnpm buildbuilds everything - Root-level
pnpm lintlints everything - Root-level
pnpm typecheckruns type checking across all packages - Changes in
packages/sharedare reflected in apps without restart
8. Full-Stack Verification
- Frontend renders a page
- Backend responds to health check
- Frontend can call backend and display the response
- Shared types are importable in both apps
- A sample typed API call works end-to-end (e.g., frontend calls backend health check and displays the result)
Process
- Read the stack config
- Run doc-researcher for latest docs
- Create the directory structure
- Initialize each package with its framework
- Copy types from
.hackathon/contracts/shared-types.tsintopackages/shared/src/types/, restructuring into modules (api.ts, models.ts, enums.ts) as appropriate - Install dependencies
- Configure TypeScript path aliases for cross-package imports
- Set up the dev scripts
- Create the hello-world end-to-end flow
- Run the verification script
- Fix any issues
- Lock
.hackathon/contracts/shared-types.ts(set frontmatter status to locked, locked-by: scaffold) — from now on,packages/shared/src/types/is the canonical type location - Commit with message: "chore: scaffold project"
Deployment Prep (Baked In)
During scaffolding, also set up deployment configuration even though we won't deploy yet:
Dockerfileor deployment config for the backendvercel.jsonor equivalent for the frontend- Database migration setup (even if empty)
- Environment variable documentation in
.env.example
This way, when the deploy skill is triggered later (via /hackathon-pilot:next deploy or by asking Claude to deploy), it's a single step rather than an hour of configuration.
Output
- Complete monorepo structure as described above
- Verification script output confirming everything works
- Update
STATE.md: scaffold complete - Log to changelog
- Print: "Project scaffolded. Run
pnpm devto start. Both apps should be running. Next: design system and work phasing."