Monorepo management

From rnavarych/alpha-engineer · View interactive version

Monorepo management is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Manage monorepos with Turborepo (pipelines, local/remote caching, task graph) or Nx (generators, affected commands, module boundaries). Covers pnpm workspaces setup, shared packages (ui, types, utils, config, database, validators), cross-project dependency rules, and CI optimization via change detec

How to use this skill

Skill file

Monorepo Management

When to use

Core principles

  1. ^build is topological order — Turborepo resolves dependency graph automatically; always use dependsOn: ["^build"] so packages build in the right sequence
  2. Cache outputs explicitly — if outputs is not configured, Turborepo cannot cache; always declare build artifacts including .next/** and dist/**
  3. Keep the graph acyclic — if two packages need each other, extract the shared logic into a third; nx graph or madge surfaces cycles before they become painful
  4. Types-only package has zero runtime code — packages/types exports interfaces and enums only; both frontend and backend import from it for contract consistency
  5. Remote cache cuts CI time by 40-70% — connect Turborepo to Vercel remote cache or self-host; every developer and CI run benefits from shared build artifacts

Reference Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.