nx-run-tasks

Automate Nx workspace task runs across single, multiple, and affected projects.

11|5|Updated Jun 30, 2019
One-click install
npx skills add https://github.com/ikemtz/AngularMonoRepo --skill nx-run-tasks-ikemtz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-run-tasks
Source: https://github.com/ikemtz/AngularMonoRepo/tree/main/src/.opencode/skills/nx-run-tasks
Command: npx skills add https://github.com/ikemtz/AngularMonoRepo --skill nx-run-tasks-ikemtz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates running Nx tasks across projects in an Nx workspace to streamline build, test, lint, serve, and other targets with consistency.

Core Features & Use Cases

  • Understand which tasks can be run by inspecting nx show project <projectname> --json and the project.json/package.json targets.
  • Run a single task with nx run <project>:<task>, for example nx run myapp:build.
  • Run multiple tasks with nx run-many -t <task1> <task2> and optional filters like -p to scope projects, --exclude to omit projects, and --parallel to limit concurrency.
  • Run tasks for affected projects with nx affected -t <task> to only operate on changed projects and their dependents.

Quick Start

Run nx run myapp:build to execute the build task for the app named myapp.

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 a single build task for a specific project in an Nx workspace?

To run a single build task in an Nx workspace, execute nx run <project>:<task>, for example nx run myapp:build, to automate the target defined in your project.json or package.json.

What is the best way to run lint and test targets across multiple Nx projects at once?

Running multiple Nx targets simultaneously is done using nx run-many -t <task1> <task2>, with optional filters like -p to scope projects and --parallel to limit concurrency.

Can I run Nx tasks only for projects affected by my recent code changes?

Yes, you can run tasks for affected projects by using nx affected -t <task>, which scopes execution to only changed projects and their dependents, saving build and test time.

How do I check which tasks are available for a specific project in my Nx monorepo?

You can check available tasks by inspecting the output of nx show project <projectname> --json, which details the targets configured in your project.json or package.json files.

Do I need to configure project.json to run Nx tasks in a monorepo?

You need task definitions in either project.json or package.json files to run Nx tasks, as the system relies on these configurations to identify and execute targets like build, test, lint, and serve.

How can I exclude certain projects when running tasks across an Nx workspace?

When running tasks with nx run-many, you can omit specific projects by applying the --exclude filter, ensuring targeted execution while skipping irrelevant projects in your Nx workspace.