# Monorepo Skills

> Agent skills that audit JS/TS monorepos for boundary, caching, CI coverage and test-leakage problems and refactor boundary violations in small PRs.

Monorepo Skills is an open-source set of AI agent skills published by santoshyadavdev for JavaScript and TypeScript monorepos. It includes monorepo-doctor, a read-only audit skill, and monorepo-boundaries-cleanup, a refactoring workflow. Installation is through the skills CLI, and the docs live at monorepo-skills.dev.

## What It Is

Monorepo Skills packages agent instructions that an AI coding agent follows inside a monorepo. monorepo-doctor works with npm, yarn, pnpm and bun workspaces, with deeper rules for Nx and Turborepo. It runs deterministic detection, source scanning and five independent audits, then writes an evidence-backed report in Markdown and JSON.

The companion skill, monorepo-boundaries-cleanup, takes boundary violations found by monorepo-doctor or by a linter such as turbo boundaries, Nx enforce-module-boundaries or dependency-cruiser. It fixes them in small PRs against a baseline and stops after each PR to wait for your CI report.

## What the Audit Checks

- Package boundaries: deep imports, unlisted or unused dependencies, and missing Nx/Turbo boundary enforcement.
- Circular dependencies: package-level and file-level cycles, with severity based on whether a binding is read during module evaluation.
- Task caching: missing outputs, undeclared env vars, volatile inputs and dependency-blind test caches.
- CI test coverage: missing test commands, shallow checkouts for affected runs, missing Nx base refs and undeclared workspace dependencies.
- Production leakage: test files, fixtures or test libraries that can ship in package tarballs or deployable builds.

## Guarantees and Setup

monorepo-doctor is read-only: it must not install dependencies, build, run tests or edit project files, and writes only its reports and a work directory. Reports go to a temp directory by default or to a directory you name. Severities run from critical to low, and a CI mode can fail a run at a chosen threshold through a separate workflow step. Node 22.5 or later is required. The snippets need a POSIX shell (macOS, Linux or WSL). Without node_modules or local Nx/Turbo binaries, some sub-checks are skipped or marked partial. knip and Nx load repository configuration that can execute code, so the skill should only run on trusted repositories.

The cleanup skill, by contrast, edits code and opens PRs.

## Features
- Read-only monorepo audit
- Package boundary checks
- Circular dependency detection
- Nx and Turborepo cache analysis
- CI test coverage checks
- Test-code-in-production detection
- Markdown and JSON reports
- CI severity threshold mode
- Boundary cleanup via small PRs against a baseline
- llms.txt for agents

## Integrations
Nx, Turborepo, npm, yarn, pnpm, bun, knip, publint, dependency-cruiser, GitHub Actions, Claude Code, Copilot CLI

## Platforms
MACOS, LINUX, API, CLI

## Pricing
Open Source

## Links
- Website: https://monorepo-skills.dev
- Documentation: https://monorepo-skills.dev/getting-started/
- Repository: https://github.com/santoshyadavdev/monorepo-doctor
- EveryDev.ai: https://www.everydev.ai/tools/monorepo-skills
