{"slug":"solo-scaffold","title":"solo-scaffold","summary":"Use when \"scaffold project\", \"create new project\", \"start new app\", \"bootstrap project\", \"set up from PRD\", or need project from PRD + stack template. Do NOT use for planning features (/plan) or PRD generation (/validate).","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-07T19:02:21.2718Z","repo":{"url":"https://github.com/fortunto2/solo-factory","stars":18,"forks":3,"license":"MIT","updatedAt":"2026-09-14T16:23:17Z"},"bodyHtml":"<hr>\n<h2>name: solo-scaffold\ndescription: Use when \"scaffold project\", \"create new project\", \"start new app\", \"bootstrap project\", \"set up from PRD\", or need project from PRD + stack template. Do NOT use for planning features (/plan) or PRD generation (/validate).\nlicense: MIT\nmetadata:\nauthor: fortunto2\nversion: \"1.5.1\"\nopenclaw:\nemoji: \"\uD83C\uDFD7️\"\nallowed-tools: Read, Grep, Bash, Glob, Write, Edit, AskUserQuestion, mcp__context7__resolve-library-id, mcp__context7__query-docs, mcp__solograph__kb_search, mcp__solograph__project_info, mcp__solograph__project_code_search, mcp__solograph__codegraph_query, mcp__solograph__codegraph_explain, mcp__solograph__project_code_reindex\nargument-hint: \"[project-name] [stack-name]\"</h2>\n<h1>/scaffold</h1>\n<p>Scaffold a complete project from PRD + stack template. Creates directory structure, configs, CLAUDE.md, git repo, and pushes to GitHub. Studies existing projects via SoloGraph for consistent patterns, uses Context7 for latest library versions.</p>\n<h2>Steps</h2>\n<ol>\n<li><p><strong>Parse arguments</strong> from <code>$ARGUMENTS</code> — extract <code>&lt;project-name&gt;</code> and <code>&lt;stack-name&gt;</code>.</p>\n<ul>\n<li>If not provided or incomplete, use AskUserQuestion to ask for missing values.</li>\n<li>Show available stacks from <code>templates/stacks/*.yaml</code> (source of truth).\nIf MCP <code>project_info</code> available, also show detected stacks from active projects.\nList stack names with one-line descriptions from each YAML's <code>description</code> field.</li>\n<li>Project name should be kebab-case.</li>\n</ul>\n</li>\n<li><p><strong>Load org defaults</strong> from <code>~/.solo-factory/defaults.yaml</code>:</p>\n<ul>\n<li>Read <code>org_domain</code> (e.g. <code>com.mycompany</code>), <code>apple_dev_team</code>, <code>github_org</code>, <code>projects_dir</code></li>\n<li>If file doesn't exist, ask via AskUserQuestion:\n<ul>\n<li>\"What is your reverse-domain prefix for bundle IDs?\" (e.g. <code>com.mycompany</code>)</li>\n<li>\"Apple Developer Team ID?\" (optional, leave empty if no iOS)</li>\n</ul>\n</li>\n<li>Create <code>~/.solo-factory/defaults.yaml</code> with answers for future runs</li>\n<li>Replace <code>&lt;org_domain&gt;</code>, <code>&lt;apple_dev_team&gt;</code>, <code>&lt;github_org&gt;</code> placeholders in all generated files</li>\n</ul>\n</li>\n<li><p><strong>Load stack + PRD + principles:</strong></p>\n<ul>\n<li>Look for stack YAML: search for <code>stacks/&lt;stack&gt;.yaml</code> in plugin templates (via <code>kb_search</code> or Glob).</li>\n<li>If stack YAML not found, use built-in knowledge of the stack (packages, structure, deploy).</li>\n<li>Check if PRD exists: <code>docs/prd.md</code> or search current directory for <code>prd.md</code>\n<ul>\n<li>If not: generate a basic PRD template</li>\n</ul>\n</li>\n<li>Look for dev principles: search for <code>dev-principles.md</code> and <code>dev-principles-my.md</code> (personal extensions) or use built-in SOLID/DRY/KISS/TDD principles.</li>\n</ul>\n</li>\n<li><p><strong>Study existing projects via SoloGraph</strong> (learn from your own codebase — critically):</p>\n<p>Before generating code, study active projects with the same stack. <strong>Don't blindly copy</strong> — existing projects may have legacy patterns or mistakes. Evaluate what's actually useful.</p>\n<ol type=\"a\">\n<li><p><strong>Find sibling projects</strong> — use <code>project_info()</code> to list active projects, filter by matching stack.\nExample: for <code>ios-swift</code>, find existing projects with matching stack.</p>\n</li>\n<li><p><strong>Architecture overview</strong> — <code>codegraph_explain(project=\"&lt;sibling&gt;\")</code> for each sibling.\nGives: directory layers, key patterns (base classes, protocols, CRUD), top dependencies, hub files.</p>\n</li>\n<li><p><strong>Search for reusable patterns</strong> — <code>project_code_search(query=\"&lt;pattern&gt;\", project=\"&lt;sibling&gt;\")</code>:</p>\n<ul>\n<li>Search for stack-specific patterns: \"MVVM ViewModel\", \"SwiftData model\", \"AVFoundation recording\"</li>\n<li>Search for shared infrastructure: \"Makefile\", \"project.yml\", \".swiftlint.yml\"</li>\n<li>Search for services: \"Service protocol\", \"actor service\"</li>\n</ul>\n</li>\n<li><p><strong>Check shared packages</strong> — <code>codegraph_query(\"MATCH (p:Project)-[:DEPENDS_ON]-&gt;(pkg:Package) WHERE p.name = '&lt;sibling&gt;' RETURN pkg.name\")</code>.\nCollect package versions for reference (but verify with Context7 for latest).</p>\n</li>\n<li><p><strong>Critically evaluate</strong> what to adopt vs skip:</p>\n<ul>\n<li><strong>Adopt:</strong> consistent directory structure, Makefile targets, config patterns (.swiftlint.yml, project.yml)</li>\n<li><strong>Adopt:</strong> proven infrastructure patterns (actor services, protocol-based DIP)</li>\n<li><strong>Skip if outdated:</strong> old API patterns (ObservableObject → @Observable), deprecated deps</li>\n<li><strong>Skip if overcomplicated:</strong> unnecessary abstractions, patterns that don't fit the new project's needs</li>\n<li><strong>Always prefer:</strong> Context7 latest best practices over old project patterns when they conflict</li>\n</ul>\n</li>\n</ol>\n<p><strong>Goal:</strong> Generated code should feel consistent with your portfolio but use the <strong>best available</strong> patterns, not just the same old ones.\nLimit to 2-3 sibling projects to keep research focused.</p>\n</li>\n<li><p><strong>Context7 research</strong> (latest library versions and best practices):</p>\n<ul>\n<li>For each key package from the stack:\n<ul>\n<li><code>mcp__context7__resolve-library-id</code> — find the Context7 library ID</li>\n<li><code>mcp__context7__query-docs</code> — query \"latest version, project setup, recommended file structure, best practices\"</li>\n</ul>\n</li>\n<li>Collect: current versions, recommended directory structure, configuration patterns, setup commands</li>\n<li>Limit to the 3-4 most important packages to keep research focused</li>\n</ul>\n</li>\n<li><p><strong>Show plan + get confirmation</strong> via AskUserQuestion:</p>\n<ul>\n<li>Project path: <code>&lt;projects_dir&gt;/&lt;name&gt;</code> (from <code>defaults.yaml</code> or current directory)</li>\n<li>Stack name and key packages with versions from Context7</li>\n<li>Proposed directory structure</li>\n<li>Confirm or adjust before creating files</li>\n</ul>\n</li>\n<li><p><strong>Create project directory:</strong></p>\n<pre><code>mkdir -p &lt;projects_dir&gt;/&lt;name&gt;\n</code></pre>\n</li>\n<li><p><strong>Create file structure</strong> based on the stack. <strong>SGR-first: always start with domain schemas/models before any logic or views.</strong> Every project gets these common files:</p>\n<pre><code>&lt;projects_dir&gt;/&lt;name&gt;/\n├── CLAUDE.md          # AI-friendly project docs (map, not manual — see Harness Engineering)\n├── Makefile           # Common commands (run, test, build, lint, deploy, integration)\n├── README.md          # Human-friendly project docs\n├── docs/\n│   ├── prd.md         # Copy of PRD\n│   ├── QUALITY_SCORE.md  # Domain quality grades (harness: garbage collection)\n│   └── ARCHITECTURE.md   # Module boundaries and dependency rules\n├── cli/               # CLI utility — mirrors core business logic (CLI-First Testing principle)\n│   └── main.ts|py     # Deterministic pipeline entry point (no LLM required)\n├── .claude/\n│   └── skills/        # Product-specific workflow skills\n│       └── dev/\n│           └── SKILL.md  # Dev workflow skill (run, test, deploy)\n└── .gitignore         # Stack-specific ignores\n</code></pre>\n<p><strong>CLI-First Testing:</strong> generate a <code>cli/</code> directory with a stub that imports core business logic from <code>lib/</code> (or equivalent). The CLI should run the main pipeline deterministically without requiring LLM, network, or UI. This enables <code>make integration</code> for pipeline verification. See <code>dev-principles.md</code> → \"CLI-First Testing\".</p>\n<h3><code>.claude/skills/dev/SKILL.md</code> — product dev workflow skill</h3>\n<p>Generate a skill that teaches Claude how to work with THIS specific project. Structure:</p>\n<pre><code>---\nname: &lt;name&gt;-dev\ndescription: Dev workflow for &lt;Name&gt; — run, test, build, deploy. Use when working on &lt;Name&gt; features, fixing bugs, or deploying changes. Do NOT use for other projects.\nlicense: MIT\nmetadata:\n  author: &lt;github_org&gt;\n  version: \"1.0.0\"\nallowed-tools: Read, Grep, Glob, Bash, Write, Edit\n---\n</code></pre>\n<p>Body should include:</p>\n<ul>\n<li><strong>Stack:</strong> key packages, versions, where configs live</li>\n<li><strong>Commands:</strong> <code>make dev</code>, <code>make test</code>, <code>make build</code>, <code>make deploy</code> (from Makefile)</li>\n<li><strong>Architecture:</strong> directory structure, naming conventions, key patterns</li>\n<li><strong>Testing:</strong> how to run tests, where test files live, testing conventions</li>\n<li><strong>Common tasks:</strong> add a new page/screen, add an API endpoint, add a model</li>\n</ul>\n<p>This makes every scaffolded project immediately Claude-friendly — new sessions get project context via the skill.</p>\n<p><strong>MCP server</strong> (optional): If PRD indicates a data/AI/developer product, also generate MCP server stub.\nSee <code>templates/mcp-skills-bundle.md</code> for the full \"MCP + Skills bundle\" pattern and rules for when to generate MCP.</p>\n<p>Then add stack-specific files. See <code>references/stack-structures.md</code> for per-stack file listings (8 stacks: nextjs, ios, kotlin, cloudflare, astro-static, astro-hybrid, python-api, python-ml).</p>\n</li>\n<li><p><strong>Generate Makefile</strong> — stack-adapted with: <code>help</code>, <code>dev</code>, <code>test</code>, <code>lint</code>, <code>format</code>, <code>build</code>, <code>clean</code>, <code>deploy</code> targets.</p>\n<ul>\n<li>Add <code>integration</code> target if the project has a CLI or deterministic pipeline (stub with a comment if not yet implemented)</li>\n<li><strong>ios-swift</strong> must also include: <code>generate</code> (xcodegen), <code>archive</code> (xcodebuild archive), <code>open</code> (open .xcarchive for Distribute)</li>\n<li>The Makefile is the <strong>canonical command interface</strong> — <code>/build</code> and <code>/review</code> use <code>make</code> targets instead of raw commands</li>\n</ul>\n</li>\n<li><p><strong>Generate CLAUDE.md</strong> for the new project (~100 lines, map not manual):</p>\n</li>\n</ol>\n<ul>\n<li>Project overview (problem/solution from PRD)</li>\n<li>Tech stack (packages + versions from Context7)</li>\n<li><strong>Agent behavior defaults</strong> (Karpathy principles):\n<ul>\n<li>Think before coding: state assumptions, ask when confused</li>\n<li>Simplicity first: minimum code, no speculative abstractions</li>\n<li>Surgical changes: touch only what's needed, match existing style</li>\n<li>Goal-driven: transform instructions into verifiable success criteria</li>\n</ul>\n</li>\n<li><strong>Skills section:</strong> list available <code>.claude/skills/</code> with descriptions</li>\n<li>Directory structure</li>\n<li>Common commands (reference <code>make help</code>)</li>\n<li><strong>Quality Gate</strong> (before completing any task):\n<ol>\n<li>\"Am I building bullshit?\" — re-read the request</li>\n<li>\"Is this code garbage?\" — would a senior accept this?</li>\n<li>\"How to make this amazing?\" — what insight is everyone missing?</li>\n</ol>\n</li>\n<li>Architecture principles (ref dev-principles, don't inline)</li>\n<li><strong>Don't section</strong> (project-specific negative constraints)</li>\n<li><strong>Drift section</strong> (anti-patterns: scheduling vs doing, bullets vs code)</li>\n<li><strong>MCP Integration section</strong> (optional, if MCP tools available):\nLists available MCP tools: <code>project_code_search</code>, <code>kb_search</code>, <code>session_search</code>, <code>codegraph_query</code>, <code>project_info</code>, <code>web_search</code></li>\n</ul>\n<ol start=\"11\">\n<li><p><strong>Generate README.md</strong> — project name, description, prerequisites, setup, run/test/deploy.</p>\n</li>\n<li><p><strong>Generate .gitignore</strong> — stack-specific patterns.</p>\n</li>\n<li><p><strong>Copy PRD to docs/:</strong> Copy from knowledge base or generate in place.</p>\n</li>\n<li><p><strong>Git init + first commit:</strong></p>\n<pre><code>cd &lt;projects_dir&gt;/&lt;name&gt;\ngit init &amp;&amp; git add . &amp;&amp; git commit -m \"Initial project scaffold\n\nStack: &lt;stack-name&gt;\nGenerated by /scaffold\"\n</code></pre>\n</li>\n<li><p><strong>Create GitHub private repo + push:</strong></p>\n<pre><code>cd &lt;projects_dir&gt;/&lt;name&gt;\ngh repo create &lt;name&gt; --private --source=. --push\n</code></pre>\n</li>\n<li><p><strong>Register project + index code</strong> (optional, if MCP tools available):</p>\n<ul>\n<li>If <code>project_code_reindex</code> MCP tool is available, index the new project for code search:\n<pre><code>mcp__solograph__project_code_reindex(project=\"&lt;name&gt;\")\n</code></pre>\n</li>\n</ul>\n</li>\n<li><p><strong>Output summary:</strong></p>\n<pre><code>Project scaffolded!\n\n  Path:   &lt;projects_dir&gt;/&lt;name&gt;\n  GitHub: https://github.com/&lt;user&gt;/&lt;name&gt;\n  Stack:  &lt;stack-name&gt;\n  PRD:    docs/prd.md\n  CLAUDE: configured\n  Skills: .claude/skills/dev/ (project workflow)\n\nNext steps:\n  cd &lt;projects_dir&gt;/&lt;name&gt;\n  &lt;install command&gt;    # pnpm install / uv sync / etc.\n  &lt;run command&gt;        # pnpm dev / uv run ... / etc.\n\nThen: /setup → /plan \"First feature\" → /build\n</code></pre>\n</li>\n</ol>\n<h2>Verification</h2>\n<p>Before reporting \"project scaffolded\":</p>\n<ol>\n<li><strong>Verify</strong> all generated files exist (ls the directory tree).</li>\n<li><strong>Run</strong> the install command (<code>pnpm install</code>, <code>uv sync</code>, etc.) — must succeed.</li>\n<li><strong>Run</strong> the dev/build command if applicable — must not error.</li>\n<li><strong>Verify</strong> git init + first commit succeeded (<code>git log --oneline -1</code>).</li>\n<li><strong>Verify</strong> GitHub repo creation (<code>gh repo view</code> or check URL).</li>\n</ol>\n<p>Never say \"scaffold complete\" without running the install and verifying it works.</p>\n<h2>Common Issues</h2>\n<h3>Stack YAML not found</h3>\n<p><strong>Cause:</strong> Stack template missing from <code>templates/stacks/</code> or not symlinked.\n<strong>Fix:</strong> Skill uses built-in knowledge if template not found. To fix: ensure <code>solo-factory/templates/stacks/&lt;stack&gt;.yaml</code> exists.</p>\n<h3>GitHub repo creation fails</h3>\n<p><strong>Cause:</strong> <code>gh</code> CLI not authenticated or repo name already taken.\n<strong>Fix:</strong> Run <code>gh auth login</code> first. If name taken, choose a different project name.</p>\n<h3>Context7 queries fail</h3>\n<p><strong>Cause:</strong> MCP server not running or Context7 rate limited.\n<strong>Fix:</strong> Skill proceeds with stack YAML versions as fallback. Context7 enhances but is not required.</p>\n<h3>org defaults missing</h3>\n<p><strong>Cause:</strong> <code>~/.solo-factory/defaults.yaml</code> not created.\n<strong>Fix:</strong> Run <code>/init</code> first for one-time setup, or skill will ask for bundle ID and team ID interactively.</p>\n","files":[{"path":"references/stack-structures.md","sizeBytes":4552,"isText":true},{"path":"SKILL.md","sizeBytes":12844,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":1,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-07T19:03:14.651217Z","sha256":"26323405A4A47CA1C15F194E6D3ECBD0DC9AC5BE3AAD916CFE0E4A2FCD2B1509","sizeBytes":7646},"review":null,"source":{"repositoryUrl":"https://github.com/fortunto2/solo-factory","path":"skills/scaffold","license":"MIT","commit":"a26964729df4c21e4ffb011799b9302987dfd9b2","subtreeSha":"C4926BBBDB5F7AFD8ADEF80347BD7FD53F049E1C5BC2C15B6FF2929BF58C2BA8","lastSyncedAt":"2026-09-25T07:36:50.677664Z"},"reviewedAt":"2026-09-07T19:04:43.054844Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/fortunto2/solo-factory/tree/main/skills/scaffold"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fortunto2-solo-factory@llmmart"},{"target":"git","command":"git clone https://github.com/fortunto2/solo-factory.git"}]}