nx-workspace

Explore Nx workspaces to list projects, inspect configurations, and analyze dependencies.

Updated Apr 11, 2025
One-click install
npx skills add https://github.com/pabloimrik17/monolab --skill nx-workspace-pabloimrik17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace
Source: https://github.com/pabloimrik17/monolab/tree/main/.opencode/skills/nx-workspace
Command: npx skills add https://github.com/pabloimrik17/monolab --skill nx-workspace-pabloimrik17

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps engineers quickly understand and troubleshoot Nx workspaces by providing concise commands and patterns to list projects, inspect fully resolved project configurations, enumerate targets, and analyze project dependencies without guessing or manually parsing partial files.

Core Features & Use Cases

  • Workspace Discovery: List all projects, filter by type, tags, directories, or targets and output JSON for programmatic use.
  • Project Inspection: Retrieve the fully resolved project configuration and examine targets, executors, options, inputs, and outputs to know exactly what can be run and cached.
  • Dependency & Affected Analysis: Use the project graph and affected commands to find dependents, compute affected projects between commits, and debug why a task is missing or failing.
  • Troubleshooting Patterns: Common checks include reading nx.json for workspace defaults, using nx show project --json instead of raw project.json, and running nx graph --print for dependency inspection.

Quick Start

Run nx show projects --json to list projects and then run nx show project <project-name> --json to inspect that project's targets, options, and metadata.

Frequently Asked Questions about nx-workspace

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

FAQPage Schema
How do I list all projects in an Nx monorepo?

To inspect an Nx project configuration, run `nx show project <project-name> --json` to retrieve the fully resolved config. This reveals exact targets, executors, inputs, and outputs without manually parsing raw project.json files.

How do I find affected projects in an Nx workspace between commits?

To find affected projects in an Nx workspace between commits, use the Nx affected commands with the project graph. This computes and identifies exactly which projects have changed dependencies requiring retesting or rebuilding.

Why is my Nx target missing or failing to run in the monorepo?

If an Nx target is missing or failing, debug by reading nx.json for workspace defaults and using `nx show project --json` to verify the target exists. Check the resolved configuration instead of guessing from partial files.

Can I inspect Nx workspace dependencies without opening a visual graph?

Yes, you can inspect Nx workspace dependencies without a visual graph by running `nx graph --print`. This prints the dependency relationships directly to the terminal for immediate textual inspection and debugging.

Do I need the nx CLI installed to explore workspace structure and project targets?

Yes, you need the nx CLI or package-manager-prefixed nx installed to explore workspace structure. The skill requires access to repository files and favors nx --json output parsed with jq for programmatic project inspection.