Monorepo Dependency and CI Optimization
Map workspace dependencies, fix cross-package failures, and design correct affected CI, caching, and repo migrations.
Before & after
Same prompt, same agent — the only difference is the skill.
Monorepo performance is complex. There are several levers: optimizing task dependencies, selective building on affected packages, remote caching, pnpm workspaces configuration, and dependency graph visualization. Do you know your current bottleneck? What's your monorepo tool? How many packages do you have? What's your current CI pipeline? Understanding the current state would help.
Delivers MONOREPO ARCHITECTURE AUDIT: package count, dependency depth, task graph visualization. BUILD PERFORMANCE ANALYSIS: per-package build time, cache hit rates, parallelization overhead. AFFECTED-PACKAGE FILTERING: incremental builds on changed packages only, savings estimation. REMOTE CACHING SETUP: Turborepo cache layer configuration, hit rate projection, and DEPENDENCY RESOLUTION TUNING: pnpm phantom dependency scan, lockfile impact. Returns OPTIMIZATION ROADMAP with quick wins first, estimated CI time reduction percentages. Covers Turborepo, Nx, pnpm, Lerna. Activates automatically when the request matches monorepo-navigator.
About this skill
“Why did changing one shared package break three apps?” “Why does every PR rebuild everything?” This skill traces the dependency paths behind those problems and turns them into concrete fixes for pnpm workspaces, Turborepo, Nx, and Lerna.
What it does
- Maps packages, applications, generated artifacts, and task prerequisites into an actionable dependency graph.
- Selects changed projects and their transitive consumers, then includes the prerequisites needed to build and test them correctly.
- Diagnoses cross-package resolution failures caused by undeclared dependencies, exports, build ordering, or stale artifacts.
- Audits cache inputs, outputs, environment variables, and trust boundaries before recommending remote caching.
- Produces targeted configuration changes and verification cases for existing CI.
- Plans multi-repo consolidation around package identity, dependency cycles, release behavior, history, and rollback.
What you get
A scoped diagnosis, dependency evidence, and concrete commands or configuration changes appropriate to your repository. Larger requests include an affected-task plan, cache contract, validation matrix, or staged migration plan with unresolved assumptions labeled.
Best for
Engineers maintaining JavaScript or TypeScript workspaces, teams debugging shared-package changes, and platform owners reducing redundant CI work without skipping required checks.
SKILL.md preview
---
name: monorepo-dependency-and-ci-optimization
description: Map workspace and task dependencies to diagnose cross-package failures, select affected CI work, configure reliable caching, and plan repository consolidation across pnpm workspaces, Turborepo, Nx, and Lerna. Use when the user says "why does every PR rebuild everything", "my shared package changes keep breaking apps", "which packages does this change affect", "set up affected tests", "our remote cache returns stale builds", "help me choose a monorepo tool", or "merge these repos into a monorepo".
---
# Monorepo Dependency and CI Optimization
… (sign up to view the full skill)More development skills
View all Development skills →Performance Bottleneck Profiling: Node, Python, Go
Classifies a slowdown, gives exact profiler commands, reads the output, and proves the fix with same-conditions p95/p99 numbers.
Feature Scaffolding with Working Tests
Turn a short feature spec into code, runnable tests, and integration wiring that match your existing project.
Feature Flag Rollouts and Kill Switches
Design staged flag rollouts, verify rollback paths, and audit flag debt with explicit defaults, gates, and retirement plans.
Microcontroller Firmware and RTOS Engineering
Build and debug MCU firmware with bounded ISR/RTOS timing, safe DMA ownership, and measured power budgets.