Skip to main content

monitor-ci

We earn commissions when you shop through the links below.

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access.

v1.0.0New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install nx-monorepo-nx-cloud-monitor-ci
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/nx-monorepo-nx-cloud-monitor-ci/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiCryptographically signed by the skills-hub.ai distributor key at publish time.
Signed
0Save

Instructions

Monitor CI

Watch the Nx Cloud CI pipeline for the current branch until it is green, acting on Self-Healing CI fixes along the way. Everything goes through the nx-cloud CLI: it waits for the pipeline, reports Self-Healing, and applies, rejects or reruns fixes.

Setup

  1. Nx Cloud connection: nx.json at the workspace root must have nxCloudId or nxCloudAccessToken. If neither is there, stop and tell the user: "Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud"
  2. CLI: the commands below are part of the experimental Nx Cloud CLI. Run them from the workspace root with NX_CLOUD_EXPERIMENTAL_CLI=true set, either in the environment or in the workspace's .env.local. Check with NX_CLOUD_EXPERIMENTAL_CLI=true npx nx-cloud get pipeline --help.
  3. Login: the commands need an Nx Cloud login (npx nx-cloud login) or NX_CLOUD_ACCESS_TOKEN. If one fails with an authentication error, ask the user to log in.

All commands print JSON on stdout and one JSON record per line on stderr ({"error": ...} or {"log": ...}). Exit code 1 means the command failed; read the error record.

Options

Treat whatever the user said when asking you to monitor CI as instructions. They override the defaults below.

OptionDefaultMeaning
branchcurrentBranch to monitor
timeout120 minutesTotal time spent monitoring
max cycles10Commits or fixes you push that start a new pipeline
local fix attempts3Attempts to fix or improve a fix locally before pushing
environment reruns2fix rerun requests for environment failures
apply verified fixesyesApply a fix whose verification passed without asking

Commands

CommandWhat it does
npx nx-cloud get pipeline --sha <commit> --wait-until self-healing-terminal --timeout <secs>Waits until the pipeline of that commit has finished and Self-Healing has nothing left in progress, then prints it
npx nx-cloud get pipeline --branch <branch>Prints the newest pipeline of a branch without waiting
npx nx-cloud get logs --failed --sha <commit> --tail 200Saves the failed tasks' logs to files and prints where they are
npx nx-cloud fix show <fixId>Prints a fix with its patch (suggestedFix)
npx nx-cloud fix apply <fixId>Nx Cloud commits the fix to the branch; the new commit is fix.commitSha
npx nx-cloud fix apply <fixId> --locallyApplies the patch to the working tree instead, without committing
npx nx-cloud fix reject <fixId>Marks the fix as rejected
npx nx-cloud fix rerun <fixId>Nx Cloud pushes an empty commit to rerun CI; only for environment_state failures

get pipeline prints {pipeline: {id, status, url, headSha, ...}, runGroups, runs, failedTasks: [{taskId, projectName, target, status, logsUrl}], selfHealing}. Once something failed, selfHealing holds fix (id, suggestedFixStatus, verificationStatus, failureClassification, userAction, autoApplySkipped, confidence, suggestedFixReasoning, suggestedFix, commitSha, ...), or skip (reason, message) when Self-Healing did not run, or is empty. suggestedFix is the whole patch, so leave it out until you need it, for example with | jq 'del(.selfHealing.fix.suggestedFix)', and read it with fix show.

Loop

  1. Pick the commit: the local HEAD when it is pushed, otherwise the remote head of the branch (git fetch, then origin/<branch>).
  2. Wait with get pipeline --sha <commit> --wait-until self-healing-terminal, with --timeout set to the time left. A wait that reaches the timeout exits 1 and still prints the last status; stop and report it. While it waits, print a short status line now and then from its waiting log records.
  3. Decide from the result, using the first row that matches:
ResultAction
pipeline.status is SUCCEEDEDReport success and stop
pipeline.status is CANCELED or TIMED_OUTReport it and stop
No pipeline found (exit 1, "no pipeline found")CI never started for the commit. Report it; if the user asked, fix workflow problems such as an outdated lockfile, push, and start again
Failed, failedTasks emptyPush an empty commit once to retry (git commit --allow-empty -m "chore: retry ci [monitor-ci]"); if that fails the same way, stop
fix.userAction is APPLIED_AUTOMATICALLY or APPLIEDSelf-Healing already committed it. Wait for fix.commitSha
fix.failureClassification is environment_statefix rerun (counts against environment reruns), then wait for the new head of the branch
fix.verificationStatus is COMPLETEDThe fix passed verification. If some failed tasks are not in fix.verificationTasksExecuted, run those locally with the patch first (fix apply --locally). Apply it with fix apply (ask first if the user said so, or if autoApplySkipped is set, and say why it was skipped), then wait for fix.commitSha
fix.suggestedFixStatus is COMPLETED, verification failed or didn't runReview the patch with fix show. If it is right, apply it. If it needs work, fix apply --locally, improve it, verify locally, then commit and push. If it is wrong, fix reject and fix it yourself
skip.reason is THROTTLEDEarlier fixes on this branch went unanswered. Tell the user, then fix the failure yourself
Anything else (no fix, fix failed, Self-Healing skipped or disabled)Fix the failure yourself, using get logs --failed for the task output; if you can't, report skip.message or the failure and stop
  1. After anything that starts a new pipeline, count a cycle and go back to step 2 with the new commit. Stop when max cycles is reached, and ask whether to continue when one cycle is left.

Fixing locally

  • Fixing yourself means: read the failed task logs, change the code, run the failed tasks locally (nx run <taskId>, or nx run-many for several), and commit and push when they pass. Each attempt counts against local fix attempts; when they run out, push what you have and let CI judge, or stop if nothing improved.

  • Environment and tooling failures (command not found, out of memory, permission denied, network or DNS errors, missing system libraries, Docker problems, a full disk) are not code bugs. Report them instead of spending attempts on them.

  • Don't fix failures yourself while Self-Healing is still working on them, and don't cancel CI runs.

  • Stage files by name; git add -A or git add . can commit the user's unrelated work or secrets.

  • Commit messages:

    fix(<projects>): <brief description>
    
    Failed tasks: <taskId1>, <taskId2>
    Local verification: passed|enhanced|failed-pushing-to-ci
    

Don't

  • Watch CI with the CI provider's CLI (gh pr checks --watch, glab ci status -w) or your own polling script. They bypass Self-Healing; get pipeline --wait-until already polls with backoff.
  • Print suggestedFix or full task logs when a summary does. Both can be very large.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
nx-cloud-apiQuery the read-only Nx Cloud Public API for workspace data with `npx nx-cloud api`. Use this skill when a user asks to inspect or retrieve CIPEs, pipelines, run groups, runs, tasks, workflows, agents, task statistics, flaky tasks, cache data, CI compute or credit estimates, or API endpoint details. Use this skill before any Nx Cloud API call. It covers endpoint discovery, link navigation, pagination, asset downloads, and error recovery. Do not use it for live CI monitoring.0 installspolygraphGuidance for coordinating changes across multiple repositories using Polygraph. When the request implies that some information from another repo has to be read, another repo has to be updated, or the user asks about what other repos are doing with shared code/APIs/endpoints, use this skill.0 installsnx-cloud-apiQuery the read-only Nx Cloud Public API for workspace data with `npx nx-cloud api`. Use this skill when a user asks to inspect or retrieve CIPEs, pipelines, run groups, runs, tasks, workflows, agents, task statistics, flaky tasks, cache data, or API endpoint details. Use this skill before any Nx Cloud API call. It covers endpoint discovery, link navigation, pagination, asset downloads, and error recovery. Do not use it for live CI monitoring.0 installsget-latest-ciFetch the latest CI pipeline execution for the current branch. Returns the most recent CIPE which may be completed, in progress, or null. Use when you need to review CI status, check failures, or inspect CI state.0 installsawait-polygraph-ciWait for CI to settle across all repos in a Polygraph session, then report results and investigate failures. USE WHEN user says "await polygraph", "wait for polygraph ci", "polygraph ci status", "check polygraph ci", "watch polygraph session", "monitor polygraph".0 installsnx-cloud-cache-investigatorInvestigate a specific Nx cache miss, artifact download or extraction failure, same-hash non-replay, or suspected unsafe cache replay. Use this skill whenever a user asks why an Nx task did not use the cache, why cache artifact restoration failed, why a cache hit restored stale or wrong output, or to compare two cached task executions. Use the nx-cloud-api skill for every Nx Cloud read. This skill supports API-only investigations, preserves strict hash-evidence limits, and requests local configuration only when the question requires it.0 installs

More from Nx AI Agents Config

View source →
nx-run-tasksHelps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.2 installsnx-pluginsFind and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.1 installslink-workspace-packagesLink workspace packages in monorepos (npm, yarn, pnpm, bun). USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) user imports from a sibling package and needs to add it as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use the package manager's workspace commands to fix actual linking.1 installsnx-generateGenerate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a new app, create a new lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.1 installsnx-importImport, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code/history from another repository.1 installsnx-workspaceExplore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.1 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.635 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.535 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.346 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.246 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.173 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions145 installs

Frequently asked questions about monitor-ci

What does the monitor-ci skill do?

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the monitor-ci skill?

Run `npx @skills-hub-ai/cli install nx-monorepo-nx-cloud-monitor-ci` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/nx-monorepo-nx-cloud-monitor-ci/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does monitor-ci work with?

monitor-ci runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the monitor-ci skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use monitor-ci after installing it?

In Claude Code, type `/nx-monorepo-nx-cloud-monitor-ci` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the monitor-ci skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.