tanstack-cli
Project scaffolding CLI with 30+ integrations, custom templates, and MCP server for AI agents.
What this skill does
## Overview
TanStack CLI is an interactive scaffolding tool for creating TanStack Start applications. It provides guided project creation with 30+ pre-built integrations covering authentication, databases, deployment, and developer tools. It also includes an MCP (Model Context Protocol) server for AI agent assistance and supports custom templates for team-standardized setups.
**Package:** `@tanstack/cli`
**Status:** Stable
## Installation & Usage
```bash
# Create a new project (interactive)
npx @tanstack/cli create my-app
# Create with specific integrations
npx @tanstack/cli create my-app --integrations tanstack-query,clerk,drizzle
# Global install
npm install -g @tanstack/cli
tanstack create my-app
```
## Project Creation
### Interactive Mode
```bash
npx @tanstack/cli create my-app
# Prompts for:
# - Project name
# - Integration selection
# - Configuration options
```
### With Integrations Flag
```bash
# Multiple integrations
npx @tanstack/cli create my-app --integrations tanstack-query,tanstack-form,drizzle,neon,clerk
# Deployment target
npx @tanstack/cli create my-app --integrations vercel
# Full stack setup
npx @tanstack/cli create my-app --integrations tanstack-query,tanstack-form,tanstack-table,clerk,drizzle,neon,vercel,sentry
```
## Available Integrations
### TanStack Libraries
| Integration | Description |
|-------------|-------------|
| `tanstack-query` | Async state management |
| `tanstack-form` | Type-safe form management |
| `tanstack-table` | Headless table/datagrid |
| `tanstack-store` | Reactive data store |
| `tanstack-virtual` | List virtualization |
| `tanstack-ai` | AI SDK integration |
| `tanstack-db` | Client-side database |
| `tanstack-pacer` | Debouncing/throttling utilities |
### Authentication
| Integration | Description |
|-------------|-------------|
| `clerk` | Clerk authentication |
| `better-auth` | Better Auth integration |
| `workos` | WorkOS identity management |
### Databases & ORMs
| Integration | Description |
|-------------|-------------|
| `drizzle` | Drizzle ORM |
| `prisma` | Prisma ORM |
| `neon` | Neon serverless Postgres |
| `convex` | Convex backend platform |
### Deployment
| Integration | Description |
|-------------|-------------|
| `vercel` | Vercel deployment |
| `netlify` | Netlify deployment |
| `cloudflare` | Cloudflare Workers/Pages |
| `nitro` | Nitro server engine |
### Developer Tools
| Integration | Description |
|-------------|-------------|
| `eslint` | ESLint configuration |
| `biome` | Biome linting/formatting |
| `shadcn-ui` | shadcn/ui component library |
| `storybook` | Storybook component development |
### API & Backend
| Integration | Description |
|-------------|-------------|
| `trpc` | tRPC type-safe API |
| `orpc` | oRPC integration |
### Services
| Integration | Description |
|-------------|-------------|
| `sentry` | Error monitoring |
| `paraglide` | Internationalization (i18n) |
| `strapi` | Strapi CMS |
## Custom Templates
### Creating a Template
```bash
# Create a project as a template base
npx @tanstack/cli create my-template --integrations tanstack-query,drizzle,clerk
# Share as a git repository or npm package
```
### Using a Custom Template
```bash
# From git repository
npx @tanstack/cli create my-app --template https://github.com/myorg/my-template
# From local path
npx @tanstack/cli create my-app --template ./templates/my-template
```
### Template Structure
```
my-template/
├── template.config.ts # Template configuration
├── src/
│ ├── app/
│ │ ├── routes/
│ │ └── components/
│ └── lib/
├── package.json
├── tsconfig.json
├── app.config.ts
└── vite.config.ts
```
## MCP Server
The TanStack CLI includes an MCP (Model Context Protocol) server for AI agent integration.
### Capabilities
- **Documentation Search** - AI agents can query TanStack documentation
- **Project Scaffolding** - Guided project creation through AI assistants
- **Integration Discovery** - Search and recommend integrations
- **Deployment Guidance** - Platform-specific deployment help
### Usage with Claude
The MCP server enables Claude and other AI assistants to:
- Search TanStack docs for accurate, up-to-date information
- Help scaffold new projects with appropriate integrations
- Provide context-aware recommendations
- Assist with configuration and deployment
### Configuration
```json
// .claude/mcp.json or equivalent
{
"mcpServers": {
"tanstack": {
"command": "npx",
"args": ["@tanstack/cli", "mcp"]
}
}
}
```
## Generated Project Structure
A typical generated project looks like:
```
my-app/
├── src/
│ ├── app/
│ │ ├── routes/
│ │ │ ├── __root.tsx
│ │ │ └── index.tsx
│ │ ├── router.tsx
│ │ ├── routeTree.gen.ts
│ │ └── client.tsx
│ ├── lib/
│ │ ├── db.ts # (if drizzle/prisma)
│ │ ├── auth.ts # (if clerk/better-auth)
│ │ └── query.ts # (if tanstack-query)
│ └── components/
├── app.config.ts
├── vite.config.ts
├── package.json
├── tsconfig.json
└── .env.example
```
## Web Builder Interface
TanStack CLI also provides an interactive web-based builder:
- Visual technology stack selection
- Preview generated files before exporting
- Integration compatibility checking
- One-click project generation
## CLI Commands Reference
| Command | Description |
|---------|-------------|
| `create <name>` | Create a new project |
| `create <name> --integrations <list>` | Create with specific integrations |
| `create <name> --template <path>` | Create from template |
| `mcp` | Start the MCP server |
## Best Practices
1. **Start with minimal integrations** - add more as needed rather than including everything upfront
2. **Use the `--integrations` flag** for reproducible project creation in CI/docs
3. **Create team templates** for consistent project structure across your organization
4. **Use the MCP server** with AI assistants for guided setup
5. **Check `.env.example`** after generation for required environment variables
6. **Review generated code** before adding business logic - understand the scaffold
7. **Use deployment integrations** to pre-configure hosting platform settings
8. **Combine auth + db integrations** for full-stack auth scaffolding (e.g., `clerk,drizzle,neon`)
## Common Pitfalls
- Not setting up environment variables after project creation (check `.env.example`)
- Selecting incompatible integration combinations
- Not running `npm install` / `pnpm install` after generation
- Forgetting to initialize the database when using Drizzle/Prisma integrations
- Not configuring the deployment platform's environment variables
- Using outdated CLI version (always use `npx @tanstack/cli` for latest)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.