Die Oberfläche ist lokalisiert; Skill-Beschreibungen und -Dokumente werden per KI automatisch in Ihre Sprache übersetzt. Code, Befehle, Pfade und Fachbegriffe bleiben im Original, maßgeblich ist das Dokument des Autors.
Skills entdecken
Design und Kreativität · SKILL.md

monorepo-strategy

monorepo-strategy

Design monorepo strategies — tool selection (Nx, Turborepo, Bazel), workspace structure, dependency management, CI optimization, and code ownership. TRIGGER when: user says /monorepo-strategy, needs to set up a monorepo, or asks about monorepo vs multi-repo decisions.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill-Dokumentation

GitHub

name: monorepo-strategy description: > Design monorepo strategies — tool selection (Nx, Turborepo, Bazel), workspace structure, dependency management, CI optimization, and code ownership. TRIGGER when: user says /monorepo-strategy, needs to set up a monorepo, or asks about monorepo vs multi-repo decisions. argument-hint: "[system or project context]" user-invocable: true

Monorepo Strategy

You are a platform engineering specialist. Design a monorepo strategy that enables team productivity while maintaining build performance.

Process

Step 1: Evaluate Monorepo Fit

FactorMonorepo FavoredMulti-Repo Favored
Shared codeSignificant cross-project sharingIndependent projects
Team couplingTeams collaborate frequentlyAutonomous teams
Release cadenceCoordinated releasesIndependent releases
Build systemWilling to invest in toolingSimple build needs

Step 2: Select Tooling

ToolLanguage FocusStrengthsComplexity
NxJS/TS (polyglot support)Dependency graph, caching, generatorsMedium
TurborepoJS/TSSimple, fast caching, incremental buildsLow
BazelPolyglotHermetic builds, massive scaleHigh
PantsPython, Go, JavaErgonomic, good Python supportMedium
RushJS/TSEnterprise features, phantom deps preventionMedium

Step 3: Design Workspace Structure

├── apps/           # Deployable applications
│   ├── web/
│   ├── api/
│   └── mobile/
├── packages/       # Shared libraries
│   ├── ui/
│   ├── utils/
│   └── types/
├── tools/          # Build tools, generators
├── .github/        # CI workflows
└── nx.json         # Workspace config

Step 4: Optimize CI

TechniqueImpact
Affected-only buildsOnly build/test what changed
Remote cachingShare build cache across CI and developers
Parallel executionRun independent tasks concurrently
Incremental buildsOnly recompile changed files

Step 5: Define Code Ownership

AreaTeamReview Policy
apps/webFrontend1 team member approval
packages/uiDesign systemsDesign + frontend approval
packages/typesPlatformAny team member
tools/PlatformPlatform team approval

Step 6: Establish Conventions

  • Dependency management: internal deps via workspace protocol
  • Versioning: independent per package or fixed across workspace
  • Testing: each package has its own test suite
  • Documentation: README per package with usage examples

Output Format

## Monorepo Strategy
### Tool: [choice with rationale]
### Structure: [directory layout]
### CI: [Caching and optimization approach]
### Ownership: [CODEOWNERS setup]

Quality Checklist

  • Tool selection matches team expertise and scale
  • Build times are acceptable (< 10 min for affected changes)
  • Code ownership is defined via CODEOWNERS
  • CI runs only affected projects
  • Remote caching is configured
  • Dependency graph has no circular dependencies

Edge Cases

  • For polyglot repos, evaluate Bazel or Pants over JS-focused tools
  • If migrating from multi-repo, move one project at a time
  • For very large repos (> 1M lines), invest in custom tooling and build optimization
  • If teams are in different time zones, asynchronous review processes are critical
Gespeicherte Skills