nx-run-tasks

Execute Nx workspace tasks across multiple projects.

Updated Oct 9, 2024
One-click install
npx skills add https://github.com/pengtoshi/pengtoshi-boilerplate --skill nx-run-tasks-pengtoshi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-run-tasks
Source: https://github.com/pengtoshi/pengtoshi-boilerplate/tree/main/.cursor/skills/nx-run-tasks
Command: npx skills add https://github.com/pengtoshi/pengtoshi-boilerplate --skill nx-run-tasks-pengtoshi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nx workspace tasks can be executed across multiple projects without memorizing complex commands.

Core Features & Use Cases

  • Single-task execution: nx run <project>:<task> to run a specific task.
  • Batch task runs: nx run-many -t <tasks> to run multiple tasks across projects.
  • Affected-based runs: nx affected -t <task> to run tasks only on changed projects.

Quick Start

Ask me to run a specific Nx task for a project, for example: nx run myapp:build.

Frequently Asked Questions about nx-run-tasks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Nx tasks across multiple projects in a monorepo?

Run Nx tasks across multiple projects using batch execution with `nx run-many -t <tasks>` to execute targets across all workspace projects, or use single execution for individual targets.

How do I execute Nx build and test tasks only for changed projects?

Execute Nx affected-based runs using `nx affected -t <task>` to run build, test, or lint tasks exclusively on projects affected by recent changes in your monorepo workspace.

Can I use npx or yarn prefixes when running Nx workspace tasks?

Yes, Nx workspace task execution supports optional command prefixes like npx, pnpx, or yarn to match your package manager setup when running targets across projects.

How does Nx determine available targets for task execution?

Nx task execution inspects `package.json` or `project.json` files within the monorepo workspace to automatically determine available targets and tasks for each project.

What is the best way to batch run lint and test tasks across an Nx workspace?

Batch run lint and test tasks across an Nx workspace using `nx run-many -t <tasks>` to execute multiple targets across all projects efficiently without memorizing complex commands.

Do I need to memorize complex Nx commands to run workspace tasks?

No, you can run Nx workspace tasks without memorizing complex commands by requesting specific task executions like `nx run myapp:build` for single, batch, or affected-based runs.