init
Skill0 starsChanged 2 months agoMITView on GitHub
Scaffold a new Substrate project in an empty directory. Drops a Vite + Convex + Clerk + TanStack Router + Tailwind v4 kernel that follows DDD, railway-oriented programming, and the testing pyramid. Runs product-focused Socratic Q&A, copies doctrines and SDD protocol into docs/, and generates the twin Gemini AI Studio scaffolding prompt plus runtime AI system prompt. Invoke in a blank folder before /substrate:migrate.
137 other projects use a version of this.
Adopted by
Most recently taken up by
- naderelewa/Product-to-Prodtheir own version, first seen Nov 8, 2026
- ShahriarBijoy/show-me-howtheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- BSSE23047/nauraiz-devtheir own version, first seen Nov 8, 2026
- edwinidrus/dragonhoardtheir own version, first seen Nov 8, 2026
- NilsHellwig/acl-paper-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use daily-arxiv, exp-eval and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
skyllwtSkillexp-pilot-eval
Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.
Also in 4 projects that use this
skyllwtSkillexp-pilot-run
Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.
Also in 4 projects that use this
gaebalaiSkillcodex-system
PROACTIVELY consult Codex CLI, your highly capable supporter with exceptional reasoning and task completion abilities. Codex is a trusted expert you should ALWAYS consult BEFORE making decisions on: design choices, implementation approaches, debugging strategies, refactoring plans, or any non-trivial problem. When uncertain, consult Codex. Don't hesitate - Codex provides better analysis. Explicit triggers: "think deeper", "analyze", "second opinion", "consult codex".
Also in 3 projects that use this
- +6 more from Lambenthan
- +1 more from skyllwt
Other versions137 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 137
- microsoft/vscode★ 195ksame name
- mcollina/skills★ 2ksame name
- skyllwt/OmegaWiki★ 1.7ksame name
- DAIR-AutoResearch/AutoSci★ 1.7ksame name
- PKU-DAIR/AutoSci★ 1.7ksame name
- skyllwt/AutoSci★ 1.7ksame name
- TokenRollAI/cc-plugin★ 483same name
- pipecat-ai/gradient-bang★ 420same name
- AlexPEClub/ai-coding-starter-kit★ 382same name
- dannysmith/tauri-template★ 312same name
127 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-doctrineSkill
- adoptSkill
- architect-specSkill
- deploySkill
- diagnoseSkill
- executeSkill
- graph-specSkill
- migrateSkill
- orchestrateSkill
- quick-specSkill
- serve-beadSkill
- spoolSkill
- synthesize-sessionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 12 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 125 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Run ls -la and inspect. Ignore .git, CLAUDE.md, .DS_Store, README.md (these are fine to preserve).
- Very specific: line 48
If no path is found, ask the user where the substrate plugin repo lives on their machine (e.g.
- Distinctive: line 58
If the script exits non-zero (critical failure — missing node or pnpm, wrong version, etc.), STOP and surface the output to the user.
- Very specific: line 64
Ask the user these two (in one turn).
- Distinctive: line 84
Keep each turn tight. Don't dump all eight questions at once.
- Distinctive: line 101
If the script exits non-zero, STOP and report the error.
- Very specific: line 104
Test failure → surface the test output.
- Very specific: line 127
If the user said no AI features, add a note at the top of system-prompt.md:
- Very specific: line 135
Leave the {{...}} tokens in place (unfilled) for the no-AI case.
- Distinctive: line 139
Ask: "Want to push to GitHub now?
- Distinctive: line 141
If yes, ask for visibility (public or private, default private).
- Distinctive: line 187
MUST NOT proceed if the directory is not scaffold-ready (see §"When to REFUSE").
- Very specific: line 188
MUST invoke scaffold.sh via Bash rather than copying files individually.
- Distinctive: line 189
MUST NOT invent product details.
- Distinctive: line 190
MUST NOT commit or push to GitHub unless the user explicitly agrees in step 7.
- Distinctive: line 191
MUST NOT alter files outside the current project directory.
- Distinctive: line 192
MUST print the full handoff instructions (step 8) even if the scaffold succeeded silently — the user needs the Gemini AI Studio next-step.
- Distinctive: line 193
SHOULD keep Q&A tight — 1–2 questions per turn, conversational, probing when answers are vague.
- Distinctive: line 194
SHOULD skip jargon (no "Convex mutation", no "TanStack Router route") unless the user signals comfort with it.
- Very specific: line 195
MUST offer the default-escape suffix [type 'default' to let me decide sensible defaults] on every Socratic question.
- Very specific: line 196
MUST run scripts/prerequisites.sh at step 2b and halt on non-zero exit.
“Common” is measured: kept by at least 6 in 10 of the 125 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/substrate:init
Scaffold a new substrate project from an empty directory through the start of stage 1.
When to run
- The current directory is empty (or contains only
.git/,CLAUDE.md,.DS_Store,README.md). - The user wants to start a new full-stack product with substrate.
When to REFUSE
Detect stage by filesystem. If ANY of these exist, STOP and redirect the user instead of scaffolding over their work:
| Signal | Redirect |
package.json exists | Already scaffolded. Run /substrate:quick-spec or /substrate:architect-spec. |
prototype/ directory exists | Stage 2 — run /substrate:migrate. |
src/ directory with code exists | Stage 3 — run /substrate:deploy or /substrate:quick-spec. |
convex/ or domain/ exists | Project is already initialized. Pick a specific skill for the work you want to do. |
Workflow
Step 1. Confirm the directory is scaffold-ready
Run ls -la and inspect. Ignore .git, CLAUDE.md, .DS_Store, README.md (these are fine to preserve). If anything else is present, stop and ask the user whether to proceed anyway or move to a fresh directory.
Step 2. Locate the substrate plugin + check CLI prerequisites
2a. Locate the substrate plugin. scaffold.sh lives in the substrate plugin's scripts/ directory. Resolve SUBSTRATE_ROOT by searching known install paths:
for candidate in \
"$HOME/.claude/plugins/substrate" \
"$PWD/.claude/plugins/substrate" \
"${SUBSTRATE_ROOT:-}"; do
if [ -n "$candidate" ] && [ -f "$candidate/scripts/scaffold.sh" ]; then
echo "FOUND: $candidate"
break
fi
doneIf no path is found, ask the user where the substrate plugin repo lives on their machine (e.g. ~/code/substrate) and use that as SUBSTRATE_ROOT.
2b. Check CLI prerequisites. With SUBSTRATE_ROOT resolved, run the prerequisites script:
bash "$SUBSTRATE_ROOT/scripts/prerequisites.sh"The script checks for git, node (≥ 20), pnpm (≥ 10), npx, and gh (+ auth). macOS + Linux only.
If the script exits non-zero (critical failure — missing node or pnpm, wrong version, etc.), STOP and surface the output to the user. Do NOT proceed to scaffolding until they install the missing tools — scaffold.sh will fail in step 6 otherwise, wasting their time.
Warnings (yellow ⚠) are OK at this stage. gh + gh auth are warn-only because they're only needed at step 8 (GitHub push), which is optional.
Step 3. Socratic Q&A — project basics
Ask the user these two (in one turn). End every question with the default-escape suffix [type 'default' to let me decide sensible defaults]:
- Project slug (used for folder name,
package.jsonname, GitHub repo, Vercel slug). Kebab-case, e.g.gravy-app. Default: the current directory's basename, orsubstrate-appif that's unusable. - One-line description (for the README and Vercel project description). Default:
A substrate project.
Step 4. Socratic Q&A — product details
Focus on the product, not the technology. The user is non-technical — skip jargon. Walk through these, 1–2 per turn, probing when answers are vague. End every question with [type 'default' to let me decide sensible defaults]. If the user picks default, pick a bland-but-valid value that keeps the pipeline moving and summarize defaults chosen before scaffolding so they can course-correct:
- Product name — the user-facing name (may differ from the slug: e.g. "Gravy" vs
gravy-app). - One-line pitch — what does it do in plain language? (e.g. "A marketplace to discover, list, and review poutine stores across Canada.")
- Primary users (personas) — 1–3 roles. Who uses it and why?
- Primary user flows — 3–5 numbered flows end-to-end. ("1. Land on feed. 2. Browse map. 3. Submit review.")
- Core entities — 3–6 nouns with a few key fields each. ("User {id, handle}, PoutineStore {id, name, address, gallery}, Review {id, rating, body}.")
- Key pages — 4–8 top-level pages.
- Look & feel — 2–3 adjectives plus a reference if any. ("Warm, food-forward, brutalist cards, Canadian-neutral voice.")
- AI features — yes/no. If yes:
- List 2–5 AI capabilities (e.g. "moderate reviews, draft store descriptions, power semantic search").
- Note the desired tone for AI-generated output (e.g. "grounded, never overclaim, Grade 8 reading level").
Keep each turn tight. Don't dump all eight questions at once.
Step 5. Run scaffold.sh
With SUBSTRATE_ROOT resolved and project basics in hand, invoke the scaffold script:
SUBSTRATE_ROOT="<resolved path>" bash "$SUBSTRATE_ROOT/scripts/scaffold.sh" "<project-slug>" "<one-line-description>"This performs:
- Template tree copy into the current directory
docs/doctrine/populated from substrate'sreferences/doctrines/docs/protocol/sdd/populated from substrate'sreferences/sdd-protocol/{{PROJECT_NAME}}/{{PROJECT_DESCRIPTION}}substituted inpackage.json,README.md,index.htmlpnpm install+pnpm app:compile+pnpm app:test
If the script exits non-zero, STOP and report the error. Do not proceed to step 6. Common failure modes:
pnpmnot installed → tell the user to install pnpm first.- Network timeout during
pnpm install→ retry is safe. - Test failure → surface the test output; this is a bug in the substrate templates, not user error.
Step 6. Fill the product prompt templates
The scaffold leaves two files with {{...}} tokens for product-specific content. Fill them using the Q&A answers via the Edit tool:
docs/product/ai-studio-prompt.md (the Gemini Build prompt):
{{PRODUCT_NAME}}— user-facing name{{ONE_LINE_DESCRIPTION}}— the pitch{{PERSONA_DESCRIPTION}}— 1–2 sentences per persona{{USER_FLOWS}}— numbered list (markdown){{ENTITIES_AND_FIELDS}}— entity list with key fields{{KEY_PAGES}}— bulleted list{{UI_STYLE_NOTES}}— short paragraph
docs/product/system-prompt.md (runtime AI persona):
{{PRODUCT_NAME}},{{ONE_LINE_DESCRIPTION}}— same values as above{{AI_CAPABILITIES}}— short one-line summary{{PERSONA_BULLET_LIST}}— bulleted, indent two spaces (nested inside<primary_users>XML){{ENTITY_BULLET_LIST}}— bulleted, same indent{{CAPABILITIES_LIST}}— bulleted{{TONE_NOTES}}— bulleted
If the user said no AI features, add a note at the top of system-prompt.md:
> This file is a placeholder. The project does not currently include AI
> assistant features. Delete this file or fill in the tokens if you add
> AI features later.Leave the {{...}} tokens in place (unfilled) for the no-AI case.
Step 7. Offer GitHub push
Ask: "Want to push to GitHub now? (y/n, default y)"
If yes, ask for visibility (public or private, default private). Run:
bash "$SUBSTRATE_ROOT/scripts/init-github.sh" "<project-slug>" "<visibility>"Report the returned repo URL. If no, skip — the user can run the script themselves later.
Step 8. Print handoff instructions
End with a message the user can act on immediately. Format it exactly like this:
✔ Substrate project initialized.
Kernel: green (domain/ + test/ + docs/doctrine/ + docs/protocol/sdd/)
Repo: <GitHub URL if pushed, else "not pushed yet">
Your AI Studio scaffolding prompt is at:
docs/product/ai-studio-prompt.md
Next steps:
1. Open https://aistudio.google.com/ and click the "Build" tab.
2. Copy the contents of docs/product/ai-studio-prompt.md (everything below the --- line).
3. Paste into the Build description box.
4. Iterate in the AI Studio UI until the look is right.
5. Download the project as a ZIP.
6. Unzip it. You'll get a folder named after your product (e.g. `<project-slug>/`).
Drag that folder INTO `/prototype/` (which already exists in this repo).
Final layout should look like:
/prototype/<project-slug>/package.json
/prototype/<project-slug>/src/
/prototype/<project-slug>/vite.config.ts
...
7. Return here and run /substrate:migrate.
Doctrine note: the three baseline doctrines are discovered by glob (no manifest yet).
When the doctrine tree grows, /substrate:add-doctrine can bootstrap the manifest —
in adopted repos it also generates ambient doctrine skills (.claude/skills/doctrine-*/)
so every session self-loads relevant doctrine.Then show the contents of docs/product/ai-studio-prompt.md in-line so the user can copy without opening a second file.
Constraints
- MUST NOT proceed if the directory is not scaffold-ready (see §"When to REFUSE").
- MUST invoke
scaffold.shvia Bash rather than copying files individually. Copying via many Write calls wastes tool budget and risks drift from the canonical template tree. - MUST NOT invent product details. If the user skips a question, either ask it again once, or write a placeholder and flag it in the final summary so they know to revisit.
- MUST NOT commit or push to GitHub unless the user explicitly agrees in step 7.
- MUST NOT alter files outside the current project directory.
- MUST print the full handoff instructions (step 8) even if the scaffold succeeded silently — the user needs the Gemini AI Studio next-step.
- SHOULD keep Q&A tight — 1–2 questions per turn, conversational, probing when answers are vague.
- SHOULD skip jargon (no "Convex mutation", no "TanStack Router route") unless the user signals comfort with it.
- MUST offer the default-escape suffix
[type 'default' to let me decide sensible defaults]on every Socratic question. When the user picksdefault, choose a reasonable value and summarize the defaults chosen before scaffolding so the user can course-correct. - MUST run
scripts/prerequisites.shat step 2b and halt on non-zero exit. Critical tools missing =scaffold.shwill fail later; fail fast and point the user at the fix instead. Warnings are informational only and must not halt.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

