nx-tools
Queries Nx workspace metadata, project configurations, affected detection, generator schemas, and dependency graphs via unified Python CLI. Use when analyzing monorepo structure, inspecting project.json configurations, determining affected projects for CI optimization, discovering available generators, or visualizing workspace dependencies.
When & Why to Use This Skill
This Claude skill provides a comprehensive interface for managing and analyzing Nx monorepos. It enables developers to programmatically query workspace metadata, inspect project configurations, and visualize dependency graphs. By automating the detection of affected projects and providing instant access to generator schemas, it significantly optimizes CI/CD workflows and simplifies the management of complex, large-scale codebases.
Use Cases
- CI/CD Optimization: Identify exactly which projects are affected by a specific change to run targeted tests and builds, saving significant time and compute resources.
- Monorepo Exploration: Quickly map out the structure of a large workspace by querying project lists, paths, and inter-project dependencies.
- Configuration Auditing: Inspect project.json files and workspace configurations via CLI to ensure architectural standards are maintained across all modules.
- Scaffolding and Automation: Discover available Nx generators and retrieve their JSON schemas to automate the creation of new libraries, components, or applications.
- Dependency Visualization: Generate and export dependency graphs to understand the impact of architectural changes and identify circular dependencies.
| name | nx-tools |
|---|---|
| type | complex |
| depth | base |
| user-invocable | false |
| description | >- |
[H1][NX-TOOLS]
Dictum: Uniform interfaces eliminate invocation ambiguity.
Query Nx workspace with unified Python CLI.
[IMPORTANT] Zero-arg commands default to base=main, output=.nx/graph.json.
# Zero-arg commands
uv run .claude/skills/nx-tools/scripts/nx.py workspace
uv run .claude/skills/nx-tools/scripts/nx.py path
uv run .claude/skills/nx-tools/scripts/nx.py generators
uv run .claude/skills/nx-tools/scripts/nx.py affected
uv run .claude/skills/nx-tools/scripts/nx.py affected --base develop
uv run .claude/skills/nx-tools/scripts/nx.py graph
uv run .claude/skills/nx-tools/scripts/nx.py docs
uv run .claude/skills/nx-tools/scripts/nx.py docs --topic affected
uv run .claude/skills/nx-tools/scripts/nx.py tokens --path CLAUDE.md
# Required-arg commands
uv run .claude/skills/nx-tools/scripts/nx.py project --name parametric-portal
uv run .claude/skills/nx-tools/scripts/nx.py run --target build
uv run .claude/skills/nx-tools/scripts/nx.py run --target typecheck
uv run .claude/skills/nx-tools/scripts/nx.py schema --generator @nx/react:app
[1][OUTPUT]
Commands return {"status": "success|error", ...}.
| [INDEX] | [CMD] | [RESPONSE] |
|---|---|---|
| [1] | workspace |
{projects: string[]} |
| [2] | project |
{name: string, project: object} |
| [3] | affected |
{base: string, affected: string[]} |
| [4] | run |
{target: string, output: string} |
| [5] | generators |
{generators: string} |
| [6] | schema |
{generator: string, schema: string} |
| [7] | graph |
{file: string} |
| [8] | docs |
{topic: string, docs: string} |
| [9] | tokens |
{path: string, output: string} |
| [10] | path |
{path: string} |