{"id":"nx-workspace-patterns","name":"nx-workspace-patterns","summary":"Nxモノレポワークスペースの設定と最適化。Nxの設定、プロジェクト境界の設定、ビルドキャッシュの最適化、影響を受けるコマンドの実装時に利用します。","body":"# Nx Workspace Patterns\n\nProduction patterns for Nx monorepo management.\n\n## When to Use This Skill\n\n- Setting up new Nx workspaces\n- Configuring project boundaries\n- Optimizing CI with affected commands\n- Implementing remote caching\n- Managing dependencies between projects\n- Migrating to Nx\n\n## Core Concepts\n\n### 1. Nx Architecture\n\n```\nworkspace/\n├── apps/              # Deployable applications\n│   ├── web/\n│   └── api/\n├── libs/              # Shared libraries\n│   ├── shared/\n│   │   ├── ui/\n│   │   └── utils/\n│   └── feature/\n│       ├── auth/\n│       └── dashboard/\n├── tools/             # Custom executors/generators\n├── nx.json            # Nx configuration\n└── workspace.json     # Project configuration\n```\n\n### 2. Library Types\n\n| Type            | Purpose                          | Example             |\n| --------------- | -------------------------------- | ------------------- |\n| **feature**     | Smart components, business logic | `feature-auth`      |\n| **ui**          | Presentational components        | `ui-buttons`        |\n| **data-access** | API calls, state management      | `data-access-users` |\n| **util**        | Pure functions, helpers          | `util-formatting`   |\n| **shell**       | App bootstrapping                | `shell-web`         |\n\n## Templates and detailed worked examples\n\nFull template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.\n\n## Best Practices\n\n### Do's\n\n- **Use tags consistently** - Enforce with module boundaries\n- **Enable caching early** - Significant CI savings\n- **Keep libs focused** - Single responsibility\n- **Use generators** - Ensure consistency\n- **Document boundaries** - Help new developers\n\n### Don'ts\n\n- **Don't create circular deps** - Graph should be acyclic\n- **Don't skip affected** - Test only what changed\n- **Don't ignore boundaries** - Tech debt accumulates\n- **Don't over-granularize** - Balance lib count","author":"@wshobson","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/wshobson/agents/tree/main/plugins/developer-essentials/skills/nx-workspace-patterns","license":"MIT","category":"design","lang":"en","tokens":458,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/details.md","size":8786,"sha256":"c799667de35c2a3134c79eb6e2e8c057b0759f03a8551e3193ba0ac503454980"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}