Automated summary
Wraps Nx commands in a uniform Python CLI to query monorepo structure: projects, affected projects, dependency graphs, project.json configurations and generator schemas.
Strengths
- Single interface backed by an explicit command table that removes invocation ambiguity
- Deterministic output enforced through NX_DAEMON=false, suitable for automated consumption
- Covers the core monorepo needs: project listing, affected detection, dependency graphs and generator schemas
- Ships a token counter for files or directories to size context budgets
Limitations
- Declared user-invocable: false, so it is meant for the agent rather than direct invocation by a user
- Assumes an existing Nx workspace with pnpm and uv available, and defaults to a main branch as comparison base
- Invocation paths are hardcoded to .claude/skills/nx-tools/scripts/nx.py
Reach for it when you need to map an Nx monorepo, find which projects a change affects, or inspect project and generator configuration.
Avoid it on repositories that are not Nx workspaces, or when the task is editing code rather than running targets and inspecting metadata.
Security analysis
CautionThe skill wraps Nx CLI commands for legitimate monorepo introspection and task execution. While not inherently malicious, the 'run' command can trigger arbitrary project-defined targets, which may execute shell commands or scripts, warranting caution.
- •The 'run' command executes `pnpm exec nx run-many -t <target>`, which can invoke arbitrary Nx targets, potentially including shell executors defined in workspace project.json files.
- •No allowed-tools are declared, yet the skill implicitly uses `uv`, `pnpm`, `nx`, and `tsx` to execute commands and run project targets.
Examples
Which projects are affected by my changes compared to main? Run the nx-tools affected command and summarize the list.Show me the project.json configuration for @parametric-portal/types using the nx-tools project command.Generate the workspace dependency graph to .nx/graph.json so we can see how the packages relate.name: nx-tools user-invocable: false description: >- Queries Nx monorepo metadata via Python CLI: workspace projects, affected detection, dependency graphs, project.json configs, generator schemas. Use when analyzing monorepo structure, optimizing CI via affected projects, or inspecting workspace topology.
[H1][NX-TOOLS]
<br>Dictum: Uniform interfaces eliminate invocation ambiguity.
Query Nx workspace with unified Python CLI. Wraps pnpm exec nx commands.
[IMPORTANT] Nx 22 features: Terminal UI, continuous tasks, pnpm catalog support, AI agent configuration, Vitest 4 atomizer. All commands run with NX_DAEMON=false for deterministic output.
[1][COMMANDS]
| [CMD] | [ARGS] | [PURPOSE] |
| ---------- | ------------- | -------------------------------------- |
| workspace | -- | List all projects |
| path | -- | Get workspace root path |
| generators | -- | List available generators |
| project | <name> | View project configuration |
| run | <target> | Run target across projects |
| schema | <generator> | View generator schema |
| affected | [base] | List affected projects (default: main) |
| graph | [output] | Generate dependency graph |
| tokens | [path] | Count tokens in file/directory |
| docs | [topic] | View Nx command documentation |
[2][USAGE]
# 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
# Required-arg commands
uv run .claude/skills/nx-tools/scripts/nx.py project @parametric-portal/types
uv run .claude/skills/nx-tools/scripts/nx.py run build
uv run .claude/skills/nx-tools/scripts/nx.py run typecheck
uv run .claude/skills/nx-tools/scripts/nx.py schema @nx/react:component
# Optional-arg commands (defaults shown)
uv run .claude/skills/nx-tools/scripts/nx.py affected # base=main
uv run .claude/skills/nx-tools/scripts/nx.py affected HEAD~5
uv run .claude/skills/nx-tools/scripts/nx.py graph # output=.nx/graph.json
uv run .claude/skills/nx-tools/scripts/nx.py graph custom.json
uv run .claude/skills/nx-tools/scripts/nx.py tokens # path=.
uv run .claude/skills/nx-tools/scripts/nx.py tokens CLAUDE.md
uv run .claude/skills/nx-tools/scripts/nx.py docs # topic=general
uv run .claude/skills/nx-tools/scripts/nx.py docs affected
[3][ARGUMENTS]
workspace: (no arguments)
- Returns list of all project names in workspace
path: (no arguments)
- Returns workspace root path from
CLAUDE_PROJECT_DIRorcwd
generators: (no arguments)
- Returns list of available Nx generators (plugins + local)
project: <name>
name— Project name (required, e.g.,@parametric-portal/types)- Returns full project.json configuration as JSON
run: <target>
target— Target to run (required, e.g.,build,typecheck,test)- Executes
pnpm exec nx run-many -t <target>
schema: <generator>
generator— Generator name (required, e.g.,@nx/react:component)- Returns generator help with all available options
affected: [base]
base— Git ref to compare against (default:main)- Returns JSON array of affected project names
graph: [output]
output— Output file path (default:.nx/graph.json)- Generates workspace dependency graph
tokens: [path]
path— File or directory to count (default:.)- Uses
tools/scripts/count-tokens.tsvia tsx
docs: [topic]
topic— Nx command to get help for (default: general help)
[4][OUTPUT]
Commands return: {"status": "success|error", ...}.
| [INDEX] | [CMD] | [RESPONSE] |
| :-----: | ------------ | ------------------------------------- |
| [1] | workspace | {projects: string[]} |
| [2] | path | {path: string} |
| [3] | generators | {generators: string} |
| [4] | project | {name: string, project: object} |
| [5] | run | {target: string, output: string} |
| [6] | schema | {generator: string, schema: string} |
| [7] | affected | {base: string, affected: string[]} |
| [8] | graph | {file: string} |
| [9] | tokens | {path: string, output: string} |
| [10] | docs | {topic: string, docs: string} |
[5][ENVIRONMENT]
| [VAR] | [REQUIRED] | [DESCRIPTION] |
| -------------------- | ---------- | -------------------------------------- |
| CLAUDE_PROJECT_DIR | No | Override workspace root for path cmd |
| NX_DAEMON | No | Force-set to false by script |
[6][ERROR_HANDLING]
- Nx errors print
[ERROR] <message>and exit 1 - Project not found:
[ERROR] Cannot find project '<name>' - Target not found:
[ERROR] Cannot find target '<target>'for the project - Graph generation failure: verify Nx workspace configuration is valid
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/nx-cli-tools-mrwak9k6' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/nx-cli-tools-mrwak9k6/download' --output '.skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md.part' && mv '.skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md.part' '.skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md' && test -s '.skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/nx-tools' && cp -R '.skill-downloads/nx-cli-tools-mrwak9k6' '.claude/skills/nx-tools'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/nx-cli-tools-mrwak9k6'openskills read 'nx-cli-tools-mrwak9k6'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/nx-cli-tools-mrwak9k6/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.