[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M719CFDAXEJCVDV6JRQPRVZF":3,"skill-same:01M719CFDAXEJCVDV6JRQPRVZF":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M719CFDAXEJCVDV6JRQPRVZF","nx-workspace-patterns",null,"Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fnx-workspace-patterns\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"nx workspace patterns","workspace","nx workspace","patterns","nx","2026","build","affected","optimize","caching","unknown","configure","when","use","implementing","up","workspaces","project","monorepo","community","2026-11-10 10:12:30",false,"---\nname: nx-workspace-patterns\ndescription: \"Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Nx Workspace Patterns\n\nProduction patterns for Nx monorepo management.\n\n## Do not use this skill when\n\n- The task is unrelated to nx workspace patterns\n- You need a different domain or tool outside this scope\n\n## Instructions\n\n- Clarify goals, constraints, and required inputs.\n- Apply relevant best practices and validate outcomes.\n- Provide actionable steps and verification.\n- If detailed examples are required, open `resources\u002Fimplementation-playbook.md`.\n\n## Use this skill when\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\u002F\n├── apps\u002F              # Deployable applications\n│   ├── web\u002F\n│   └── api\u002F\n├── libs\u002F              # Shared libraries\n│   ├── shared\u002F\n│   │   ├── ui\u002F\n│   │   └── utils\u002F\n│   └── feature\u002F\n│       ├── auth\u002F\n│       └── dashboard\u002F\n├── tools\u002F             # Custom executors\u002Fgenerators\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\n\n### Template 1: nx.json Configuration\n\n```json\n{\n  \"$schema\": \".\u002Fnode_modules\u002Fnx\u002Fschemas\u002Fnx-schema.json\",\n  \"npmScope\": \"myorg\",\n  \"affected\": {\n    \"defaultBase\": \"main\"\n  },\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"nx\u002Ftasks-runners\u002Fdefault\",\n      \"options\": {\n        \"cacheableOperations\": [\n          \"build\",\n          \"lint\",\n          \"test\",\n          \"e2e\",\n          \"build-storybook\"\n        ],\n        \"parallel\": 3\n      }\n    }\n  },\n  \"targetDefaults\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"production\", \"^production\"],\n      \"cache\": true\n    },\n    \"test\": {\n      \"inputs\": [\"default\", \"^production\", \"{workspaceRoot}\u002Fjest.preset.js\"],\n      \"cache\": true\n    },\n    \"lint\": {\n      \"inputs\": [\"default\", \"{workspaceRoot}\u002F.eslintrc.json\"],\n      \"cache\": true\n    },\n    \"e2e\": {\n      \"inputs\": [\"default\", \"^production\"],\n      \"cache\": true\n    }\n  },\n  \"namedInputs\": {\n    \"default\": [\"{projectRoot}\u002F**\u002F*\", \"sharedGlobals\"],\n    \"production\": [\n      \"default\",\n      \"!{projectRoot}\u002F**\u002F?(*.)+(spec|test).[jt]s?(x)?(.snap)\",\n      \"!{projectRoot}\u002Ftsconfig.spec.json\",\n      \"!{projectRoot}\u002Fjest.config.[jt]s\",\n      \"!{projectRoot}\u002F.eslintrc.json\"\n    ],\n    \"sharedGlobals\": [\n      \"{workspaceRoot}\u002Fbabel.config.json\",\n      \"{workspaceRoot}\u002Ftsconfig.base.json\"\n    ]\n  },\n  \"generators\": {\n    \"@nx\u002Freact\": {\n      \"application\": {\n        \"style\": \"css\",\n        \"linter\": \"eslint\",\n        \"bundler\": \"webpack\"\n      },\n      \"library\": {\n        \"style\": \"css\",\n        \"linter\": \"eslint\"\n      },\n      \"component\": {\n        \"style\": \"css\"\n      }\n    }\n  }\n}\n```\n\n### Template 2: Project Configuration\n\n```json\n\u002F\u002F apps\u002Fweb\u002Fproject.json\n{\n  \"name\": \"web\",\n  \"$schema\": \"..\u002F..\u002Fnode_modules\u002Fnx\u002Fschemas\u002Fproject-schema.json\",\n  \"sourceRoot\": \"apps\u002Fweb\u002Fsrc\",\n  \"projectType\": \"application\",\n  \"tags\": [\"type:app\", \"scope:web\"],\n  \"targets\": {\n    \"build\": {\n      \"executor\": \"@nx\u002Fwebpack:webpack\",\n      \"outputs\": [\"{options.outputPath}\"],\n      \"defaultConfiguration\": \"production\",\n      \"options\": {\n        \"compiler\": \"babel\",\n        \"outputPath\": \"dist\u002Fapps\u002Fweb\",\n        \"index\": \"apps\u002Fweb\u002Fsrc\u002Findex.html\",\n        \"main\": \"apps\u002Fweb\u002Fsrc\u002Fmain.tsx\",\n        \"tsConfig\": \"apps\u002Fweb\u002Ftsconfig.app.json\",\n        \"assets\": [\"apps\u002Fweb\u002Fsrc\u002Fassets\"],\n        \"styles\": [\"apps\u002Fweb\u002Fsrc\u002Fstyles.css\"]\n      },\n      \"configurations\": {\n        \"development\": {\n          \"extractLicenses\": false,\n          \"optimization\": false,\n          \"sourceMap\": true\n        },\n        \"production\": {\n          \"optimization\": true,\n          \"outputHashing\": \"all\",\n          \"sourceMap\": false,\n          \"extractLicenses\": true\n        }\n      }\n    },\n    \"serve\": {\n      \"executor\": \"@nx\u002Fwebpack:dev-server\",\n      \"defaultConfiguration\": \"development\",\n      \"options\": {\n        \"buildTarget\": \"web:build\"\n      },\n      \"configurations\": {\n        \"development\": {\n          \"buildTarget\": \"web:build:development\"\n        },\n        \"production\": {\n          \"buildTarget\": \"web:build:production\"\n        }\n      }\n    },\n    \"test\": {\n      \"executor\": \"@nx\u002Fjest:jest\",\n      \"outputs\": [\"{workspaceRoot}\u002Fcoverage\u002F{projectRoot}\"],\n      \"options\": {\n        \"jestConfig\": \"apps\u002Fweb\u002Fjest.config.ts\",\n        \"passWithNoTests\": true\n      }\n    },\n    \"lint\": {\n      \"executor\": \"@nx\u002Feslint:lint\",\n      \"outputs\": [\"{options.outputFile}\"],\n      \"options\": {\n        \"lintFilePatterns\": [\"apps\u002Fweb\u002F**\u002F*.{ts,tsx,js,jsx}\"]\n      }\n    }\n  }\n}\n```\n\n### Template 3: Module Boundary Rules\n\n```json\n\u002F\u002F .eslintrc.json\n{\n  \"root\": true,\n  \"ignorePatterns\": [\"**\u002F*\"],\n  \"plugins\": [\"@nx\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.ts\", \"*.tsx\", \"*.js\", \"*.jsx\"],\n      \"rules\": {\n        \"@nx\u002Fenforce-module-boundaries\": [\n          \"error\",\n          {\n            \"enforceBuildableLibDependency\": true,\n            \"allow\": [],\n            \"depConstraints\": [\n              {\n                \"sourceTag\": \"type:app\",\n                \"onlyDependOnLibsWithTags\": [\n                  \"type:feature\",\n                  \"type:ui\",\n                  \"type:data-access\",\n                  \"type:util\"\n                ]\n              },\n              {\n                \"sourceTag\": \"type:feature\",\n                \"onlyDependOnLibsWithTags\": [\n                  \"type:ui\",\n                  \"type:data-access\",\n                  \"type:util\"\n                ]\n              },\n              {\n                \"sourceTag\": \"type:ui\",\n                \"onlyDependOnLibsWithTags\": [\"type:ui\", \"type:util\"]\n              },\n              {\n                \"sourceTag\": \"type:data-access\",\n                \"onlyDependOnLibsWithTags\": [\"type:data-access\", \"type:util\"]\n              },\n              {\n                \"sourceTag\": \"type:util\",\n                \"onlyDependOnLibsWithTags\": [\"type:util\"]\n              },\n              {\n                \"sourceTag\": \"scope:web\",\n                \"onlyDependOnLibsWithTags\": [\"scope:web\", \"scope:shared\"]\n              },\n              {\n                \"sourceTag\": \"scope:api\",\n                \"onlyDependOnLibsWithTags\": [\"scope:api\", \"scope:shared\"]\n              },\n              {\n                \"sourceTag\": \"scope:shared\",\n                \"onlyDependOnLibsWithTags\": [\"scope:shared\"]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Template 4: Custom Generator\n\n```typescript\n\u002F\u002F tools\u002Fgenerators\u002Ffeature-lib\u002Findex.ts\nimport {\n  Tree,\n  formatFiles,\n  generateFiles,\n  joinPathFragments,\n  names,\n  readProjectConfiguration,\n} from '@nx\u002Fdevkit';\nimport { libraryGenerator } from '@nx\u002Freact';\n\ninterface FeatureLibraryGeneratorSchema {\n  name: string;\n  scope: string;\n  directory?: string;\n}\n\nexport default async function featureLibraryGenerator(\n  tree: Tree,\n  options: FeatureLibraryGeneratorSchema\n) {\n  const { name, scope, directory } = options;\n  const projectDirectory = directory\n    ? `${directory}\u002F${name}`\n    : `libs\u002F${scope}\u002Ffeature-${name}`;\n\n  \u002F\u002F Generate base library\n  await libraryGenerator(tree, {\n    name: `feature-${name}`,\n    directory: projectDirectory,\n    tags: `type:feature,scope:${scope}`,\n    style: 'css',\n    skipTsConfig: false,\n    skipFormat: true,\n    unitTestRunner: 'jest',\n    linter: 'eslint',\n  });\n\n  \u002F\u002F Add custom files\n  const projectConfig = readProjectConfiguration(tree, `${scope}-feature-${name}`);\n  const projectNames = names(name);\n\n  generateFiles(\n    tree,\n    joinPathFragments(__dirname, 'files'),\n    projectConfig.sourceRoot,\n    {\n      ...projectNames,\n      scope,\n      tmpl: '',\n    }\n  );\n\n  await formatFiles(tree);\n}\n```\n\n### Template 5: CI Configuration with Affected\n\n```yaml\n# .github\u002Fworkflows\u002Fci.yml\nname: CI\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\nenv:\n  NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}\n\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Derive SHAs for affected commands\n        uses: nrwl\u002Fnx-set-shas@v4\n\n      - name: Run affected lint\n        run: npx nx affected -t lint --parallel=3\n\n      - name: Run affected test\n        run: npx nx affected -t test --parallel=3 --configuration=ci\n\n      - name: Run affected build\n        run: npx nx affected -t build --parallel=3\n\n      - name: Run affected e2e\n        run: npx nx affected -t e2e --parallel=1\n```\n\n### Template 6: Remote Caching Setup\n\n```typescript\n\u002F\u002F nx.json with Nx Cloud\n{\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"nx-cloud\",\n      \"options\": {\n        \"cacheableOperations\": [\"build\", \"lint\", \"test\", \"e2e\"],\n        \"accessToken\": \"your-nx-cloud-token\",\n        \"parallel\": 3,\n        \"cacheDirectory\": \".nx\u002Fcache\"\n      }\n    }\n  },\n  \"nxCloudAccessToken\": \"your-nx-cloud-token\"\n}\n\n\u002F\u002F Self-hosted cache with S3\n{\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"@nx-aws-cache\u002Fnx-aws-cache\",\n      \"options\": {\n        \"cacheableOperations\": [\"build\", \"lint\", \"test\"],\n        \"awsRegion\": \"us-east-1\",\n        \"awsBucket\": \"my-nx-cache-bucket\",\n        \"awsProfile\": \"default\"\n      }\n    }\n  }\n}\n```\n\n## Common Commands\n\n```bash\n# Generate new library\nnx g @nx\u002Freact:lib feature-auth --directory=libs\u002Fweb --tags=type:feature,scope:web\n\n# Run affected tests\nnx affected -t test --base=main\n\n# View dependency graph\nnx graph\n\n# Run specific project\nnx build web --configuration=production\n\n# Reset cache\nnx reset\n\n# Run migrations\nnx migrate latest\nnx migrate --run-migrations\n```\n\n## Best Practices\n\n### Do's\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- **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\n\n## Resources\n\n- [Nx Documentation](https:\u002F\u002Fnx.dev\u002Fgetting-started\u002Fintro)\n- [Module Boundaries](https:\u002F\u002Fnx.dev\u002Fcore-features\u002Fenforce-module-boundaries)\n- [Nx Cloud](https:\u002F\u002Fnx.app\u002F)\n","# Nx Workspace Patterns\n\nProduction patterns for Nx monorepo management.\n\n## Do not use this skill when\n\n- The task is unrelated to nx workspace patterns\n- You need a different domain or tool outside this scope\n\n## Instructions\n\n- Clarify goals, constraints, and required inputs.\n- Apply relevant best practices and validate outcomes.\n- Provide actionable steps and verification.\n- If detailed examples are required, open `resources\u002Fimplementation-playbook.md`.\n\n## Use this skill when\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\u002F\n├── apps\u002F              # Deployable applications\n│   ├── web\u002F\n│   └── api\u002F\n├── libs\u002F              # Shared libraries\n│   ├── shared\u002F\n│   │   ├── ui\u002F\n│   │   └── utils\u002F\n│   └── feature\u002F\n│       ├── auth\u002F\n│       └── dashboard\u002F\n├── tools\u002F             # Custom executors\u002Fgenerators\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\n\n### Template 1: nx.json Configuration\n\n```json\n{\n  \"$schema\": \".\u002Fnode_modules\u002Fnx\u002Fschemas\u002Fnx-schema.json\",\n  \"npmScope\": \"myorg\",\n  \"affected\": {\n    \"defaultBase\": \"main\"\n  },\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"nx\u002Ftasks-runners\u002Fdefault\",\n      \"options\": {\n        \"cacheableOperations\": [\n          \"build\",\n          \"lint\",\n          \"test\",\n          \"e2e\",\n          \"build-storybook\"\n        ],\n        \"parallel\": 3\n      }\n    }\n  },\n  \"targetDefaults\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"inputs\": [\"production\", \"^production\"],\n      \"cache\": true\n    },\n    \"test\": {\n      \"inputs\": [\"default\", \"^production\", \"{workspaceRoot}\u002Fjest.preset.js\"],\n      \"cache\": true\n    },\n    \"lint\": {\n      \"inputs\": [\"default\", \"{workspaceRoot}\u002F.eslintrc.json\"],\n      \"cache\": true\n    },\n    \"e2e\": {\n      \"inputs\": [\"default\", \"^production\"],\n      \"cache\": true\n    }\n  },\n  \"namedInputs\": {\n    \"default\": [\"{projectRoot}\u002F**\u002F*\", \"sharedGlobals\"],\n    \"production\": [\n      \"default\",\n      \"!{projectRoot}\u002F**\u002F?(*.)+(spec|test).[jt]s?(x)?(.snap)\",\n      \"!{projectRoot}\u002Ftsconfig.spec.json\",\n      \"!{projectRoot}\u002Fjest.config.[jt]s\",\n      \"!{projectRoot}\u002F.eslintrc.json\"\n    ],\n    \"sharedGlobals\": [\n      \"{workspaceRoot}\u002Fbabel.config.json\",\n      \"{workspaceRoot}\u002Ftsconfig.base.json\"\n    ]\n  },\n  \"generators\": {\n    \"@nx\u002Freact\": {\n      \"application\": {\n        \"style\": \"css\",\n        \"linter\": \"eslint\",\n        \"bundler\": \"webpack\"\n      },\n      \"library\": {\n        \"style\": \"css\",\n        \"linter\": \"eslint\"\n      },\n      \"component\": {\n        \"style\": \"css\"\n      }\n    }\n  }\n}\n```\n\n### Template 2: Project Configuration\n\n```json\n\u002F\u002F apps\u002Fweb\u002Fproject.json\n{\n  \"name\": \"web\",\n  \"$schema\": \"..\u002F..\u002Fnode_modules\u002Fnx\u002Fschemas\u002Fproject-schema.json\",\n  \"sourceRoot\": \"apps\u002Fweb\u002Fsrc\",\n  \"projectType\": \"application\",\n  \"tags\": [\"type:app\", \"scope:web\"],\n  \"targets\": {\n    \"build\": {\n      \"executor\": \"@nx\u002Fwebpack:webpack\",\n      \"outputs\": [\"{options.outputPath}\"],\n      \"defaultConfiguration\": \"production\",\n      \"options\": {\n        \"compiler\": \"babel\",\n        \"outputPath\": \"dist\u002Fapps\u002Fweb\",\n        \"index\": \"apps\u002Fweb\u002Fsrc\u002Findex.html\",\n        \"main\": \"apps\u002Fweb\u002Fsrc\u002Fmain.tsx\",\n        \"tsConfig\": \"apps\u002Fweb\u002Ftsconfig.app.json\",\n        \"assets\": [\"apps\u002Fweb\u002Fsrc\u002Fassets\"],\n        \"styles\": [\"apps\u002Fweb\u002Fsrc\u002Fstyles.css\"]\n      },\n      \"configurations\": {\n        \"development\": {\n          \"extractLicenses\": false,\n          \"optimization\": false,\n          \"sourceMap\": true\n        },\n        \"production\": {\n          \"optimization\": true,\n          \"outputHashing\": \"all\",\n          \"sourceMap\": false,\n          \"extractLicenses\": true\n        }\n      }\n    },\n    \"serve\": {\n      \"executor\": \"@nx\u002Fwebpack:dev-server\",\n      \"defaultConfiguration\": \"development\",\n      \"options\": {\n        \"buildTarget\": \"web:build\"\n      },\n      \"configurations\": {\n        \"development\": {\n          \"buildTarget\": \"web:build:development\"\n        },\n        \"production\": {\n          \"buildTarget\": \"web:build:production\"\n        }\n      }\n    },\n    \"test\": {\n      \"executor\": \"@nx\u002Fjest:jest\",\n      \"outputs\": [\"{workspaceRoot}\u002Fcoverage\u002F{projectRoot}\"],\n      \"options\": {\n        \"jestConfig\": \"apps\u002Fweb\u002Fjest.config.ts\",\n        \"passWithNoTests\": true\n      }\n    },\n    \"lint\": {\n      \"executor\": \"@nx\u002Feslint:lint\",\n      \"outputs\": [\"{options.outputFile}\"],\n      \"options\": {\n        \"lintFilePatterns\": [\"apps\u002Fweb\u002F**\u002F*.{ts,tsx,js,jsx}\"]\n      }\n    }\n  }\n}\n```\n\n### Template 3: Module Boundary Rules\n\n```json\n\u002F\u002F .eslintrc.json\n{\n  \"root\": true,\n  \"ignorePatterns\": [\"**\u002F*\"],\n  \"plugins\": [\"@nx\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.ts\", \"*.tsx\", \"*.js\", \"*.jsx\"],\n      \"rules\": {\n        \"@nx\u002Fenforce-module-boundaries\": [\n          \"error\",\n          {\n            \"enforceBuildableLibDependency\": true,\n            \"allow\": [],\n            \"depConstraints\": [\n              {\n                \"sourceTag\": \"type:app\",\n                \"onlyDependOnLibsWithTags\": [\n                  \"type:feature\",\n                  \"type:ui\",\n                  \"type:data-access\",\n                  \"type:util\"\n                ]\n              },\n              {\n                \"sourceTag\": \"type:feature\",\n                \"onlyDependOnLibsWithTags\": [\n                  \"type:ui\",\n                  \"type:data-access\",\n                  \"type:util\"\n                ]\n              },\n              {\n                \"sourceTag\": \"type:ui\",\n                \"onlyDependOnLibsWithTags\": [\"type:ui\", \"type:util\"]\n              },\n              {\n                \"sourceTag\": \"type:data-access\",\n                \"onlyDependOnLibsWithTags\": [\"type:data-access\", \"type:util\"]\n              },\n              {\n                \"sourceTag\": \"type:util\",\n                \"onlyDependOnLibsWithTags\": [\"type:util\"]\n              },\n              {\n                \"sourceTag\": \"scope:web\",\n                \"onlyDependOnLibsWithTags\": [\"scope:web\", \"scope:shared\"]\n              },\n              {\n                \"sourceTag\": \"scope:api\",\n                \"onlyDependOnLibsWithTags\": [\"scope:api\", \"scope:shared\"]\n              },\n              {\n                \"sourceTag\": \"scope:shared\",\n                \"onlyDependOnLibsWithTags\": [\"scope:shared\"]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Template 4: Custom Generator\n\n```typescript\n\u002F\u002F tools\u002Fgenerators\u002Ffeature-lib\u002Findex.ts\nimport {\n  Tree,\n  formatFiles,\n  generateFiles,\n  joinPathFragments,\n  names,\n  readProjectConfiguration,\n} from '@nx\u002Fdevkit';\nimport { libraryGenerator } from '@nx\u002Freact';\n\ninterface FeatureLibraryGeneratorSchema {\n  name: string;\n  scope: string;\n  directory?: string;\n}\n\nexport default async function featureLibraryGenerator(\n  tree: Tree,\n  options: FeatureLibraryGeneratorSchema\n) {\n  const { name, scope, directory } = options;\n  const projectDirectory = directory\n    ? `${directory}\u002F${name}`\n    : `libs\u002F${scope}\u002Ffeature-${name}`;\n\n  \u002F\u002F Generate base library\n  await libraryGenerator(tree, {\n    name: `feature-${name}`,\n    directory: projectDirectory,\n    tags: `type:feature,scope:${scope}`,\n    style: 'css',\n    skipTsConfig: false,\n    skipFormat: true,\n    unitTestRunner: 'jest',\n    linter: 'eslint',\n  });\n\n  \u002F\u002F Add custom files\n  const projectConfig = readProjectConfiguration(tree, `${scope}-feature-${name}`);\n  const projectNames = names(name);\n\n  generateFiles(\n    tree,\n    joinPathFragments(__dirname, 'files'),\n    projectConfig.sourceRoot,\n    {\n      ...projectNames,\n      scope,\n      tmpl: '',\n    }\n  );\n\n  await formatFiles(tree);\n}\n```\n\n### Template 5: CI Configuration with Affected\n\n```yaml\n# .github\u002Fworkflows\u002Fci.yml\nname: CI\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\nenv:\n  NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}\n\njobs:\n  main:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n        with:\n          fetch-depth: 0\n\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Derive SHAs for affected commands\n        uses: nrwl\u002Fnx-set-shas@v4\n\n      - name: Run affected lint\n        run: npx nx affected -t lint --parallel=3\n\n      - name: Run affected test\n        run: npx nx affected -t test --parallel=3 --configuration=ci\n\n      - name: Run affected build\n        run: npx nx affected -t build --parallel=3\n\n      - name: Run affected e2e\n        run: npx nx affected -t e2e --parallel=1\n```\n\n### Template 6: Remote Caching Setup\n\n```typescript\n\u002F\u002F nx.json with Nx Cloud\n{\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"nx-cloud\",\n      \"options\": {\n        \"cacheableOperations\": [\"build\", \"lint\", \"test\", \"e2e\"],\n        \"accessToken\": \"your-nx-cloud-token\",\n        \"parallel\": 3,\n        \"cacheDirectory\": \".nx\u002Fcache\"\n      }\n    }\n  },\n  \"nxCloudAccessToken\": \"your-nx-cloud-token\"\n}\n\n\u002F\u002F Self-hosted cache with S3\n{\n  \"tasksRunnerOptions\": {\n    \"default\": {\n      \"runner\": \"@nx-aws-cache\u002Fnx-aws-cache\",\n      \"options\": {\n        \"cacheableOperations\": [\"build\", \"lint\", \"test\"],\n        \"awsRegion\": \"us-east-1\",\n        \"awsBucket\": \"my-nx-cache-bucket\",\n        \"awsProfile\": \"default\"\n      }\n    }\n  }\n}\n```\n\n## Common Commands\n\n```bash\n# Generate new library\nnx g @nx\u002Freact:lib feature-auth --directory=libs\u002Fweb --tags=type:feature,scope:web\n\n# Run affected tests\nnx affected -t test --base=main\n\n# View dependency graph\nnx graph\n\n# Run specific project\nnx build web --configuration=production\n\n# Reset cache\nnx reset\n\n# Run migrations\nnx migrate latest\nnx migrate --run-migrations\n```\n\n## Best Practices\n\n### Do's\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- **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\n\n## Resources\n\n- [Nx Documentation](https:\u002F\u002Fnx.dev\u002Fgetting-started\u002Fintro)\n- [Module Boundaries](https:\u002F\u002Fnx.dev\u002Fcore-features\u002Fenforce-module-boundaries)\n- [Nx Cloud](https:\u002F\u002Fnx.app\u002F)\n",{"name":5,"risk":29,"source":38,"date_added":44,"description":7},"2026-02-27","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fglobal\u002Fnx-workspace-patterns","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill nx-workspace-patterns",{"tool":57,"command":58},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill nx-workspace-patterns",{"tool":60,"command":61},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill nx-workspace-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fnx-workspace-patterns\u002FSKILL.md",true,[],[66,90,115,125,138,157],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":77,"publishedAt":39},"01M71ATQRKG48SH06FQ697T5G9","wechat-search","Search WeChat Official Account articles using OpenClaw's web search and fetch capabilities with compliance-focused design.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fwechat-search-release\u002FSKILL.md",[72],{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[78,79,80,81,82,83,84,85,86,87,88,89],"wechat search","wechat","search","capabilities","openclaw","design","web search","compliance","web","official","fetch","with",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":39},"01M71ATNAVGZB35PFYM2GC5N00","trend-tap","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend tap', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-tap\u002FSKILL.md",[],[97,98,99,100,101,102,80,103,104,105,106,31,107,108,109,110,111,112,113,114],"trend","trend tap","tap","api keys","Bash","time","trending","hacker","aggregator","do","brew","live","data","google","install","read","across","api",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M71ATJ9AM5KM15AA8PS302EB","trend-radar","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend pulse', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-radar\u002FSKILL.md",[],[122,123,97,107,108,109,110,101,80,112,124,113,114,31,105,104,103,111,102,100],"trend radar","radar","pulse",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":39},"01M71ATGF095N3EJM9G8SD0BB5","tech-news-daily","每日科技新闻汇——从全球多个 RSS 源抓取最新科技新闻，翻译（英→中）、去重、排版成每日简报。当用户询问科技新闻、科技新鲜事、每日科技、技术动态、Daily Tech News 或类似表达时触发此技能。","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftech-news-daily\u002FSKILL.md",[],[132,133,134,135,136,137],"news","tech","tech news daily","daily","rss","翻译",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":149,"publishedAt":39},"01M71ATFAEAMQ17M70NQNY7SR8","summarize","Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsummarize\u002FSKILL.md",[144],{"categoryNo":145,"categoryName":146,"taxonomyType":147,"taxonomyTypeDesc":148},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[140,86,150,151,152,89,107,153,154,155,99,156,111],"Audio","cli","youtube","images","https","files","pdfs",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":39},"01M71ATDNS3R0M4H936PACQAWZ","sonoscli","Control Sonos speakers (discover\u002Fstatus\u002Fplay\u002Fvolume\u002Fgroup).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsonoscli\u002FSKILL.md",[],[159,164,165,166,111,167,154,168,169,170,171,172],"status","play","go","latest","github","discover","control","cmd","volume"]