$npx -y skills add TanStack/cli --skill add-addons-existing-appApply integrations to existing projects with tanstack add, including add-on id resolution, dependency chains, option prompts, and .cta.json project metadata preconditions.
| 1 | # Add Add-ons To Existing App |
| 2 | |
| 3 | Use this skill when the project already exists and you need to layer add-ons safely without breaking dependency or metadata assumptions. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ```bash |
| 8 | npx @tanstack/cli add clerk drizzle |
| 9 | ``` |
| 10 | |
| 11 | ## Core Patterns |
| 12 | |
| 13 | ### Add multiple integrations in one pass |
| 14 | |
| 15 | ```bash |
| 16 | npx @tanstack/cli add tanstack-query drizzle |
| 17 | ``` |
| 18 | |
| 19 | ### Resolve candidate ids before applying |
| 20 | |
| 21 | ```bash |
| 22 | npx @tanstack/cli create --list-add-ons --json |
| 23 | ``` |
| 24 | |
| 25 | ### Validate optionized add-ons before install |
| 26 | |
| 27 | ```bash |
| 28 | npx @tanstack/cli create --addon-details prisma --json |
| 29 | ``` |
| 30 | |
| 31 | ## Common Mistakes |
| 32 | |
| 33 | ### CRITICAL Run tanstack add without .cta.json |
| 34 | |
| 35 | Wrong: |
| 36 | ```bash |
| 37 | npx @tanstack/cli add clerk |
| 38 | ``` |
| 39 | |
| 40 | Correct: |
| 41 | ```bash |
| 42 | # Run in a project scaffolded by TanStack CLI (contains .cta.json), then: |
| 43 | npx @tanstack/cli add clerk |
| 44 | ``` |
| 45 | |
| 46 | Add flows depend on persisted scaffold metadata, so commands can fail or apply incomplete config when `.cta.json` is missing. |
| 47 | |
| 48 | Source: packages/create/src/custom-add-ons/shared.ts:158 |
| 49 | |
| 50 | ### HIGH Use invalid add-on id |
| 51 | |
| 52 | Wrong: |
| 53 | ```bash |
| 54 | npx @tanstack/cli add drizle |
| 55 | ``` |
| 56 | |
| 57 | Correct: |
| 58 | ```bash |
| 59 | npx @tanstack/cli add drizzle |
| 60 | ``` |
| 61 | |
| 62 | Unknown ids stop resolution and force manual correction before any add-on work proceeds. |
| 63 | |
| 64 | Source: packages/create/src/add-ons.ts:44 |
| 65 | |
| 66 | ### HIGH Ignore add-on dependency requirements |
| 67 | |
| 68 | Wrong: |
| 69 | ```bash |
| 70 | npx @tanstack/cli add custom-addon-with-missing-deps |
| 71 | ``` |
| 72 | |
| 73 | Correct: |
| 74 | ```bash |
| 75 | npx @tanstack/cli add required-dependency custom-addon-with-missing-deps |
| 76 | ``` |
| 77 | |
| 78 | Add-ons with `dependsOn` can fail during finalization if required dependencies are not present. |
| 79 | |
| 80 | Source: packages/create/src/add-ons.ts:48 |
| 81 | |
| 82 | ### MEDIUM Assume old Windows path bug still present |
| 83 | |
| 84 | Wrong: |
| 85 | ```bash |
| 86 | # Avoid tanstack add on Windows and patch manually |
| 87 | ``` |
| 88 | |
| 89 | Correct: |
| 90 | ```bash |
| 91 | npx @tanstack/cli add clerk |
| 92 | ``` |
| 93 | |
| 94 | Avoiding supported workflows based on historical bug reports causes unnecessary manual drift. Fixed in newer versions, but agents trained on older threads may still avoid this path. |
| 95 | |
| 96 | Source: https://github.com/TanStack/cli/issues/329 |
| 97 | |
| 98 | ### HIGH Tension: Backwards support vs deterministic automation |
| 99 | |
| 100 | This domain's patterns conflict with maintain-custom-addons-dev-watch. Automation that assumes universal add flows tends to fail because legacy compatibility still relies on hidden scaffold metadata. |
| 101 | |
| 102 | See also: maintain-custom-addons-dev-watch/SKILL.md § Common Mistakes |