General
toolchain-preferences - Claude MCP Skill
Apply preferred toolchain and technology stack defaults: pnpm, Next.js, TypeScript, Convex, Vercel, Tailwind, shadcn/ui, Zustand, TanStack, Vitest. Use when setting up new projects, choosing dependencies, discussing stack decisions, or evaluating alternatives.
SEO Guide: Enhance your AI agent with the toolchain-preferences tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to apply preferred toolchain and technology stack defaults: pnpm, next.js, typescript, convex, vercel, ... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Toolchain Preferences Default technology stack and tooling choices for new projects. ## Package Management ### pnpm (Default) **Why pnpm:** - Faster than npm/yarn - Disk-efficient through content-addressable storage - Strict by default (no phantom dependencies) - Better monorepo support **Usage:** ```bash pnpm install pnpm add <package> pnpm dev ``` ### Version Management: asdf **Node.js version per project:** ``` # .tool-versions nodejs 22.15.0 ``` Ensures consistent environments across projects and machines. ## Core Stack ### Framework: Next.js App Router + TypeScript **Why Next.js:** - Full-stack React framework - Server components, streaming, React Server Components (RSC) - Excellent developer experience, fast iteration - Zero-config routing, API routes, server actions **Always TypeScript:** - Type safety from database to UI - Better IDE support, refactoring confidence - Catches errors at compile time ### Backend: Convex **Why Convex:** - Real-time database as a service - Type-safe from database to UI (auto-generated types) - Reactive queries with automatic caching - No API layer needed ā direct function calls - Built-in auth, file storage, scheduling **When to use:** - Real-time features (chat, collaboration, live updates) - Rapid prototyping (skip API boilerplate) - Type-safe full-stack (database ā UI) **Alternative:** tRPC + Prisma for non-real-time apps ### Deployment: Vercel **Why Vercel:** - Zero-config Next.js deployment - Edge functions, analytics, preview deployments - Tight integration with Next.js features (middleware, ISR, etc.) - Great DX (git push ā deployed) ## UI Stack ### Styling: Tailwind CSS + shadcn/ui **Tailwind CSS:** - Utility-first CSS for fast iteration - Consistent design system via `tailwind.config.ts` - No CSS file overhead, tree-shakeable - Responsive, dark mode, arbitrary values **shadcn/ui:** - Copy-paste components (NOT a dependency) - Full control over component code - Built on Radix primitives - Accessible by default **Alternative:** Use Radix UI directly for full customization ### State Management: Zustand **Why Zustand:** - Minimal boilerplate vs Redux - Simple API, works with React patterns - Good for client-side state (Convex handles server state) **When to use:** - Client-side UI state (modals, forms, preferences) - Cross-component state without prop drilling **Alternative:** React Context + hooks for simple cases ### Data Handling: TanStack Query + TanStack Table **TanStack Query:** - Server state management (when NOT using Convex) - Caching, refetching, optimistic updates - Replaces Redux for server data **TanStack Table:** - Headless table logic (sorting, filtering, pagination) - Works with any UI framework - Fully customizable, accessible ## Observability Stack ### Error Tracking: Sentry (Required) **Why Sentry:** - Source maps: Translates minified errors to readable stack traces - Deduplication: 10,000 identical errors ā 1 alert - Breadcrumbs: Auto-records user actions before crash - Vercel integration: Automatic source map uploads **Setup:** ```bash pnpm add @sentry/nextjs npx @sentry/wizard@latest -i nextjs ``` **Free tier:** 5K errors/month ā enough until you have traction. ### Product Analytics: PostHog (Required for user-facing apps) **Why PostHog:** - Terraform-native: Only major analytics with [official Terraform provider](https://github.com/PostHog/terraform-provider-posthog) - All-in-one: Analytics + feature flags + session replay + A/B testing - Developer-first: Open source, self-hostable, transparent pricing - CLI-manageable: Fits agentic development workflow **Setup:** ```bash pnpm add posthog-js ``` **Free tier:** 1M events/month ā generous for most apps. **Track conversion events only:** signup, subscription, import, key actions. Let autocapture handle generic clicks. ### NOT Vercel Analytics **Do NOT use Vercel Analytics.** It has: - No API access - No CLI access - No MCP server - No way to query programmatically This makes it completely unusable for AI-assisted workflows. PostHog handles web vitals AND product analytics with full API/MCP access. ### Structured Logging: Pino **Why Pino:** - Fastest Node.js logger - JSON output in production - Pretty output in development **Edge runtime fallback:** Use structured console.log when Pino not available. ### Avoid ā **Mixpanel/Amplitude** ā Poor CLI automation, expensive at scale ā **Custom analytics** ā 800+ hours to reach feature parity; free tiers cover you ā **Google Analytics** ā Privacy concerns, poor product analytics ā **Dashboard-only tools** ā No CLI/API = not automatable ā **Vercel Analytics** ā No API, no CLI, no MCP (completely unusable for our workflow) ### Decision Tree **User-facing app?** - YES ā Sentry + PostHog - NO (internal tool) ā Sentry + structured logging only **Need feature flags?** - YES ā PostHog feature flags (skip LaunchDarkly) - NO ā Skip for now, easy to add later **Need session replay?** - YES ā PostHog session replay - NO ā Skip (costs extra) ## Build Tools ### Default Build Tool by Project Type **Next.js projects:** - Use Next.js built-in build (Turbopack or webpack) - Zero config, optimized for framework **Standalone apps (React/Vue/Svelte):** - Vite: Fast, modern, great DX - HMR, instant server start, optimized builds **Libraries:** - tsup: Simple TypeScript bundler - unbuild: Clean, minimal builds ## Testing ### Vitest (Default) **Why Vitest:** - Fast, modern test runner - Compatible with Jest API (easy migration) - Great TypeScript support - Watch mode, coverage, snapshots **When to use:** - Unit tests, integration tests - Component testing (with @testing-library/react) **E2E Testing:** - Playwright for end-to-end tests ## Quick Reference ### New Project Setup ```bash # Create Next.js app with TypeScript npx create-next-app@latest --typescript --tailwind --app # Use pnpm pnpm install # Add Convex pnpm add convex npx convex dev # Add shadcn/ui npx shadcn@latest init npx shadcn@latest add button card # Add Zustand (if needed) pnpm add zustand # Add testing pnpm add -D vitest @testing-library/react @testing-library/jest-dom ``` ### Dependency Decision Tree **Need real-time data?** - YES ā Convex - NO ā TanStack Query + API layer (or tRPC) **Need complex client state?** - YES ā Zustand - NO ā React Context + useState/useReducer **Need data tables?** - YES ā TanStack Table - NO ā Plain HTML table or simple list **Need UI components?** - Start with shadcn/ui (copy-paste) - Customize as needed (you own the code) ## When to Deviate ### Valid Deviations **Static sites:** - Consider Astro instead of Next.js - Better for content-heavy, low-interactivity sites **Non-real-time apps:** - tRPC + Prisma instead of Convex - More control over database schema, migrations **Simple projects:** - React Context instead of Zustand - Reduce dependencies for small apps **Component libraries:** - Radix UI directly instead of shadcn - When you need 100% control from start ### Anti-Patterns to Avoid ā **npm/yarn** ā Use pnpm for consistency ā **Redux** ā Too much boilerplate; use Zustand or TanStack Query ā **Class components** ā Use function components + hooks ā **CSS-in-JS (styled-components, Emotion)** ā Runtime overhead; use Tailwind ā **Create React App** ā Deprecated; use Vite or Next.js ā **Component libraries as dependencies** ā Prefer shadcn copy-paste approach ## Philosophy **Opinionated defaults, pragmatic deviations.** These tools work well together, have been battle-tested, and provide excellent developer experience. But they're defaults, not dogma. Choose tools that: 1. Solve real problems (not resume-driven development) 2. Have good documentation and community 3. Integrate well with the rest of the stack 4. Match project requirements (not all projects need real-time) **Prefer boring technology that works over shiny technology that might.** ## Tool Selection Criteria Evaluate tools against these requirements (priority order): ### 1. CLI-First (Required) Tool must be fully operable from command line. Dashboard-only = rejected. ### 2. API-Native (Required) Programmatic access for automation and scripting. ### 3. MCP-Ready (Strongly Preferred) Model Context Protocol server for AI agent integration. Check: - Official MCP server: `@stripe/mcp`, `@posthog/mcp-server`, Sentry MCP - Community MCP server: acceptable if maintained - No MCP: acceptable only if CLI/API are excellent ### Current Stack MCP Status | Service | MCP | Notes | |---------|-----|-------| | PostHog | ā Official | `@posthog/mcp-server` | | Sentry | ā Official | `@sentry/mcp-server` | | Stripe | ā Official | `@stripe/mcp` | | Vercel | ā Official | `@vercel/mcp` | | GitHub | ā Official | `@modelcontextprotocol/server-github` | | Clerk | ā | Monitor for MCP support | | Convex | ā | CLI is good, no MCP yet |
Signals
Information
- Repository
- phrazzld/claude-config
- Author
- phrazzld
- Last Sync
- 3/2/2026
- Repo Updated
- 3/1/2026
- Created
- 1/13/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
pr-status
PR Status
upgrade-nodejs
Upgrading Bun's Self-Reported Node.js Version
cursorrules
CrewAI Development Rules
cn-check
Install and run the Continue CLI (`cn`) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
Mastering tmux with Claude: A Complete Guide to the tmux Claude Skill
Learn how to use the tmux Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.