backbone-scaffolding
Scaffolds production-ready monorepo projects using the backbone CLI: configures workspace packages, wires build tooling, sets up CI pipelines, and initializes framework/backend/CMS integrations. Use when creating, bootstrapping, or initializing a new application, project, starter template, or monorepo from scratch. Trigger terms: scaffold, bootstrap, init, new repo, new app, boilerplate, starter, greenfield.
git clone --depth 1 https://github.com/monkilabs/opencastle /tmp/backbone-scaffolding && cp -r /tmp/backbone-scaffolding/src/orchestrator/skills/backbone-scaffolding ~/.claude/skills/backbone-scaffoldingSKILL.md
# backbone-scaffolding Skill
## Requirements
- Node.js **>= 22.5.0** must be available in the environment
- Run backbone with `npx @monkilabs/backbone <project-name>`
## How to Use the CLI
Backbone is **interactive** — uses `@clack/prompts` to ask series of questions. Agents must run command, respond to each prompt in sequence.
### Prompt Sequence
1. **Monorepo tool** — `nx` or `turborepo`
2. **Framework** — `nextjs` or `astro`
3. **Backend** — `convex`, `supabase`, `prisma`, or `drizzle`
4. **CMS** — `sanity`, `contentful`, `strapi`, or `none`
5. **E2E Testing** — `playwright` or `cypress`
6. **Deployment** — `vercel`, `netlify`, `cloudflare`, `coolify`, or `none`
7. **Mobile** — `ionic`, `expo`, or `none` *(only shown for non-Astro frameworks)*
8. **Packages** — multi-select: `uiLib`, `emailLib`, `llmLib`
9. **Payments** — `stripe` or `none`
10. **Observability** — `sentry` or `none`
## CLI Options & Constraints
| Category | Choices | Notes |
|---------------|--------------------------------------------------|------------------------------------------|
| Monorepo | `nx`, `turborepo` | Required |
| Framework | `nextjs`, `astro` | Required |
| Backend | `convex`, `supabase`, `prisma`, `drizzle` | ⛔ `convex` incompatible with `astro` |
| CMS | `sanity`, `contentful`, `strapi`, `none` | Optional |
| E2E Testing | `playwright`, `cypress` | Required |
| Deployment | `vercel`, `netlify`, `cloudflare`, `coolify`, `none` | Optional |
| Mobile | `ionic`, `expo`, `none` | ⛔ `ionic` and `expo` incompatible with `astro` |
| Packages | `uiLib`, `emailLib`, `llmLib` | Multi-select; ⛔ `uiLib` incompatible with `astro` |
| Payments | `stripe`, `none` | Optional |
| Observability | `sentry`, `none` | Optional |
**Astro constraint:** `astro` requires React-free options — never combine with `convex`, `ionic`, `expo`, or `uiLib`.
## OpenCastle TechTool → Backbone Mapping
Most TechTool names map 1:1 to backbone prompt choices (e.g. `nextjs` → Next.js, `supabase` → Supabase). Non-1:1 exceptions:
| TechTool | Backbone mapping |
|----------|-----------------|
| `resend` | `emailLib` in Packages prompt |
| `vitest` | Always included automatically |
| `figma`, `chrome-devtools` | Not handled by backbone; configure separately |
## Generated Project Structure
`apps/` (`web`, conditional `mobile`), `packages/` (conditional `ui`, `email`, `llm`, `stripe`), `backend/` (one of `convex`/`supabase`/`prisma`/`drizzle`), `e2e/`, `.github/workflows/`. Always at root: `vitest.config.ts`, `tsconfig.base.json`, `package.json`, `turbo.json`/`nx.json`, ESLint, Prettier. Conditional root files: `wrangler.toml` (cloudflare), `Dockerfile` (coolify), `sentry.*.config.ts` (sentry, in `apps/web/`).
Agents on post-scaffolding tasks **must not recreate** these — they already exist. Import and extend.
## Post-Scaffolding Steps
After `npx @monkilabs/backbone <project-name>` completes:
1. `cd <project-name>` into generated directory
2. Run `npm install` for all dependencies
3. Verify project builds: run monorepo build command (e.g. `npx turbo build` or `npx nx build`)
4. All subsequent agent tasks should **import and extend** generated boilerplate — never overwrite
**If something fails:**
- `npm install` errors → verify Node.js >= 22.5.0 (`node -v`)
- Build errors → check no incompatible options selected (see Astro constraint above); re-run backbone with corrected choices if needed
- Wrong option selected → delete generated directory; re-run `npx @monkilabs/backbone` with correct selections
## Example Convoy Task
```json
{
"id": "scaffold-monorepo",
"agent": "developer",
"prompt": "Run `npx @monkilabs/backbone my-app` interactively. Select: nx · nextjs · supabase · sanity · playwright · vercel · uiLib · stripe · sentry. Then `cd my-app && npm install && npx nx build`. Verify clean build before continuing.",
"files": ["my-app/"],
"timeout": "30m"
}
```Creates pages/layouts, defines content collections, configures hydration directives, and wires integrations. Use when adding or modifying Astro pages, layouts, components, or content collections. Trigger terms: Astro, content collection, client:load, client:visible, astro:content
Drive real browsers via Chrome DevTools MCP: navigate pages, capture snapshots, run responsive checks, and collect console/perf traces. Use when the user mentions: 'validate UI change in Chrome', 'capture a screenshot', 'run responsive checks', or 'collect console logs'. Trigger terms: browser testing, DevTools, console logs, screenshot, responsive testing
Creates and deploys Cloudflare Workers, configures wrangler.toml bindings, sets up KV/D1/R2 storage and Durable Objects, manages Pages deployments, and implements edge function patterns. Use when building or deploying Cloudflare Workers, setting up Pages, working with KV/D1/R2 storage, configuring wrangler.toml, or deploying edge applications.
Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content.
Convex reactive database patterns, schema design, real-time queries, mutations, actions, authentication, migrations, performance optimization, and component creation. Use when designing Convex schemas, writing queries/mutations, managing the Convex backend, setting up auth, migrating data, optimizing performance, or building Convex components.
Deploys applications, databases, and services on self-hosted Coolify instances, manages environments and env vars, runs infrastructure diagnostics, and performs batch operations. Use when deploying apps to Coolify, managing Coolify servers, debugging deployment issues, setting up databases, or managing Coolify infrastructure.
Writes Cypress E2E/component tests, configures `cy.intercept()` and `cy.session()`, authors custom commands, and wires CI artifacts. Use when creating E2E specs, component tests, or CI test pipelines. Trigger terms: cypress, e2e, component test, cy.intercept, cy.session
Drizzle ORM schema definition, type-safe queries, relational queries, CRUD operations, transactions, migrations with drizzle-kit, and database setup for PostgreSQL, MySQL, and SQLite. Use when defining database schemas, writing queries or joins, managing migrations, setting up a new Drizzle project, or working with drizzle-kit.