nx

Orchestrate and cache Nx monorepo tasks with dependsOn and readyWhen.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/Hyperxq/modular-frontend-architecture --skill nx-hyperxq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx
Source: https://github.com/Hyperxq/modular-frontend-architecture/tree/main/.claude/skills/nx
Command: npx skills add https://github.com/Hyperxq/modular-frontend-architecture --skill nx-hyperxq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill clarifies and guides Nx task orchestration to run, order, and cache targets across a monorepo so developers avoid race conditions, unexpected cache skips, and fragile dev-server startup ordering.

Core Features & Use Cases

  • Task Ordering with dependsOn: Show how to declare inter-target dependencies so builds and dev servers start in the correct sequence.
  • Cache-aware Builds: Explain cacheableOperations and how Nx skips cached tasks, when to accept cache hits, and how to reset the cache when needed.
  • readyWhen for Readiness: Demonstrate using readyWhen for long-running dev processes so dependents only start after stdout indicates readiness.
  • Use Case: Start ui-components dev, wait for federated types, then start shell dev to ensure the host consumes fresh remote assets without race conditions.

Quick Start

Use the nx skill to run the repository's full dev orchestration by executing bun run dev from the repo root.

Frequently Asked Questions about nx

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

FAQPage Schema
How do I coordinate Nx monorepo task dependencies to prevent race conditions?

Nx monorepo task orchestration coordinates targets using dependsOn to declare inter-target dependencies, ensuring builds and dev servers start in the correct sequence to prevent race conditions.

How does Nx task caching work for monorepo builds?

Nx task caching uses cacheableOperations to skip redundant builds. When configured, Nx automatically checks the cache and accepts cache hits to avoid repeating unchanged tasks, improving build efficiency.

What is the readyWhen pattern for Nx dev servers?

The readyWhen pattern configures long-running dev processes so dependents only start after stdout indicates readiness. This ensures dependent services wait for specific output signals before execution.

Can I use Nx task orchestration with a Preact micro-frontend monorepo?

Yes, Nx task orchestration applies to a Preact micro-frontend monorepo where it runs dev servers, library builds, and cross-project targets using dependsOn and readyWhen patterns to coordinate federated assets.

Why does my Nx dev server startup fail when waiting for federated types?

Nx dev server startup fails from missing readiness signals. Use readyWhen to ensure the host shell only starts after federated types finish, consuming fresh remote assets without race conditions.

Do I need Bun to run Nx monorepo task orchestration?

You need Bun to run Nx monorepo task orchestration because the Skill respects the root package.json bun-run scripts as the source of truth, executing dev orchestration via bun run dev.