skillfed

Monorepo

This skill equips Claude Code teams with a production-ready monorepo framework spanning 11 technology stacks and 5 programming languages. It provides sprint-based workflows, continuous build loops, browser-based acceptance testing, and token-optimized code review agents designed for tech leads scaling AI-assisted development across their organization.

Monorepo with Nx provides a comprehensive framework for initializing a monorepo workspace. Start by installing Nx globally or using `npx create-nx-workspace`, which scaffolds your repository structure with a root configuration file and package directories. Nx automatically generates workspace.json and nx.json files that define your projects, tasks, and caching rules. The setup process configures task runners, dependency graphs, and build pipelines tailored to your tech stack, enabling you to manage multiple applications and libraries within a single repository while maintaining clear boundaries and shared dependencies.

AI-generated summary based on this skill's SKILL.md

99 9 MIT updated by TheBeardedBearSAS

Install

TheBeardedBearSAS/claude-craft/monorepo · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/TheBeardedBearSAS/claude-craft
cp -r claude-craft/.claude/skills/monorepo ~/.claude/skills/monorepo

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I set up a monorepo with Nx?

Monorepo with Nx provides a comprehensive framework for initializing a monorepo workspace. Start by installing Nx globally or using `npx create-nx-workspace`, which scaffolds your repository structure with a root configuration file and package directories. Nx automatically generates workspace.json and nx.json files that define your projects, tasks, and caching rules. The setup process configures task runners, dependency graphs, and build pipelines tailored to your tech stack, enabling you to manage multiple applications and libraries within a single repository while maintaining clear boundaries and shared dependencies.

What is the difference between Turborepo and Nx for monorepo management?

Monorepo tooling like Turborepo and Nx both optimize build performance through caching and task orchestration, but they differ in scope and philosophy. Turborepo focuses on lightweight pipeline configuration and remote caching via Vercel, making it ideal for teams prioritizing simplicity and fast setup. Nx offers deeper workspace intelligence, including dependency graph visualization, affected builds for CI/CD, and enterprise plugins for complex organizational structures. Your choice depends on whether you need Turborepo's minimalist approach or Monorepo's comprehensive orchestration and scaling features across multiple packages and applications.

How can Monorepo help optimize build performance through caching and task orchestration?

Monorepo accelerates builds by implementing intelligent caching and task orchestration across your workspace. When you define task dependencies in your configuration, Monorepo tracks which packages have changed and only rebuilds affected projects, dramatically reducing build times on distributed teams. Caching stores task outputs locally and can be extended to remote caching services for CI/CD pipelines, ensuring that identical tasks never run twice across your organization. Task orchestration parallelizes independent builds while respecting dependency chains, maximizing CPU utilization and enabling faster feedback loops for developers.

How do I organize monorepo packages and apps effectively?

Monorepo enables you to structure multiple packages and applications within a single repository by establishing clear directory conventions and dependency boundaries. Typically, you organize code into `apps/` for standalone applications and `packages/` for shared libraries, with each containing its own package.json and build configuration. Monorepo's dependency graph visualization helps you understand relationships between projects and prevent circular dependencies. By configuring workspace settings and task definitions at the root level, you share common tooling, linting rules, and build caches across all packages while allowing individual projects to maintain their own scripts and configurations.

What are the best practices for monorepo code sharing between apps?

Monorepo facilitates code sharing across multiple applications by treating shared logic as internal packages within your workspace. Create dedicated `packages/` directories for utilities, components, types, and business logic that multiple apps depend on. Use Monorepo's dependency resolution to automatically link these packages without publishing to npm, enabling instant updates across your codebase. Configure your build system to handle internal package dependencies correctly, ensuring that changes to shared code trigger rebuilds of dependent applications. This approach reduces duplication, maintains a single source of truth, and simplifies refactoring across your entire organization.

How do I configure CI/CD pipelines for monorepo affected builds?

Monorepo enables efficient CI/CD by implementing affected builds that only run tests and deployments for changed packages. In your pipeline configuration, use Monorepo's affected command to detect which projects changed since the last successful build, then execute only their associated tasks. This dramatically reduces CI/CD execution time on distributed teams by skipping unnecessary builds for unmodified packages. Configure your pipeline to compute the dependency graph, cache build artifacts, and parallelize affected tasks across available runners. Integration with version control systems ensures accurate change detection, making your continuous integration process both faster and more cost-effective.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
.claude/skills/monorepo/SKILL.md

Related skills

Tags

workspace-management build-orchestration distributed-caching multi-package-projects dependency-graph task-pipeline shared-code-libraries ci-optimization package-management monorepo-tools