tanstack-cli
TanStack Config for shared build tooling, Vite plugins, and package configuration across TanStack projects. Use when configuring TanStack library builds or contributing to TanStack packages. Use for tanstack-config, tanstack-cli, vite-plugin, package-config, library-build.
What this skill does
# TanStack Config
## Overview
TanStack Config provides opinionated tooling to build, version, and publish JavaScript/TypeScript packages with minimal configuration and consistent results. It uses Vite for library builds with automatic dual ESM/CJS output and type generation, plus automated publishing with conventional-commit-based versioning.
**When to use:** Building TanStack libraries or packages that follow TanStack conventions, contributing to TanStack open-source projects, setting up dual ESM/CJS library builds with Vite, automating package publishing with conventional commits.
**When NOT to use:** Application builds (use framework-specific tooling), non-library projects, projects not using pnpm, projects that need non-Vite build pipelines.
## Quick Reference
| Pattern | API / Package | Key Points |
| ------------------ | --------------------------------------------------- | ------------------------------------------------------- |
| Vite build config | `tanstackViteConfig()` from `@tanstack/vite-config` | Merge with `defineConfig` via `mergeConfig` |
| Entry point | `entry: './src/index.ts'` | Single file or array of entry files |
| Source directory | `srcDir: './src'` | Used for declaration file generation |
| CJS output | `cjs: true` (default) | Generates `.cjs` and `.d.cts` alongside ESM |
| External deps | `externalDeps: [/^@internal\//]` | Auto-detected from `package.json`, extend with patterns |
| Bundled deps | `bundledDeps: ['tiny-invariant']` | Bundle instead of externalize |
| Exclude from types | `exclude: ['./src/**/*.test.ts']` | Patterns to skip during type generation |
| Custom tsconfig | `tsconfigPath: './tsconfig.build.json'` | Override default tsconfig for builds |
| Declaration hook | `beforeWriteDeclarationFile(path, content)` | Transform `.d.ts` content before write |
| Publish automation | `publish()` from `@tanstack/publish-config` | Conventional commits drive versioning |
| Branch configs | `branchConfigs: { main, beta, alpha }` | Control prerelease and stable channels |
| Package list | `packages: [{ name, packageDir }]` | Monorepo package definitions |
| Build script | `vite build && publint --strict` | Standard build with strict linting |
## Common Mistakes
| Mistake | Correct Pattern |
| ------------------------------------------------ | -------------------------------------------------------------------------- |
| Missing `"type": "module"` in `package.json` | Set `"type": "module"` for ESM-first builds |
| Using `defineConfig` alone without `mergeConfig` | Use `mergeConfig(defineConfig({...}), tanstackViteConfig({...}))` |
| Forgetting `entry` or `srcDir` options | Both are required for `tanstackViteConfig` to work |
| Missing `exports` field in `package.json` | Define `import` and `require` conditions with types |
| Not awaiting `publish()` promise | Handle with `.then()` and `.catch()` for error reporting |
| Using npm or yarn instead of pnpm | pnpm is the only supported package manager |
| Omitting `publint --strict` from build script | Add `publint --strict` after `vite build` to catch packaging issues |
| Setting `tag` without `v` prefix | Manual version tags must start with `v` (e.g., `v1.0.0`) |
| Wrong commit type for release level | `fix`/`refactor`/`perf` = patch, `feat` = minor, `BREAKING CHANGE` = major |
## Requirements
- Node.js v18.17+
- pnpm v8+
- Git CLI
- GitHub CLI (pre-installed on GitHub Actions)
- Vite (peer dependency for build config)
- publint (recommended for build validation)
## Delegation
- **Build configuration review**: Use `Task` agent to verify Vite config and `package.json` exports
- **Publishing workflow setup**: Use `Explore` agent to check CI/CD integration patterns
- **Package validation**: Run `publint --strict` after builds to catch packaging issues
## References
- [Configuration and Vite plugin setup](references/configuration.md)
- [Publishing and version management](references/publishing.md)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.