monorepo
Monorepo Architecture
Use this skill to create predictable package boundaries, shared tooling, and fast incremental builds.
Use This Skill When
- Multiple apps share code and release cadence.
- You need shared packages (
ui,types,config,utils). - Build/test/lint pipelines need workspace-level orchestration.
Core Contract
- Keep deployable apps in
apps/. - Keep reusable packages in
packages/. - Use workspace protocol dependencies (
workspace:*). - Use Turbo pipelines for dependency-aware task execution.
- Keep environment variables explicit per app/package boundary.
Recommended Structure
apps/
packages/
turbo.json
pnpm-workspace.yaml
package.json
Implementation Workflow
1) Workspace Setup
- Configure
pnpm-workspace.yaml. - Define root scripts for
dev,build,lint,test. - Add Turbo pipeline with
dependsOnandoutputs.
2) Shared Packages
- Create
packages/ui,packages/types,packages/config. - Export public APIs from package roots.
- Keep package boundaries strict and testable.
3) App Integration
- Consume shared packages via workspace deps.
- Keep app-specific runtime config local to app.
- Avoid hidden coupling through root-only env assumptions.
4) Operational Quality
- Cache-friendly tasks and deterministic outputs.
- Per-package ownership and CI filters.
- Versioning/release strategy documented.
Output Requirements for Agent
- Folder layout proposal.
- Workspace and Turbo config.
- Shared package strategy.
- CI/build command matrix.
References
- Detailed setup files and command examples:
references/guide.md
More from alicoder001/agent-skills
reasoning
Chain-of-thought reasoning, self-reflection, and systematic problem-solving patterns for AI agents. Use before any complex task to ensure logical and accurate solutions.
38typescript
TypeScript strict mode patterns, naming conventions, and type safety rules. Use when writing TypeScript code, defining types, or reviewing TypeScript projects. Includes generics, utility types, and best practices.
35collaboration
Multi-agent communication, task delegation, and coordination patterns. Use when working with multiple agents or complex collaborative workflows.
27solid
SOLID, DRY, KISS, and clean code principles for TypeScript applications. Use when designing scalable architecture, writing maintainable code, or reviewing code quality.
25security
Security best practices for web applications. Use when handling user input, authentication, or sensitive data. Covers XSS, SQL injection, CSRF, environment variables, and secure coding patterns.
22memory
Working memory management, context prioritization, and knowledge retention patterns for AI agents. Use when you need to maintain relevant context and avoid information loss during long tasks.
22