nx-run-tasks_skill

This skill helps you run and manage Nx workspace tasks like build, test, lint, and serve across projects efficiently.
  • TypeScript

28k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill nrwl/nx --skill nx-run-tasks

  • SKILL.md2.4 KB

Overview

This skill helps you run tasks in an Nx workspace reliably and efficiently. It guides which tasks exist, how to execute a single task, run many tasks in parallel, and run only affected tasks. It also recommends package manager handling and useful Nx flags for CI and local runs.

How this skill works

The skill inspects workspace metadata (project.json, package.json, and Nx inferred targets) and suggests the correct nx commands: nx run, nx run-many, and nx affected. It determines whether to prefix commands with npx/pnpm/yarn based on the repo's package manager files. It also explains key flags like --skipNxCache, --nxBail, and --configuration to tune execution.

When to use it

  • Run a single project's build, test, lint, or serve target (nx run <project>:<task>).
  • Execute the same target across many projects (nx run-many -t ...).
  • Limit work to changed projects in CI or pre-merge checks (nx affected -t ...).
  • Force reruns, get verbose logs, or stop early on failure using useful flags.
  • When you need to detect available targets with nx show project <name> --json.

Best practices

  • Check nx show project <project> --json to list available targets before running commands.
  • Use the repo's package manager prefix (npx/pnpm/yarn) if nx is not installed globally.
  • Prefer nx affected in CI to run tasks only for changed and dependent projects.
  • Use --skipNxCache sparingly; rely on Nx cache for faster repeatable runs.
  • Use --nxBail to fail fast in pipelines and --parallel to speed up run-many where safe.

Example use cases

  • Run a single app's tests: nx run myapp:test (or with npx if no global nx).
  • Test a subset of projects: nx run-many -t test -p proj1 proj2 --parallel=5.
  • CI optimization: nx affected -t build test --base=main --head=HEAD to build only changed projects.
  • Debug a failing target with verbose logs: nx run lib:build --verbose.
  • Exclude projects: nx run-many -t lint --projects=*-app --exclude=internal-app.

FAQ

Run nx show project <projectname> --json and inspect the targets section; package.json and project.json can also help but may miss inferred targets.

Do I always need nx installed globally?

No. If nx isn't global, prefix commands with npx, pnpx, or yarn based on the repository's package manager files.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
nx-run-tasks skill by nrwl/nx | VeilStrat