shared-packages
/shared-packages
Ustala wzorce wspólnych pakietów monorepo dla szybkich MVP: dodawanie bibliotek, narzędzi i importów między pakietami.
- Autor
- kjgarza ↗
- Repozytorium
- marketplace-claude ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 18.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 18.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Ustala wzorce wspólnych pakietów monorepo dla szybkich MVP: dodawanie bibliotek, narzędzi i importów między pakietami.
Wyzwalacze z opisu
Oryginalny opis (EN)
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.
Jak działa
- Root Configuration
- Always-Present Packages
- Next.js-Specific Packages
- Pipeline Package Pattern
- Cross-Package Import Rules
- Detailed Specs
Podgląd SKILL.md
---
name: shared-packages
description: >
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.
---
# 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": "bun@1.1.38"
}
```
## 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`.
Pliki w paczce (2)
- SKILL.md 4 KB
- references/package-specs.md 9 KB
Wersje
W bazie nie ma innych skilli o nazwie shared-packages.
Migawka bazy z 13.11.2026 · wersja paczki 89e94b0ff7c2 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95pnpm-workspace
Konfiguruje monorepo w pnpm: strukturę workspace, protokół workspace:*, kolejność budowania i filtrowanie poleceń między pakietami. - 100monorepo-add-shared-package
Wydziela logikę z apps/web lub apps/mobile do nowego albo istniejącego współdzielonego pakietu w monorepo Turborepo, rejestrując go w workspace i aliasach TypeScript. - 100nextjs-stack
Zapewnia domyślny stos monorepo Next.js z Bun workspaces do szybkiego MVP: tworzenie aplikacji, dashboardów i stron oraz dobór bibliotek UI, formularzy i stylowania. - 100init-monorepo
Tworzy gotowe do pracy monorepo pnpm z Turborepo, wspólnymi pakietami, TypeScriptem i standardowymi skryptami. - 90working-in-the-monorepo
Pokazuje mapę pakietów monorepo, dozwolone zależności, kolejność PR-ów oraz zasady dla nowych pakietów i wersji. - 100monorepo
Podaje skrypty monorepo, szkielety pakietów i konwencje: uruchamianie bun run, budowanie, testy, typecheck, lintowanie i tworzenie nowych pakietów.