nx-run-tasks

Execute build, test, and lint tasks within an Nx workspace.

1|Updated Apr 15, 2025
One-click install
npx skills add https://github.com/shanieMoonlight/moonlight-repo --skill nx-run-tasks-shaniemoonlight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-run-tasks
Source: https://github.com/shanieMoonlight/moonlight-repo/tree/main/.gemini/skills/nx-run-tasks
Command: npx skills add https://github.com/shanieMoonlight/moonlight-repo --skill nx-run-tasks-shaniemoonlight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the execution of development and build tasks within an Nx monorepo, ensuring consistency and leveraging Nx's advanced features for affected projects.

Core Features & Use Cases

  • Task Execution: Run single or multiple tasks across projects (e.g., build, test, lint).
  • Affected Commands: Automatically identify and run tasks only on projects impacted by recent changes, optimizing CI/CD pipelines.
  • Configuration: Supports various flags for caching, verbosity, and parallelization.
  • Use Case: After making changes to a shared library, use this Skill to run tests only on the projects that depend on that library, saving significant build time.

Quick Start

Use the nx-run-tasks skill to run the 'build' and 'lint' tasks on all affected projects.

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 tasks only on affected projects in an Nx monorepo?

To run tasks on affected projects in an Nx monorepo, you can execute affected commands that identify impacted projects based on recent changes. This optimization automatically runs build, test, or lint tasks only on projects with dependencies that changed, saving CI pipeline time.

What's the best way to execute build and lint tasks across multiple Nx projects?

Executing build and lint tasks across multiple Nx projects is streamlined through multi-project task runs. This process supports various configuration flags for caching, verbosity, and parallelization to ensure consistent task orchestration and dependency graph analysis across the workspace.

Do I need the Nx CLI installed to run workspace tasks?

Yes, you need the Nx CLI installed and configured within your workspace to run workspace tasks. The Nx CLI is required for proper task orchestration and dependency graph analysis when executing single-project, multi-project, or affected-project commands.

Can I configure caching and parallelization for Nx monorepo task execution?

Yes, you can configure caching and parallelization for Nx monorepo task execution. The task runner supports various flags that allow you to adjust caching, verbosity, and parallelization settings to optimize build, test, and lint operations.

How does Nx dependency graph analysis optimize CI/CD pipelines for monorepos?

Nx dependency graph analysis optimizes CI/CD pipelines by automatically identifying affected projects after changes to shared libraries. It runs targeted build and test tasks only on dependent projects, avoiding full workspace builds and significantly reducing overall execution time.

Does Nx support running custom tasks defined within projects?

Yes, Nx supports running custom tasks defined within projects alongside standard build, test, and lint operations. You can execute single or multiple custom tasks across single-project, multi-project, and affected-project configurations using the task runner.