Help us improve
Share bugs, ideas, or general feedback.
From rapid-mvp
This skill defines the shared monorepo package patterns for rapid MVP projects. Use when the user asks to "add a package", "create a shared library", "set up the monorepo", "add utilities", or when scaffolding any new MVP project. Also load when Claude needs to understand the monorepo workspace structure or when creating cross-package imports.
npx claudepluginhub kjgarza/marketplace-claude --plugin rapid-mvpHow this skill is triggered — by the user, by Claude, or both
Slash command
/rapid-mvp:shared-packagesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
All MVP projects use a Bun workspace monorepo. The root structure is always:
Guides monorepo setup, migration, dependency management, code sharing, CI/CD, and package versioning across multiple packages and applications.
Guides monorepo setup and optimization with Turborepo, Nx, and pnpm workspaces. Use when structuring multi-package repos, managing shared dependencies, or improving build performance.
Set up and optimize monorepos with Turborepo, Nx, pnpm workspaces for shared code, efficient builds, dependency management, and CI/CD.
Share bugs, ideas, or general feedback.
All MVP projects use a Bun workspace monorepo. The root structure is always:
project-name/
├── apps/ # Deployable applications
│ └── app-name/ # One or more apps
├── packages/ # Shared libraries
│ ├── utils/ # Always present
│ ├── tsconfig/ # Always present (Next.js stack)
│ └── ... # Stack-specific packages
├── tooling/ # Shared build tooling
│ └── theme.css # Shared OKLCH design tokens (@theme directive)
├── scripts/ # Root-level build utilities (11ty stack)
├── package.json # Bun workspaces config
├── CITATION.cff # Citation metadata (CFF 1.2.0)
├── LICENSE # MIT license
├── CLAUDE.md # AI guidance for the entire monorepo
├── justfile # Task runner shortcuts
└── bun.lock
{
"name": "project-name",
"private": true,
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"dev": "bun run --filter './apps/*' dev",
"build": "bun run --filter './packages/*' build && bun run --filter './apps/*' build",
"test": "bun test",
"lint": "bun run --filter '*' lint",
"type-check": "bun run --filter '*' type-check"
},
"packageManager": "bun@1.1.38"
}
Shared utility functions. Always contains at minimum:
| File | Purpose |
|---|---|
cn.ts | cn() helper — merges Tailwind classes via clsx + tailwind-merge |
types.ts | Shared TypeScript type definitions |
validation-schemas.ts | Shared Zod schemas used across apps |
Dependencies: clsx, tailwind-merge, zod
Build: tsup with CJS + ESM + type declarations
Shared TypeScript configs:
| File | Purpose |
|---|---|
base.json | Strict mode, ES2022 target, ESNext modules, bundler resolution |
app.json | Extends base, preserves JSX, includes .next/types |
shadcn/ui component library built on Radix UI primitives.
Entry point: ./src/index.ts
Build: tsup with watch mode for dev
Core dependencies: All Radix UI primitives needed by installed shadcn components, plus class-variance-authority, clsx, tailwind-merge, lucide-react, react-hook-form, @hookform/resolvers, sonner.
Peer dependencies: react@19, react-dom@19
New components are added via bunx shadcn@latest add <component> run inside the packages/ui/ directory.
ESLint configuration extending next/core-web-vitals and prettier.
AI-focused UI components. Only add when the prototype involves AI features (chat, artifacts, message rendering).
When an MVP needs a data pipeline (API integration, data transformation, AI processing), create a dedicated package:
packages/pipeline/
├── src/
│ ├── index.ts # Public API
│ ├── fetcher.ts # Data fetching
│ ├── transformer.ts # Data transformation
│ └── types.ts # Pipeline-specific types
├── package.json
├── tsconfig.json
└── tsup.config.ts
The pipeline package should:
import { cn } from "@repo/utils"import type for type-only imports across packagesFor complete package.json templates, tsconfig configurations, and tsup configs, read references/package-specs.md.