mcpField
T
turborepo-architecture

turborepo-architecture

github.com/dobroslavradosavljevicDevelopment336 installsUpdated 1d ago
Repository

About turborepo-architecture

turborepo-architecture is a monorepo architecture skill for Turborepo with Bun or pnpm workspaces. It guides scaffolding, wiring, and review, focusing on workspace structure, package boundaries, Turbo tasks, and caching while deferring to existing repository rules.

Key features

  1. 01Scaffold apps and packages
  2. 02Configure workspaces and package boundaries
  3. 03Set Turbo task and cache rules
  4. 04Organize root scripts
  5. 05Review repository structure against rules

Use cases

  1. 01Set up a Turborepo monorepo
  2. 02Add scripts and dependencies to packages
  3. 03Review task graphs and package boundaries

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dobroslavradosavljevic/skills --skill turborepo-architecture

After installing, type/turborepo-architecturein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
checklist.md
examples.md
rules.md
tree.md
with-catalog.md
with-compose-local.md
with-dependency-boundaries.md
with-docker-deploy.md
with-effect-packages.md
with-engine-nested.md
with-env-packages.md
with-knip.md
with-oxlint-oxfmt.md
with-typegen.md
with-vitest-workspaces.md

Details

From the project README

Turborepo Architecture

Portable monorepo house style for Turborepo + Bun/pnpm workspaces. Use this skill alone — it does not depend on other skills.

Job: workspace wiring, package boundaries, turbo tasks/cache, root scripts.

Not this skill: Turbo CLI deep docs, remote cache vendor setup, or feature module trees inside an app (HTTP routes / Start pages belong to app architecture docs for that stack).

If the target repo already documents monorepo rules (e.g. AGENTS.md) and it conflicts, repo wins unless the user asks to migrate toward this skill.

Stack defaults (core)

PieceDefault
Package managerBun workspaces (pnpm/npm OK if already used)
Layoutapps/*, packages/*
OrchestrationTurborepo (turbo.jsonc / turbo.json)
Internal packages"exports": { ".": "./src/index.ts" } — Bun runs TS directly
EnvApps own .env + T3 Env src/env.ts; packages take .make(options)
VerificationFull graph for closing gates; --filter for mid-edit iteration

Modes

  1. Scaffold — new app/package from checklist.md + tree.md.
  2. Apply — add scripts, deps, turbo participation correctly.
  3. Review — compare to rules.md; propose moves.

Hard rules (core)

  1. Workspaces + shared pins — shared deps via catalog (or equivalent); workspace deps via workspace:*.
  2. Turbo orchestrates scripts — it is not the package manager. Package scripts must not recurse into turbo run for the same task.
  3. transit DAG — use a no-script transit / topo node with dependsOn: ["^transit"] so typecheck / test can run in parallel while invalidating on dependency source changes.
  4. Persistent / mutating tasks are uncached — dev, watch servers, format, lint:fix, typegen → cache: false (+ persistent: true for long-lived processes).
  5. Lint/format/test/typecheck are per-workspace scripts that Turbo runs (skip packages without the script).
  6. Apps own env; packages never read process.env in library code — pass options into factories/Layers.
  7. Internal entry = ./src/index.ts unless the package is publishable/built (dist/).
  8. Filter by package name — --filter=@org/api, not by accident-only folder paths.
  9. Prefer clean breaking changes in active monorepos — delete shims/dual-writes/deprecated aliases in the same change; update callers together.
  10. Closing verification = full graph unless the user explicitly defers quality gates.

Details: rules.md, tree.md, examples.md.

Progressive disclosure

NeedRead
Canonical treesreferences/tree.md
Rules + anti-patternsreferences/rules.md
Scaffold / review checklistsreferences/checklist.md
Good vs bad layoutsreferences/examples.md
Optional overlaysExtensions below

Extensions

Load only when the matching stack is present (or the user asks):

WhenExtension
Bun workspaces.catalog / named catalogswith-catalog.md
Root-only Knipwith-knip.md
Per-package Oxlint + Oxfmtwith-oxlint-oxfmt.md
Vitest scripts + turbo test taskswith-vitest-workspaces.md
App env vs package .makewith-env-packages.md
Effect services in packageswith-effect-packages.md
Opt-in typegen / OpenAPI codegenwith-typegen.md
Nested packages/<group>/* + second scopewith-engine-nested.md
turbo prune --docker + empty Root Directorywith-docker-deploy.md
Explicit may/must-not import tableswith-dependency-boundaries.md
Root compose helpers for local infrawith-compose-local.md

Boundary vs app architecture

This skill owns monorepo wiring and package boundaries. Inside an app, feature folder trees (Elysia modules, TanStack Start routes) belong to that app’s architecture guidance — do not invent a second HTTP/UI layout here.

Comments

Markdown supported