agentsclimarketplace

Effect ts monorepo with turbo and subpath exports

Skill kjuhwa/skills-hub/skills/monorepo/effect-ts-monorepo-with-turbo-and-subpath-exports

Organize effect-based services in a monorepo using Turbo task pipelines and explicit subpath exports instead of barrel indexesFrom its SKILL.md

Install
npx -y skills add kjuhwa/skills-hub --skill effect-ts-monorepo-with-turbo-and-subpath-exports

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, 443 tokens by cl100k_base, as published. Nobody here has run it

When to Apply

  • You have 4+ packages in a Bun/Node monorepo with Effect.ts services
  • You want to avoid barrel index files (e.g., index.ts exporting everything)
  • You need lazy-loading and want to control import surface area per package
  • You're using Turbo for task orchestration and need deterministic builds

Steps

  1. Structure as apps/{server,web,desktop} and packages/{contracts,shared,client-runtime}
  2. In packages/*/package.json, define exports with subpath mappings:
    {
      "exports": {
        "./git": "./dist/git.js",
        "./DrainableWorker": "./dist/DrainableWorker.js"
      }
    }
    
  3. Each subpath is a separate file, not re-exported from index.ts
  4. Consumers import explicitly: import { GitCore } from '@t3tools/shared/git'
  5. In package.json root, define catalog with common dependency versions (effect, typescript, etc.)
  6. Use overrides to enforce catalog versions across workspace
  7. Define turbo.json with task dependency DAG: build -> test, typecheck in parallel
  8. Add bun as packageManager and pin versions in engines

Example

{
  "workspaces": { "packages": ["apps/*", "packages/*"] },
  "catalog": { "effect": "4.0.0-beta.45", "typescript": "^5.7.3" },
  "overrides": { "effect": "catalog:", "typescript": "catalog:" },
  "packageManager": "[email protected]"
}

Counter / Caveats

  • Subpath exports require explicit package.json maintenance per file
  • Bundler/TypeScript LSP may not resolve subpaths in dev; test early
  • Turbo cache can become stale if tasks mutate inputs; use immutable inputs/outputs
  • Catalog overrides may conflict with transitive deps; audit carefully

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,645. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.