shared-packages
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.
What this skill does
# Shared Monorepo Packages
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
```
## Root Configuration
### package.json
```json
{
"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": "[email protected]"
}
```
## Always-Present Packages
### @repo/utils
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
### @repo/tsconfig (Next.js stack only)
Shared TypeScript configs:
| File | Purpose |
|------|---------|
| `base.json` | Strict mode, ES2022 target, ESNext modules, bundler resolution |
| `app.json` | Extends base, preserves JSX, includes .next/types |
## Next.js-Specific Packages
### @repo/ui
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.
### @repo/eslint-config
ESLint configuration extending `next/core-web-vitals` and `prettier`.
### @repo/ai-elements (optional)
AI-focused UI components. Only add when the prototype involves AI features (chat, artifacts, message rendering).
## Pipeline Package Pattern
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:
- Export clean functions, never expose implementation details
- Use Zod for input/output validation
- Be framework-agnostic (no React, no Next.js imports)
- Define its own types, import shared types from @repo/utils
## Cross-Package Import Rules
- Apps import from packages via workspace aliases: `import { cn } from "@repo/utils"`
- Packages can import from other packages but never from apps
- Use `import type` for type-only imports across packages
- Never use relative paths across workspace boundaries
## Detailed Specs
For complete package.json templates, tsconfig configurations, and tsup configs, read `references/package-specs.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.