Agent skill
nx
Build and manage monorepos with Nx. Use when a user asks to set up a monorepo, manage multiple packages/apps, cache builds, run affected tests, or migrate from Lerna.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/nx-terminalskills-skills
Metadata
Additional technical details for this skill
- tags
-
nx monorepo build cache workspace
- author
- terminal-skills
- version
- 1.0.0
- category
- development
SKILL.md
Nx
Overview
Nx is a build system for monorepos. It provides computation caching (local + remote), task orchestration, dependency graph, code generators, and affected commands. Works with React, Angular, Node.js, Next.js, and any language.
Instructions
Step 1: Create Workspace
npx create-nx-workspace@latest my-org --preset=ts
cd my-org
Step 2: Add Projects
nx g @nx/react:app my-app
nx g @nx/js:lib shared-utils
nx g @nx/node:app api
Step 3: Run Tasks
nx serve my-app
nx build api
nx test shared-utils
nx affected -t test # only what changed
nx run-many -t build test # everything
Step 4: nx.json Configuration
// nx.json — Workspace configuration
{
"targetDefaults": {
"build": { "dependsOn": ["^build"], "cache": true },
"test": { "cache": true },
"lint": { "cache": true }
}
}
Guidelines
- Nx caches task results — second run is instant if inputs haven't changed.
- Use nx affected in CI to only build/test what changed in a PR.
- Nx Cloud provides remote caching — share cache across team/CI.
- Nx works without plugins too — add it to any repo with npx nx init.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?