nx-run-tasks
What it does
This skill runs common development tasks in an Nx workspace, such as build, test, and lint. It is for developers who work in monorepos and want to run the right tasks quickly.
When to use it
- βWhen you want to run tests, a build, or a lint for one project in an Nx workspace.
- βWhen you want to run a task across many projects or only the ones affected by a change.
- βWhen you need to start a project's development server.
Skill link
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/nx-run-tasks/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you run the tests for only the projects my changes affect in this Nx workspace?β
5 new skills a week. 1 minute to read.
How it works
The agent checks which tasks each project has, then runs a single task, a group of tasks, or the affected projects with the right Nx command. It can limit runs to certain projects and control how many run in parallel.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
You can run tasks with Nx in the following way.
Keep in mind that you might have to prefix things with npx/pnpx/yarn if the user doesn't have nx installed globally. Look at the package.json or lockfile to determine which package manager is in use.
For more details on any command, run it with --help (e.g. nx run-many --help, nx affected --help).
Understand which tasks can be run
You can check those via nx show project <projectname> --json, for example nx show project myapp --json. It contains a targets section which has information about targets that can be run. You can also just look at the package.json scripts or project.json targets, but you might miss out on inferred tasks by Nx plugins.
Run a single task
nx run <project>:<task>
where project is the project name defined in package.json or project.json (if present).
Run multiple tasks
nx run-many -t build test lint typecheck
You can pass a -p flag to filter to specific projects, otherwise it runs on all projects. You can also use --exclude to exclude projects, and --parallel to control the number of parallel processes (default is 3).
Examples:
nx run-many -t test -p proj1 proj2β test specific projectsnx run-many -t test --projects=*-app --exclude=excluded-appβ test projects matching a patternnx run-many -t test --projects=tag:api-*β test projects by tag
Run tasks for affected projects
Use nx affected to only run tasks on projects that have been changed and projects that depend on changed projects. This is especially useful in CI and for large workspaces.
nx affected -t build test lint
By default it compares against the base branch. You can customize this:
nx affected -t test --base=main --head=HEADβ compare against a specific base and headnx affected -t test --files=libs/mylib/src/index.tsβ specify changed files directly
Useful flags
These flags work with run, run-many, and affected:
--skipNxCacheβ rerun tasks even when results are cached--verboseβ print additional information such as stack traces--nxBailβ stop execution after the first failed task--configuration=<name>β use a specific configuration (e.g.production)
FAQ
Do I need Nx installed?
Not necessarily. The agent can use npx, pnpx, or yarn, depending on the lock file.
How does it find available tasks?
It reads the project configuration with Nx, which also finds tasks inferred by plugins.
Is it for code generation?
No. Code generation is handled by a separate Nx generator skill.
Details
Original description by the author
Execute build, test, lint, serve, and other tasks in an Nx workspace using single runs, run-many, and affected commands. Use when user says "run tests", "build my app", "lint affected", "serve the project", "run all tasks", or "nx affected". Do NOT use for code generation (use nx-generate) or workspace configuration (use nx-workspace).
Popularity
- GitHub stars
- 7.1k
- Ranking position
- #13573
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
component-common-domain-detection
7.1kHelps your agent find business logic that is repeated across several parts of a codebase and suggests how to combine it.
component-flattening-analysis
7.1kHelps your agent find misplaced code and flatten messy component folder structures, so each piece sits where it belongs.
component-identification-sizing
7.1kHelps your agent map the parts of a codebase and measure their size, to find which module to split first.
coupling-analysis
7.1kHelps your agent check how tightly parts of a codebase depend on each other, and which connections to loosen first.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.