본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)29k · #9593

monorepo-navigator

하는 일

이 스킬은 한 저장소 안의 여러 관련 코드 패키지를 정리하고 빌드 속도를 높이도록 돕습니다. 여러 앱이 코드를 공유하면서 모든 것을 다시 빌드하고 싶지 않은 팀에 맞습니다.

사용하는 경우

  • ✓여러 앱이나 패키지가 코드를 공유하고 빌드가 느릴 때.
  • ✓변경에 영향을 받는 패키지만 빌드하고 테스트하고 싶을 때.
  • ✓여러 개의 별도 저장소를 하나의 모노레포로 옮기고 있을 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/monorepo-navigator/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/monorepo-navigator/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“세 개의 앱과 하나의 공유 UI 패키지를 위해 Turborepo를 설정해서, 바뀐 부분만 다시 빌드되게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 어떤 패키지가 어떤 패키지에 의존하는지 지도를 만들고, 변경이 영향을 주는 부분을 찾은 뒤, 그 패키지에서만 실행되는 명령을 설정합니다. 원하면 빌드 캐싱도 설정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Monorepo Navigator

Tier: POWERFUL
Category: Engineering
Domain: Monorepo Architecture / Build Systems


Overview

Navigate, manage, and optimize monorepos. Covers Turborepo, Nx, pnpm workspaces, and Lerna. Enables cross-package impact analysis, selective builds/tests on affected packages only, remote caching, dependency graph visualization, and structured migrations from multi-repo to monorepo. Includes Claude Code configuration for workspace-aware development.


Core Capabilities

  • Cross-package impact analysis — determine which apps break when a shared package changes
  • Selective commands — run tests/builds only for affected packages (not everything)
  • Dependency graph — visualize package relationships as Mermaid diagrams
  • Build optimization — remote caching, incremental builds, parallel execution
  • Migration — step-by-step multi-repo → monorepo with zero history loss
  • Publishing — changesets for versioning, pre-release channels, npm publish workflows
  • Claude Code config — workspace-aware CLAUDE.md with per-package instructions

When to Use

Use when:

  • Multiple packages/apps share code (UI components, utils, types, API clients)
  • Build times are slow because everything rebuilds when anything changes
  • Migrating from multiple repos to a single repo
  • Need to publish packages to npm with coordinated versioning
  • Teams work across multiple packages and need unified tooling

Skip when:

  • Single-app project with no shared packages
  • Team/project boundaries are completely isolated (polyrepo is fine)
  • Shared code is minimal and copy-paste overhead is acceptable

Tool Selection

Tool Best For Key Feature
Turborepo JS/TS monorepos, simple pipeline config Best-in-class remote caching, minimal config
Nx Large enterprises, plugin ecosystem Project graph, code generation, affected commands
pnpm workspaces Workspace protocol, disk efficiency workspace:* for local package refs
Lerna npm publishing, versioning Batch publishing, conventional commits
Changesets Modern versioning (preferred over Lerna) Changelog generation, pre-release channels

Most modern setups: pnpm workspaces + Turborepo + Changesets


Turborepo

→ See references/monorepo-tooling-reference.md for details

Workspace Analyzer

python3 scripts/monorepo_analyzer.py /path/to/monorepo
python3 scripts/monorepo_analyzer.py /path/to/monorepo --json

Also see references/monorepo-patterns.md for common architecture and CI patterns.

Common Pitfalls

Pitfall Fix
Running turbo run build without --filter on every PR Always use --filter=...[origin/main] in CI
workspace:* refs cause publish failures Use pnpm changeset publish — it replaces workspace:* with real versions automatically
All packages rebuild when unrelated file changes Tune inputs in turbo.json to exclude docs, config files from cache keys
Shared tsconfig causes one package to break all type-checks Use extends properly — each package extends root but overrides rootDir / outDir
git history lost during migration Use git filter-repo --to-subdirectory-filter before merging — never move files manually
Remote cache not working in CI Check TURBO_TOKEN and TURBO_TEAM env vars; verify with turbo run build --summarize
CLAUDE.md too generic — Claude modifies wrong package Add explicit "When working on X, only touch files in apps/X" rules per package CLAUDE.md

Best Practices

  1. Root CLAUDE.md defines the map — document every package, its purpose, and dependency rules
  2. Per-package CLAUDE.md defines the rules — what's allowed, what's forbidden, testing commands
  3. Always scope commands with --filter — running everything on every change defeats the purpose
  4. Remote cache is not optional — without it, monorepo CI is slower than multi-repo CI
  5. Changesets over manual versioning — never hand-edit package.json versions in a monorepo
  6. Shared configs in root, extended in packages — tsconfig.base.json, .eslintrc.base.js, jest.base.config.js
  7. Impact analysis before merging shared package changes — run affected check, communicate blast radius
  8. Keep packages/types as pure TypeScript — no runtime code, no dependencies, fast to build and type-check
자주 묻는 질문

어떤 도구를 지원하나요?

Turborepo, Nx, pnpm 워크스페이스, Lerna를 지원합니다.

패키지들이 서로 어떻게 의존하는지 보여 줄 수 있나요?

네. 패키지 의존성 그래프를 다이어그램으로 그릴 수 있습니다.

패키지 배포도 도와주나요?

네. changesets로 버전 관리와 배포 워크플로를 다룹니다.

상세 정보

작성자의 원본 설명

Use for Turborepo, Nx, pnpm-workspace or Lerna setup, affected-only builds, remote caching or a multi-repo to monorepo move. Maps packages and the dependency graph with monorepo_analyzer.py.

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9593
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬