一键导入
scaffold
One-shot a new product — folders, Next.js starter, product.config.json, CLAUDE.md, scope.md, PRD skeleton, SETUP.md checklist. The Lovable-like ignition.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
One-shot a new product — folders, Next.js starter, product.config.json, CLAUDE.md, scope.md, PRD skeleton, SETUP.md checklist. The Lovable-like ignition.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Slice a goal into the smallest feature slices that can each be PROVEN — every slice ships with a named eval and an end-to-end test, and a slice you can't evaluate or test doesn't get selected. Use after the goal is set and before the spec, so only provable features make the build.
Guided, stateful provisioning of a product's production stack — deep-links, key-format validation, a secrets backend (fnox recommended, or user-touched .env.local), a resumable ledger, CLI automation after signup, and a blocking A1–A10 live gate. Hands off to /security-check → /ship. The walked version of SETUP.md.
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea.
Launch the factory's control plane — scaffold and fill FACTORY-ORDERS (weekly mandate + hard budget), STANDING-ORDERS (autonomous-program authority), HEARTBEAT (weekly pulse), and write lifecycle gates for every registered product. A deliberate one-time ritual (re-run to audit); invoke as /factory-launch, not auto-triggered.
Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.
Stress-test an idea or hypothesis. Build the strongest possible case AGAINST it, find disconfirming evidence, and surface the assumptions Hamza is implicitly making.
| name | scaffold |
| disable-model-invocation | true |
| description | One-shot a new product — folders, Next.js starter, product.config.json, CLAUDE.md, scope.md, PRD skeleton, SETUP.md checklist. The Lovable-like ignition. |
Usage: /scaffold "<slug>" "<one-liner>"
Example: /scaffold "formpad" "A form builder for indie SaaS founders that auto-generates schema from prompts."
Creates a complete starting point for a new product:
Folder structure at products/<slug>/:
products/<slug>/
├── product.config.json
├── CLAUDE.md
├── scope.md
├── prd.md
├── metrics.md (skeleton, fill in via metric-framework-designer later)
├── SETUP.md (the one-time setup checklist)
├── README.md
├── decisions/
│ └── 0001-scaffold.md
├── validation/
│ └── README.md (the validation ledger — gates `bun run check-validation`)
├── interviews/
│ └── README.md
├── launch/
│ └── README.md
├── analytics/
│ └── README.md
└── (NO code/ here — see step 2: product code lives in its OWN sibling repo)
Layout rule (hard): products/<slug>/ in Hamzaish is metadata only
(markdown + product.config.json + the folders above). A product's actual code
lives in its own repo outside Hamzaish, registered in gitignored
code-paths.local.json. Never create products/<slug>/code/ (or src/, app/,
dist/…) with real source — Hamzaish is always public and nothing excludes it from
commits. bun run check-product-layout enforces this; see
brain/anti-patterns/product-code-inside-factory-repo.md.
Code repo — a SIBLING repo, NOT inside Hamzaish. Create the product's code in
its own directory outside this repo (e.g. ~/Claude/<Name>), git init it there
(no remote yet if held local → add a .no-auto-push marker), then register it:
add "<slug>": "/abs/path/to/<Name>" to code-paths.local.json (gitignored) and
keep code_path: null in product.config.json (path-portability rule). For a web
product, seed that sibling repo from templates/product-starter-nextjs/ with the
name, slug, and one-liner substituted into:
package.json (name).env.example (NEXT_PUBLIC_APP_NAME)src/app/(marketing)/page.tsx (hero copy)src/app/layout.tsx (default metadata)next.config.mjs (if needed)README.md.gitleaks.toml, SETUP.md ({{PRODUCT_NAME}} / {{PRODUCT_SLUG}} placeholders).devcontainer/devcontainer.json ({{PRODUCT_NAME}} placeholder)The starter is secure-by-default — the copy already brings .gitignore
(.env* ignored, !.env.example tracked), the committed .env.example
placeholder, the secret-scan.yml gitleaks workflow, .gitleaks.toml, the
.githooks/pre-commit hook, and a .devcontainer/ (Node + Bun) so builds run
in an isolated container instead of on the bare host. See "Secure-by-default"
below for the scaffold-time steps the template can't carry on its own.
product.config.json — the dashboard registry entry:
{
"slug": "<slug>",
"name": "<Title Case Name>",
"one_liner": "<one-liner>",
"created": "<ISO date>",
"stage": "idea",
"status": "scaffolded",
"code_path": null,
"aliases": [],
"analytics": {
"stripe_account_id": null,
"posthog_project_id": null,
"ga4_measurement_id": null,
"plausible_domain": null,
"sentry_org": null,
"sentry_project": null,
"gsc_property": null,
"ahrefs_target": null
},
"links": {
"github": null,
"prod_url": null,
"staging_url": null
}
}
CLAUDE.md in the product folder — uses templates/claude-md-template.md with substitutions.
scope.md — uses templates/scope-doc-template.md, with Claude's first-pass fill from the one-liner. User edits in next session.
PRD skeleton — uses templates/prd-template.md, Claude pre-fills sections that can be inferred from the one-liner; rest are clearly marked TODO.
SETUP.md — the exact 11-step setup checklist from stack/analytics-stack.md, with the product's specific URLs for service signups pre-filled.
First decision log entry in decisions/0001-scaffold.md:
## YYYY-MM-DD — Scaffolded
Created via /scaffold. One-liner: "<one-liner>".
Stage: idea. Stack: default per stack/tech-stack.md.
Next: complete SETUP.md, run /validate <slug>.
<slug> and <one-liner> from the user's invocation.products/<slug>/ exists.products/<slug>/validation/README.md from products/_template/validation/README.md, then run bun run check-validation <slug>. If it exits non-zero (state unvalidated), tell the user: "No validation evidence for this product. Run /validate <slug> first, or — if you're choosing to build first — I'll set the ledger to debt-accepted and record why." Building first is allowed; building first silently is not. Only proceed once the ledger reflects reality (validated, in-progress, or debt-accepted).bun install && bun dev boots it in local mode (dev-auth stub, SQLite-ready, integrations off). SETUP.md is the go-live checklist for later, not a prerequisite — surface it as "when you're ready to ship," never as "do this first."code-paths.local.json) in its devcontainer — VS Code → 'Reopen in Container' (or devcontainer up). The container installs deps and runs the dev server in isolation; the landing page boots at localhost:3000 (port-forwarded out of the container) with zero accounts — build first, wire your stack when you deploy. Building on the bare host instead is at your own risk."Every scaffolded product ships secure from commit zero. Most of this rides in via the template copy; a few steps must run at scaffold time.
.gitignore ignores .env, .env.*,
*.env.local and re-includes !.env.example. Only the placeholder
.env.example is tracked; real secrets go in .env.local (local) or Vercel
project settings (prod), never the repo..gitignore carries the
"Conversations / chat transcripts / strategy & discussion notes" block (prose
.md/.txt patterns). Our conversations/strategy/discussion never belong in a
product repo — that context lives in local memory. The block is a backstop; the
guarantee is discipline. (A machine-wide ~/.config/git/ignore net mirrors it.).github/workflows/secret-scan.yml (gitleaks,
pinned action, permissions: contents: read) + .gitleaks.toml come with the
template. Confirm they landed in the product's code repo..devcontainer/devcontainer.json +
Dockerfile (Node + Bun, non-root, workspace-only mount, no host secret/SSH
passthrough) ride in via the copy. Confirm they landed, and tell the user to
open the product in the container ("Reopen in Container" in VS Code, or
devcontainer up) so the agent and all build/install commands run isolated from
the host. Running on the bare host is at the operator's own risk..no-auto-push marker — create it at scaffold time so wip auto-commits stay
local until /ship: touch <code-repo>/.no-auto-push (in the sibling code repo). (It's gitignored
by design — operator-local discipline — so the template can't carry it across a
fresh clone; the scaffold step must add it.)SETUP.md / decision log:
Vercel Production Branch must be set to production (Project → Settings →
Git). Deploys happen only via /ship (promote reviewed commits to production).
main/working-branch pushes should be Preview, not Production.enable row level security + a policy in supabase/migrations/. The starter
migration is the place to set the habit; flag it in the final message./security-check <slug> any time to audit all of the
above, and that /ship runs it as a gate before every deploy.templates/product-starter-nextjs/ doesn't exist yet, scaffold the doc files only and tell the user to wait for the starter (Phase C of this build pass).<slug> without <one-liner>, ask for the one-liner once. Don't proceed without it.