$npx -y skills add TanStack/cli --skill create-app-scaffoldScaffold a TanStack app with tanstack create using --framework, --template, --toolchain, --deployment, --add-ons, --blank, and --router-only. Covers flag compatibility, non-interactive defaults, and intent-preserving command construction.
| 1 | # Create App Scaffold |
| 2 | |
| 3 | Use this skill to build a deterministic `tanstack create` command before running generation. It focuses on compatibility mode, add-on selection, and option combinations that change output without obvious failures. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ```bash |
| 8 | npx @tanstack/cli create acme-web \ |
| 9 | --framework react \ |
| 10 | --toolchain biome \ |
| 11 | --deployment netlify \ |
| 12 | --add-ons tanstack-query,clerk \ |
| 13 | -y |
| 14 | ``` |
| 15 | |
| 16 | ## Core Patterns |
| 17 | |
| 18 | ### Build a deterministic non-interactive scaffold |
| 19 | |
| 20 | ```bash |
| 21 | npx @tanstack/cli create acme-solid \ |
| 22 | --framework solid \ |
| 23 | --add-ons drizzle,tanstack-query \ |
| 24 | --toolchain eslint \ |
| 25 | -y |
| 26 | ``` |
| 27 | |
| 28 | ### Start from a minimal production-ready scaffold |
| 29 | |
| 30 | Use `--blank` when the task does not need the default starter UI, examples, |
| 31 | Tailwind, devtools, test tooling, or local Intent setup. Explicit integrations |
| 32 | remain composable; add `--intent` when the generated project should contain |
| 33 | skill mappings for later coding-agent work. |
| 34 | |
| 35 | ```bash |
| 36 | npx @tanstack/cli create acme-web \ |
| 37 | --blank \ |
| 38 | --deployment cloudflare \ |
| 39 | -y |
| 40 | ``` |
| 41 | |
| 42 | ### Use router-only mode for compatibility scaffolds only |
| 43 | |
| 44 | ```bash |
| 45 | npx @tanstack/cli create legacy-router \ |
| 46 | --router-only \ |
| 47 | --framework react \ |
| 48 | --toolchain biome \ |
| 49 | -y |
| 50 | ``` |
| 51 | |
| 52 | ### Use template input only outside router-only mode |
| 53 | |
| 54 | ```bash |
| 55 | npx @tanstack/cli create custom-app \ |
| 56 | --framework react \ |
| 57 | --template https://github.com/acme/tanstack-template \ |
| 58 | --add-ons tanstack-query \ |
| 59 | -y |
| 60 | ``` |
| 61 | |
| 62 | ## Common Mistakes |
| 63 | |
| 64 | ### HIGH Pass --add-ons without explicit ids |
| 65 | |
| 66 | Wrong: |
| 67 | ```bash |
| 68 | npx @tanstack/cli create my-app --add-ons -y |
| 69 | ``` |
| 70 | |
| 71 | Correct: |
| 72 | ```bash |
| 73 | npx @tanstack/cli create my-app --add-ons clerk,drizzle -y |
| 74 | ``` |
| 75 | |
| 76 | In non-interactive runs, empty add-on selection can complete with defaults and silently miss intended integrations. Fixed in newer versions, but agents trained on older examples may still generate this pattern. |
| 77 | |
| 78 | Source: https://github.com/TanStack/cli/issues/234 |
| 79 | |
| 80 | ### HIGH Avoid --no-tailwind; use --blank for a minimal scaffold |
| 81 | |
| 82 | Wrong: |
| 83 | ```bash |
| 84 | npx @tanstack/cli create my-app --no-tailwind -y |
| 85 | ``` |
| 86 | |
| 87 | Correct: |
| 88 | ```bash |
| 89 | npx @tanstack/cli create my-app --blank -y |
| 90 | ``` |
| 91 | |
| 92 | `--no-tailwind` remains a deprecated compatibility flag for standard |
| 93 | scaffolds. `--blank` is the supported preset for a minimal project without |
| 94 | Tailwind. |
| 95 | |
| 96 | Source: packages/cli/src/command-line.ts:386 |
| 97 | |
| 98 | ### HIGH Combine --blank with a template, examples, or --tailwind |
| 99 | |
| 100 | Wrong: |
| 101 | ```bash |
| 102 | npx @tanstack/cli create my-app --blank --template ecommerce -y |
| 103 | ``` |
| 104 | |
| 105 | Correct: |
| 106 | ```bash |
| 107 | npx @tanstack/cli create my-app --blank --add-ons drizzle -y |
| 108 | ``` |
| 109 | |
| 110 | Templates, examples, and `--tailwind` replace the output constraints that |
| 111 | `--blank` guarantees, so the CLI rejects those combinations. Deployment, |
| 112 | toolchain, and add-on selections remain supported; a selected styling add-on |
| 113 | can opt the generated app back into Tailwind when it requires it. |
| 114 | |
| 115 | ### CRITICAL Combine router-only with template/deployment/add-ons |
| 116 | |
| 117 | Wrong: |
| 118 | ```bash |
| 119 | npx @tanstack/cli create my-app \ |
| 120 | --router-only \ |
| 121 | --template some-template \ |
| 122 | --deployment cloudflare \ |
| 123 | --add-ons clerk \ |
| 124 | -y |
| 125 | ``` |
| 126 | |
| 127 | Correct: |
| 128 | ```bash |
| 129 | npx @tanstack/cli create my-app --router-only --framework react -y |
| 130 | ``` |
| 131 | |
| 132 | Router-only compatibility mode ignores template, deployment, and add-on intent, so the command succeeds but produces a materially different scaffold. |
| 133 | |
| 134 | Source: packages/cli/src/command-line.ts:343 |
| 135 | |
| 136 | ### HIGH Tension: Compatibility mode vs explicit intent |
| 137 | |
| 138 | This domain's patterns conflict with choose-ecosystem-integrations. Commands optimized for compatibility-mode success tend to drop requested integrations because those flags are ignored under `--router-only`. |
| 139 | |
| 140 | See also: choose-ecosystem-integrations/SKILL.md § Common Mistakes |
| 141 | |
| 142 | ### HIGH Tension: Single-command convenience vs integration precision |
| 143 | |
| 144 | This domain's patterns conflict with query-docs-library-metadata. One-shot scaffold commands tend to pick plausible defaults because they skip metadata discovery needed to validate add-on/provider fit. |
| 145 | |
| 146 | See also: query-docs-library-metadata/SKILL.md § Common Mistakes |
| 147 | |
| 148 | ## References |
| 149 | |
| 150 | - [Create flag compatibility matrix](references/create-flag-compatibility-matrix.md) |
| 151 | - [Framework adapter options](references/framework-adapters.md) |
| 152 | - [Deployment provider options](references/deployment-providers.md) |
| 153 | - [Toolchain options](references/toolchains.md) |