Monorepo

From TheBeardedBearSAS/claude-craft · View interactive version

Monorepo is an AI agent skill from the GitHub repository TheBeardedBearSAS/claude-craft. Monorepo management (Nx, Turborepo, pnpm workspaces) — task orchestration, caching, code sharing. Use when setting up monorepo, optimizing builds, or managing multi-package projects.

How to use this skill

Skill file

Monorepo — Nx, Turborepo, pnpm Workspaces

Monorepo moderne avec caching distribué, task orchestration.

Tools

Nx — Graph-based, plugins, enterprise

Turborepo — Simple, fast, Vercel

pnpm workspaces — Léger, fast

Lerna — Legacy (migrer)

Turborepo

{ "pipeline": {
  "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
  "test": { "cache": true }
}}
pnpm turbo build                 # Cache
pnpm turbo test --filter=...@main

Nx

nx affected --target=build
nx graph

Code Sharing

monorepo/
├── packages/ (ui, utils, config)
├── apps/ (web, api, mobile)
import { Button } from '@monorepo/ui';

Caching

Local — Dev | Remote — Team (Vercel, Nx Cloud) | Distributed — CI

npx turbo login && npx turbo link  # Turborepo
npx nx connect-to-nx-cloud         # Nx

pnpm Workspaces

packages: ['packages/*', 'apps/*']

Best Practices

Atomic commits | Versioning (changesets) | CI (affected) | Shared configs (root)


Voir @.claude/skills/tooling/SKILL.md

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.