nx-run-tasks
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.
Security Assessment
About nx-run-tasks
The nx-run-tasks skill helps users execute tasks within an Nx workspace, providing guidance for running builds, tests, linting, serving applications, and other workspace-defined targets. It addresses the challenge of managing and executing tasks across single or multiple projects in monorepos by leveraging Nx task execution commands. The skill also helps users identify available targets by inspecting project definitions through Nx commands, ensuring that both explicitly defined and inferred tasks can be discovered and executed correctly.
Its capabilities include running individual tasks for specific projects, executing the same task across multiple projects, and targeting only affected projects based on source code changes. The skill supports common Nx workflows such as task filtering by project, excluding projects, pattern-based project selection, tag-based project selection, and controlling parallel execution. It also provides guidance on useful execution flags, including cache bypassing, verbose output, fail-fast behavior, and configuration selection. Additionally, it highlights the importance of using the correct package manager command prefix when Nx is not installed globally.
This skill is useful for developers, DevOps engineers, and teams working in Nx-based monorepos who need to run and manage workspace tasks efficiently. It is particularly valuable in continuous integration environments, large repositories where affected-project execution can reduce build times, and development workflows that require running tasks across multiple applications or libraries. Users can also leverage it to explore available project targets and obtain additional command details through built-in help options.
FAQ
How can I see which tasks are available for a project?
Use the Nx project inspection command to view project information, including the targets section that lists runnable tasks. This helps identify both defined and inferred tasks.
Can I run the same task for multiple projects at once?
Yes. The skill supports Nx commands that execute one or more tasks across multiple projects, with options to filter, exclude, or match projects by patterns and tags.
How do I run tasks only for projects affected by recent changes?
Use the affected-project workflow, which runs tasks only on changed projects and their dependents. Comparisons can be based on branches or specific files.
Do I need Nx installed globally?
Not necessarily. Depending on the workspace setup, commands may need to be prefixed with the appropriate package manager tool such as npx, pnpx, or yarn.
What execution options are supported?
The skill covers common Nx execution flags, including cache bypassing, verbose logging, stopping after the first failure, and selecting a specific configuration.
Install nx-run-tasks
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nrwl/nx-ai-agents-config