define-package
/define-package
Dodaje jeden pakiet do istniejącego monorepo pnpm/TypeScript: tworzy szkielet, podłącza go do workspace i opisuje granice zależności.
- Autor
- monk24215 ↗
- Repozytorium
- -project-forge-showcase ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 30.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 30.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
Dodaje jeden pakiet do istniejącego monorepo pnpm/TypeScript: tworzy szkielet, podłącza go do workspace i opisuje granice zależności.
Wyzwalacze z opisu
Oryginalny opis (EN)
Add or specify a single package inside an existing pnpm/TypeScript workspace. Use when the user says "add a package", "create a new workspace package", "I need a shared/db/api/worker package", "add an SDK package", or asks how to introduce a new deployable or library into the monorepo. Produces the package skeleton, wires it into the workspace, and states its dependency boundary — one package, done right, without disturbing the others.
Jak działa
- First, justify it
- Determine the boundary
- Create the skeleton
- Wire it in
- Package-type quick reference
- Guardrails
Podgląd SKILL.md
--- name: define-package description: > Add or specify a single package inside an existing pnpm/TypeScript workspace. Use when the user says "add a package", "create a new workspace package", "I need a shared/db/api/worker package", "add an SDK package", or asks how to introduce a new deployable or library into the monorepo. Produces the package skeleton, wires it into the workspace, and states its dependency boundary — one package, done right, without disturbing the others. --- # Define Package Introduce one new package into an existing workspace correctly: right role, right boundary, wired into the build, without touching packages outside scope. Use this rather than **scaffold-project** when the workspace already exists and only needs one more unit. ## First, justify it A new package earns its place only if it has a distinct role and consumer. Before creating one, confirm: - **What it is** — deployable (api, web, worker) or library (shared types, db, sdk, config)? - **Who consumes it** — which existing packages will import it, or does it deploy standalone? - **Why not fold it in** — if an existing package could hold this without straining its boundary, do that instead. Don't split for tidiness. If it's a shared type or schema that a second package now needs, the answer is usually "put it in the existing `shared` package," not "make a new package." ## Determine the boundary Place the new package in the one-directional dependency graph and state it explicitly: - **Libraries** sit low: `shared` (imports nothing internal) < `db`/`config` (may import `shared`). - **Deployables** sit high: `api`, `web`, `worker` import libraries; nothing imports them. - A new package must not create a cycle. If it needs to import something that imports it, the boundary is wrong — extract the shared piece into a lower library. ## Create the skeleton 1. `packages/<name>/package.json` — scoped name `@PROJECT/<name>`, `private: true` for libraries, `type: module`, standard `build`/`dev`/`test` scripts. (Skeleton in scaffold-project's `references/package-layout.md`.) 2. `packages/<name>/tsconfig.json` — extends `../../tsconfig.base.json`, sets `outDir`/`rootDir`. 3. `packages/<name>/src/index.ts` — the public entry; export only what other packages should import. 4. Add internal dependencies with the workspace protocol: `"@PROJECT/shared": "workspace:*"`. 5. If deployable, add a root `dev:<name>` script and a `Dockerfile.<name>` (see scaffold-project's `references/docker.md`). ## Wire it in - Run the install so pnpm links the workspace dependency (`pnpm install`). - Confirm `pnpm typecheck` still passes across the whole repo — a new package must not break the build. - If the package is tested, ensure `pnpm test` picks it up. - Update **CLAUDE.md** and the README package table to list the new package and its boundary (hand off to write-project-docs, or do it inline if small). ## Package-type quick reference - **shared library** — types + Zod schemas, no runtime deps, imported by everyone. There should be exactly one. - **db package** — schema + migrations only; the single source of schema truth. - **api/worker deployable** — server or scheduled process; owns its Dockerfile. - **web deployable** — framework app; owns its build output and Dockerfile. - **sdk/snippet artifact** — client-facing bundle with a declared size budget; imports types from `shared` but bundles them out. ## Guardrails - Touch only the new package and the minimal wiring (root scripts, workspace file, docs). Do not refactor sibling packages while adding one — that's a separate task. - Don't duplicate a type into the new package that already exists in `shared`; import it. - Keep the new package's public surface (`index.ts` exports) small and intentional.
Wersje
W bazie nie ma innych skilli o nazwie define-package.
Migawka bazy z 13.11.2026 · wersja paczki 0be7d89893d1 (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. - 100init-monorepo
Tworzy gotowe do pracy monorepo pnpm z Turborepo, wspólnymi pakietami, TypeScriptem i standardowymi skryptami. - 100pnpm
Wspiera pnpm: zarządzanie zależnościami i konfigurację monorepo z pnpm-workspace.yaml, polecenia pnpm i protokół workspace. - 100add-new-package
Dodaje nowy pakiet do monorepo Remotion: szkielet, rejestrację, dokumentację, skrypty budowania i aktualizację listy kontrolnej wydania. - 100fec-monorepo-project-standard
Pomaga tworzyć, przeglądać i restrukturyzować monorepozytoria frontendowe z pnpm workspace, Turborepo i Nx: granice zależności, orkiestracja zadań, nazewnictwo i publikowanie pakietów.