$npx -y skills add sendaifun/solana-new --skill scaffold-projectSet up a complete Solana project workspace from a validated idea. Use when a user says "scaffold my project", "set up my workspace", "what stack should I use", "create the project structure", or "initialize my project". Reads idea-context.md from a prior idea phase if available.
| 1 | ## Preamble (run first) |
| 2 | |
| 3 | ```bash |
| 4 | _TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//' || echo "anonymous") |
| 5 | _TEL_TIER="${_TEL_TIER:-anonymous}" |
| 6 | _TEL_PROMPTED=$([ -f ~/.superstack/.telemetry-prompted ] && echo "yes" || echo "no") |
| 7 | _TEL_START=$(date +%s) |
| 8 | _SESSION_ID="$$-$(date +%s)" |
| 9 | mkdir -p ~/.superstack |
| 10 | echo "TELEMETRY: $_TEL_TIER" |
| 11 | echo "TEL_PROMPTED: $_TEL_PROMPTED" |
| 12 | if [ "$_TEL_TIER" != "off" ]; then |
| 13 | _TEL_EVENT='{"skill":"scaffold-project","phase":"build","event":"started","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' |
| 14 | echo "$_TEL_EVENT" >> ~/.superstack/telemetry.jsonl 2>/dev/null || true |
| 15 | _CONVEX_URL=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"convexUrl":"[^"]*"' | head -1 | cut -d'"' -f4 || echo "") |
| 16 | [ -n "$_CONVEX_URL" ] && curl -s -X POST "$_CONVEX_URL/api/mutation" -H "Content-Type: application/json" -d '{"path":"telemetry:track","args":{"skill":"scaffold-project","phase":"build","status":"success","version":"0.2.0","platform":"'$(uname -s)-$(uname -m)'","timestamp":'$(date +%s)000'}}' >/dev/null 2>&1 & |
| 17 | true |
| 18 | fi |
| 19 | ``` |
| 20 | |
| 21 | If `TEL_PROMPTED` is `no`: Before starting the skill workflow, ask the user about telemetry. |
| 22 | Use AskUserQuestion: |
| 23 | |
| 24 | > Help superstack get better! We track which skills get used and how long they take — |
| 25 | > no code, no file paths, no PII. Change anytime in `~/.superstack/config.json`. |
| 26 | |
| 27 | Options: |
| 28 | - A) Sure, help superstack improve (anonymous) |
| 29 | - B) No thanks |
| 30 | |
| 31 | If A: run this bash: |
| 32 | ```bash |
| 33 | echo '{"telemetryTier":"anonymous"}' > ~/.superstack/config.json |
| 34 | _TEL_TIER="anonymous" |
| 35 | touch ~/.superstack/.telemetry-prompted |
| 36 | ``` |
| 37 | |
| 38 | If B: run this bash: |
| 39 | ```bash |
| 40 | echo '{"telemetryTier":"off"}' > ~/.superstack/config.json |
| 41 | _TEL_TIER="off" |
| 42 | touch ~/.superstack/.telemetry-prompted |
| 43 | ``` |
| 44 | |
| 45 | This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely and proceed to the skill workflow. |
| 46 | |
| 47 | > **Wrong skill?** See [SKILL_ROUTER.md](../../SKILL_ROUTER.md) for all available skills. |
| 48 | |
| 49 | # Scaffold Project |
| 50 | |
| 51 | ## Overview |
| 52 | |
| 53 | Take a validated idea and turn it into a ready-to-code workspace with the right starter repo, skills, MCPs, and configuration installed. This is the bridge between planning and building. |
| 54 | |
| 55 | ## Workflow |
| 56 | |
| 57 | 1. Check for `.superstack/idea-context.md`. If found, extract the chosen idea's requirements. If not, interview the user briefly: what are you building, for whom, and what Solana primitives do you need? |
| 58 | 2. **Integrate vs Build decision**: Unless the user explicitly asked for a smart contract or program, check whether the idea can be built by integrating existing protocols (e.g., Jupiter for swaps, Kamino for lending, Orca for liquidity). If so, scaffold a frontend-only project (Next.js + Protocol SDKs, no Anchor). See `data/solana-knowledge/04-protocols-and-sdks.md` → "Integrate First, Build Second" and the Decision Quick Reference. |
| 59 | 3. **Protocol selection**: If integrating, identify which protocols to use. Verify each protocol's health (TVL, volume, SDK freshness, hack history) using DefiLlama before committing. See `04-protocols-and-sdks.md` → "Protocol Health Verification". |
| 60 | 4. Read [references/stack-decision-tree.md](references/stack-decision-tree.md) to match the idea to a technology stack. |
| 61 | 5. Read [references/catalog-recommendations.md](references/catalog-recommendations.md) to pick specific repos, skills, and MCPs from the solana-new catalogs. |
| 62 | 6. Read [references/architecture-patterns.md](references/architecture-patterns.md) for the recommended project structure. |
| 63 | 7. Present the scaffold plan to the user for confirmation. |
| 64 | 8. Execute the setup: |
| 65 | - Clone the recommended starter repo(s) |
| 66 | - Install skills via `npx skills add <url>` |
| 67 | - Configure MCPs in `.claude/settings.json` |
| 68 | - Generate `CLAUDE.md` with project context |
| 69 | 7. Write `.superstack/build-context.md` with stack decisions. |
| 70 | |
| 71 | ## Prior Context (Optional — never block on this) |
| 72 | |
| 73 | If `.superstack/idea-context.md` exists, use it to inform stack decisions. If it doesn't exist, **proceed immediately** — just ask the user what they're building. Do NOT redirect them to run another command first. Do NOT warn about missing context files. Just ask and build. |
| 74 | |
| 75 | ## Non-Negotiables |
| 76 | |
| 77 | - **Never block on missing context files.** Always proceed by asking the user directly. |
| 78 | - Always recommend a specific starter repo from the superstack catalog. Do not suggest building from scratch unless no relevant repo exists. |
| 79 | - Always include at least one skill and one MCP relevant to the idea. |
| 80 | - Present the full plan before executing. The user must confirm. |
| 81 | - Do not install tools the user cannot run (c |