nx: Command for Claude Code

.cursor/commands/ci-monitor.md

ci-monitor is a command for Claude Code, Cursor from nrwl/nx. It costs 0 tokens per session (4,574 once invoked), scanned A, original, MIT.

A command for monitoring Nx Cloud continuous-integration runs and coordinating responses when they fail or need a fix.

In plain words
What is it for?
Use it to watch a branch, wait for new CI runs, set monitoring limits, verify failures locally, and attempt specified workflow fixes such as lockfile updates.
Why use it?
It removes the need to manually track CI attempts and organizes checks, local verification, and optional automated fixes.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: mentions subagents; mentions Claude Code.

This is nrwl/nx's own configuration. It tells Claude Code and Cursor how to work on nx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nx configures →

View source ↗ nrwl/nx nx.dev
About the project

Nx is a tool for managing monorepos, which are repositories containing multiple related projects, across TypeScript and other languages. It helps development teams and AI agents run only affected tasks, cache build results, generate code, and coordinate continuous integration. The catalogue add-ons provide agent skills, commands, agents, instructions, and settings for working with Nx.

nrwl/nx · 29,421 stars · on GitHub · nx.dev

Reuse

Borrowing it

Nothing to install: this file belongs to nrwl/nx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nrwl/nx/master/.cursor/commands/ci-monitor.md
Clone the repo
git clone --depth 1 https://github.com/nrwl/nx

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ci-monitor

README.md
[![agentmods](https://agentmods.dev/badge/commands/nrwl/nx/ci-monitor/github.svg)](https://agentmods.dev/commands/nrwl/nx/ci-monitor)
Your own site
<a href="https://agentmods.dev/commands/nrwl/nx/ci-monitor"><img src="https://agentmods.dev/badge/commands/nrwl/nx/ci-monitor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ci-monitor

Your own site · 80×15
<a href="https://agentmods.dev/commands/nrwl/nx/ci-monitor"><img src="https://agentmods.dev/badge/commands/nrwl/nx/ci-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04574
Opus 5.5 $0.00000 $0.01830
Sonnet 5.5 $0.00000 $0.00915
Haiku 4.5 $0.00000 $0.00457

Measured 1mo ago against content hash c3c87698f916, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ci-monitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/commands/ci-monitor.md · 429 lines

How it starts

The opening of the file, as written. The whole thing — 429 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CI Monitor Command

You are the orchestrator for monitoring Nx Cloud CI pipeline executions and handling self-healing fixes. You spawn the ci-watcher subagent to poll CI status and make decisions based on the results.

Context

  • Current Branch: !git branch --show-current
  • Current Commit: !git rev-parse --short HEAD
  • Remote Status: !git status -sb | head -1

User Instructions

Important: If user provides specific instructions, respect them over default behaviors described below.

Configuration Defaults

Setting Default Description
--max-cycles 10 Maximum CIPE cycles before timeout
--timeout 120 Maximum duration in minutes
--verbosity medium Output level: minimal, medium, verbose
--branch (auto-detect) Branch to monitor
--subagent-timeout 60 Subagent polling timeout in minutes
--fresh false Ignore previous context, start fresh
--auto-fix-workflow false Attempt common fixes for pre-CIPE failures (e.g., lockfile updates)
--new-cipe-timeout 10 Minutes to wait for new CIPE after action
--local-verify-attempts 3 Max local verification + enhance cycles before pushing to CI

Nx Cloud Connection Check

CRITICAL: Before starting the monitoring loop, verify the workspace is connected to Nx Cloud.

Step 0: Verify Nx Cloud Connection

  1. Check nx.json at workspace root for nxCloudId or nxCloudAccessToken
  2. If nx.json missing OR neither property exists → exit with:
    [ci-monitor] Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud
    
  3. If connected → continue to main loop

Read the full file on GitHub · 429 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 429 lines · 0 tokens per session scan A c3c87698f916

Subscribe to this mod's changes

ci-monitor is a command published in the GitHub repository nrwl/nx (29,421 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,574 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.