Skip to content
Skillv1.0.0

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.

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/nx/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill nx. Copyright stays with the author (Apache-2.0).

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-nx/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-nx.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-nx",
  "kind": "skill",
  "name": "nx",
  "description": "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.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "nx",
      "monorepo",
      "build",
      "cache",
      "workspace",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/nx/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/nx/SKILL.md",
      "key": "terminalskills/skills/skills/nx/SKILL.md"
    },
    "compatibility": "Node.js, any framework",
    "license": "Apache-2.0"
  },
  "instructions": "# Nx\n\n## Overview\nNx 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.\n\n## Instructions\n\n### Step 1: Create Workspace\n```bash\nnpx create-nx-workspace@latest my-org --preset=ts\ncd my-org\n```\n\n### Step 2: Add Projects\n```bash\nnx g @nx/react:app my-app\nnx g @nx/js:lib shared-utils\nnx g @nx/node:app api\n```\n\n### Step 3: Run Tasks\n```bash\nnx serve my-app\nnx build api\nnx test shared-utils\nnx affected -t test         # only what ",
  "cost": {
    "context_tokens": 293
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-nx/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.