void-service-package

Creates shared packages in a Turborepo monorepo following the 5+5 file layout and ports-and-adapters boundaries.

Updated May 29, 2026
One-click install
npx skills add https://github.com/voidcorp-core/void-harness --skill void-service-package-voidcorp-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: void-service-package
Source: https://github.com/voidcorp-core/void-harness/tree/main/packages/cli/core-assets/packs/pack-monorepo/skills/void-service-package
Command: npx skills add https://github.com/voidcorp-core/void-harness --skill void-service-package-voidcorp-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams working in a monorepo often create shared packages with inconsistent structure, blurred dependency boundaries, and missing tests, which erodes architecture over time. This Skill provides an execution checklist for creating or extending a packages/<name>/ service package that follows strict conventions: the 5+5 file layout, ports-and-adapters direction, and enforced import boundaries. ## Core Features & Use Cases - Mandatory 5+5 layout: Five source files (service, repository, helper, types, index) paired one-to-one with five test files, with no utils/ or common/ dumping grounds. - Boundary enforcement: The package owns the port (interface); concrete adapters live in the consuming app under apps/<app>/src/adapters/, and only @repo/core may be imported from other workspace packages. - Step-by-step workflow: From writing the boundary statement and Zod-based types first, through TDD on the service, to running turbo run typecheck test before commit. - Use Case: When asked to "extract billing into its own package so apps/api and apps/web can both use it", the Skill scaffolds @repo/billing with the correct package.json, tsconfig, Zod schemas, port interface, and paired tests. ## Quick Start Ask the agent to create a new shared package named billing under packages/ following the monorepo service package conventions.

Frequently Asked Questions about void-service-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new shared package in a Turborepo monorepo?

Create a directory under packages/ with package.json, tsconfig.json extending tsconfig.strict.json, and a src/ folder containing five source files (service, repository, helper, types, index) each paired with a test file. Write the Zod-based types first, then TDD the service, and run turbo typecheck and test before committing.

What is the 5+5 file layout for monorepo packages?

The 5+5 layout is five source files paired one-to-one with five test files: <name>.service.ts, <name>.repository.ts, <name>.helper.ts, <name>.types.ts, and index.ts, each with a matching .test.ts. No utils/, lib/, or common/ directories are allowed; each file does one thing.

Where should database adapter code live in a hexagonal monorepo?

The concrete adapter lives in the consuming app under apps/<app>/src/adapters/<name>/, not in the shared package. The package's repository.ts defines only the port interface plus an optional in-memory implementation for tests, and the app wires the production adapter.

Can a shared package import other @repo/* workspace packages?

No, a service package may only import @repo/core for the logger, env, errors, and Result/Option/pipe utilities. If another @repo/* import seems necessary, either move the shared concept into @repo/core or reshape the boundary so the consumer composes both packages.

When should I not create a new package in the monorepo?

Do not create a package if you cannot state in one line what it owns, exposes, and who consumes it, or if the code is internal to a single app under apps/<app>/. A sixth source file that fits nowhere signals the boundary is wrong and the package should be split or reshaped instead.