monorepo-architecture
БесплатноБез исполняемых скриптовНе проверенUse when designing monorepo structure, organizing packages, or migrating to monorepo architecture with architectural patterns for managing dependencies and…
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
Monorepo Architecture Skill
Overview
This skill provides comprehensive guidance on designing and structuring monorepos, including workspace organization, dependency management, versioning strategies, and architectural patterns that scale from small projects to enterprise applications.
Monorepo vs Polyrepo
When to Choose Monorepo
A monorepo is beneficial when:
- Code sharing is frequent: Multiple projects share common libraries, utilities, or components
- Atomic changes needed: Changes span multiple packages and need to be deployed together
- Unified tooling: All projects benefit from consistent linting, testing, and build processes
- Team collaboration: Teams work across project boundaries and need visibility into related code
- Version synchronization: Related packages should maintain version alignment
- Refactoring at scale: Large-scale refactoring across projects is common
- Single source of truth: All code, documentation, and tooling in one place
When to Choose Polyrepo
A polyrepo is beneficial when:
- Independent release cycles: Projects deploy on completely different schedules
- Different tech stacks: Projects use incompatible tooling or languages
- Access control: Different teams need isolated access to separate codebases
- Repository size concerns: Combined codebase would be too large to manage efficiently
- External dependencies: Projects are maintained by different organizations
- Simple project structure: Overhead of monorepo tooling outweighs benefits
Tradeoffs
Monorepo Advantages:
- Simplified dependency management
- Easier refactoring across boundaries
- Consistent tooling and standards
- Better code discoverability
- Atomic commits across projects
- Single CI/CD pipeline
Monorepo Challenges:
- Repository size growth
- CI/CD complexity
- Build time management
- Git performance at scale
- Tooling requirements
- Learning curve for developers
Repository Structure Patterns
Package-Based Structure
Organize by technical layer or package type.
my-monorepo/
├── apps/
│ ├── web/ # Next.js web application
│ ├── mobile/ # React Native app
│ └── api/ # Node.js API server
├── packages/
│ ├── ui/ # Shared UI components
│ ├── utils/ # Shared utilities
│ ├── config/ # Shared configurations
│ └── types/ # Shared TypeScript types
├── services/
│ ├── auth/ # Authentication service
│ ├── payments/ # Payment processing
│ └── notifications/ # Notification service
└── tooling/
├── eslint-config/ # ESLint configuration
└── tsconfig/ # TypeScript configuration
Best for: Technical separation, shared library focus, platform diversity.
Domain-Based Structure
Organize by business domain or feature.
my-monorepo/
├── domains/
│ ├── user/
│ │ ├── api/ # User API
│ │ ├── web/ # User web UI
│ │ ├── mobile/ # User mobile UI
│ │ └── shared/ # User shared code
│ ├── billing/
│ │ ├── api/
│ │ ├── web/
│ │ └── shared/
│ └── analytics/
│ ├── api/
│ ├── web/
│ └── shared/
└── shared/
├── ui/ # Cross-domain UI components
├── utils/ # Cross-domain utilities
└── config/ # Cross-domain config
Best for: Domain-driven design, team ownership by feature, microservices architecture.
Hybrid Structure
Combine package-based and domain-based approaches.
my-monorepo/
├── apps/
│ ├── customer-portal/ # Customer-facing app
│ └── admin-dashboard/ # Admin app
├── features/
│ ├── auth/ # Authentication feature
│ ├── checkout/ # Checkout feature
│ └── inventory/ # Inventory feature
├── packages/
│ ├── ui/ # Shared UI library
│ ├── api-client/ # API client library
│ └── analytics/ # Analytics library
└── infrastructure/
├── database/ # Database utilities
├── messaging/ # Message queue
└── deployment/ # Deployment configs
Best for: Complex organizations, balancing technical and domain concerns.
Workspace Configuration
NPM Workspaces
Basic workspace setup using native NPM workspaces.
{
"name": "my-monorepo",
"private": true,
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"dev": "npm run dev --workspaces",
"build": "npm run build --workspaces",
"test": "npm run test --workspaces"
},
"devDependencies": {
"typescript": "^5.3.0",
"eslint": "^8.54.0"
}
}
Key Features:
- Native NPM support (v7+)
- Simple configuration
- Automatic workspace linking
- Shared dependency hoisting
- Workspace-specific commands
Yarn Workspaces
Yarn's workspace implementation wi
Установить monorepo-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepFAQ
Что делает скилл monorepo-architecture?
Use when designing monorepo structure, organizing packages, or migrating to monorepo architecture with architectural patterns for managing dependencies and scalable workspace configurations.
Как установить скилл monorepo-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл monorepo-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic