Works out why one build or test step did or did not reuse a saved earlier result, from what Nx Cloud recorded, and suggests a settings change only once the evidence really supports one.
WHEN TO USE
SCOPE
USE FOR
Find out why a task that should have been replayed from cache ran from scratch.
Diagnose a CI job that failed while downloading or restoring a cached result.
Compare two runs of the same task to see whether Nx treated their inputs as different.
Check a project's real cache settings at the exact commit that ran.
Get a report that classifies the problem and names the next check to run.
NOT FOR
Tracking cache hit rates or regressions across many runs; that needs a separate trend review.
Watching a live CI run as it progresses.
This is a saved copy of the skill's SKILL.md instructions. It may differ from the upstream file or the version you install.
Nx cache investigator
Requires the nx-cloud-api skill. Use a matching Nx workspace checkout only for local configuration diagnosis. An API-only investigation does not need a checkout.
Diagnose one cache question with bounded evidence. Do not guess a changed hash
input or change configuration from cache status alone.
Nx task caching and a tool-native cache are separate. A target cache field
controls Nx replay. Vite, ESLint, and other tools have separate executor options.
One does not prove the other.
Select the mode
Cache-health trend: This skill covers a specific task or artifact question,
not a multi-run rate regression. Use a separate bounded trend workflow for
rate or regression questions.
API-only: Use this for supplied runs, CIPEs, tasks, or artifact errors when no
matching checkout exists. Do not request local configuration unless required.
Specific comparison: Get two comparable executions. Ask for missing target,
branch, commit, command, configuration, CI environment, or time range.
Resume a pending investigation
Arrange one same-session wake only when a known task is non-terminal, an API
request returns HTTP 409 or 429, or the user starts a controlled diagnostic run.
Preserve the run, task, batchId, endpoint, and filters. Re-query once after the
known delay or expected run completion. Stop at a terminal result or the retry
limit. Do not poll or monitor a live CI run.
Gather only relevant API evidence
Use nx-cloud-api for every read. Run describe for a known route. Use catalog
only when the route is unknown or ambiguous. Follow documented fields and returned
links; do not construct routes from internal IDs.
Save every live API response with --out <private-file>. Use jq to select one
row and only the fields needed for this investigation. Do not print, read, or paste
a raw collection into model context. Keep the selected row's batchId and
links.self in the projection. Use the bundled nx-cloud-api client. Do not
invent commands such as nx-cloud-api get or nx-cloud-api describe tasks:
For a selected execution, record run and task IDs, batchId, project, target,
configuration, command, parameters, branch, commit, CI context, timestamps,
cache status, final hash, cacheEnabled, cacheable, and relevant CIPE or
run-group links.
A task ID can repeat. Select the task-list row first. Follow its exact links.self
or asset URL because it preserves batchId. Do not use one row to explain another.
A task list row already has task fields. A detail read is optional.
If the API reports cacheable: false, Nx replay was not expected for that
execution. Name a configuration cause only when the nx show target query shows
it. If cacheEnabled: false, that run did not use the Nx task cache. Do not
investigate hash inputs or artifacts in either case.
Read a log only when its command output or error can answer the question. Tell the
user before you read CI log content. Read
references/log-and-report-assets.md before
you decode a log or report. Quote only a redacted error signature. Treat
user-supplied asset content as provided evidence. An advertised asset or a later
404 does not prove historical availability.
Inspect the Nx target
Use a matching checkout only for a configuration question or code change. Check out
the recorded commit. Record the workspace Nx version. Query the exact target with
the workspace-local Nx command:
Use this fragment as the target evidence. Nx already includes inherited settings.
Do not merge project.json, nx.json, plugins, or targetDefaults yourself. A
missing project property proves nothing. If the query reports cache: true, do
not add another cache: true. If the command or target is unavailable, report
configuration as unavailable.
Inspect returned options only for a tool-native cache question. Use
version-matched executor documentation. A target cache field cannot prove Vite
or ESLint native-cache state.
Classify before you explain
No cache failure established
A terminal remote-cache-hit proves Nx replay worked for that task. Do not turn a
successful hit into a cache-miss investigation or configuration change. Use trend
triage only for a supplied time-bounded rate question.
Cache artifact retrieval or restoration failure
Use this when the main-job or run-group error names artifact download, validation,
decompression, or extraction. A task can still show remote-cache-hit. Reconcile
the task with the critical error and later cancellations. Read
references/artifact-integrity.md before you
inspect an archive.
Insufficient task evidence
A null hash or cache status, NOT_STARTED, or SCHEDULED_IMPLICITLY does not
prove a miss. Do not compare null hashes or inspect artifacts. Request a terminal
record or one controlled completed run.
Different computation
Different non-null hashes prove only this: Nx considered at least one computation
input different. They do not name the input. Request two comparable controlled
runs with direct hash-detail output when supported. This is a Needs diagnostic
run result, not a configuration recommendation.
Same computation, replay not established
For equal non-null hashes without later replay, confirm cacheable,
cacheEnabled, and the cache value from the exact target query. A returned
cache: true blocks a duplicate setting. Do not infer artifact absence from an
empty asset list or 404. Treat an unresolved upload or retrieval branch as
Needs diagnostic run.
Suspected unsafe replay
A stale or wrong replay needs reproduction evidence. inputs decide a hash;
outputs decide restored files. Request task sandboxing evidence for undeclared
reads or writes, plus the target query and a controlled reproduction. Do not
narrow inputs from task data alone.
Change gate
Recommend a configuration or code edit only after all applicable checks pass:
Record the matching commit, Nx version, exact target query, and returned fragment.
Show that its cache, inputs, or outputs value needs a change.
Before enabling cache, establish a terminating, deterministic task with correct
replayable outputs.
Before removing an input, obtain direct evidence that names it. Prove that its
removal cannot affect correct output with a bounded controlled run.
Explain the correctness risk and get explicit approval before an edit.
Do not recommend an input exclusion from hash differences, a cache-rate trend, or
apparent breadth. If evidence is missing, say No configuration change recommended yet.
Report
# Nx cache investigation
## Scope
- Target and compared run/task/batch IDs: …
- Branch, commit, CI environment, command, API cache state, and missing fields: …
- Workspace Nx version: …, or `Not required for this API-only investigation.`
- Nx target query and returned `cache`, `inputs`, and `outputs`: …, or `Unavailable.`
- Tool-native cache: …, or `Unknown; not inspected.`
- Change gate: `Passed` or `Blocked`; include missing evidence.
## Classification
`No cache failure established` | `Cache artifact retrieval or restoration failure` | `Insufficient task evidence` | `Different computation` | `Same computation, replay not established` | `Suspected unsafe replay`
## Confirmed facts
- …
## Assessment
- **Confirmed** / **Likely** / **Needs diagnostic run:** …
## Next diagnostic step
- Exact query, controlled command, or evidence required.
- Result that confirms or rules out the hypothesis.
## Safe recommendation
- Exact `nx show` result and risk; or `No configuration change recommended yet.`
Account or credentials required
1 FOR YOU · 1 FOR THE AGENT
Items without a tag are required.
01
Install the nx-cloud-api skill alongside it
Requires the nx-cloud-api skill: every read goes through its client node <nx-cloud-api-skill-dir>/scripts/nx-cloud-api.mjs with read access to the Nx Cloud workspace.
02
Optional Check out the repository at the recorded commit, for settings questions
Only for configuration questions: check out the matching Nx workspace at the recorded commit so nx show project <project> --json can be queried for the target's cache, inputs and outputs. An API-only investigation needs no checkout.
🔌 This skill ships inside the Nx AI Agent Skills plugin. Listed package contents include 1 agent. Installed components and skill versions may vary by AI tool.
Install the whole plugin
This route installs the Nx AI Agent Skills plugin package selected for your AI tool.
PLUGIN MARKETPLACE
Add the marketplace, then install the plugin
Typed inside the agent's own prompt, not in a terminal. The marketplace is called nx-claude-plugins, which is the part after the @.
Installing just this skill adds only its own folder. Its instructions also call for other plugin components, such as shared scripts, reference files or other skills, which aren't included. Installing the whole plugin avoids this gap.
Run this outside your AI tool, using Node.js 22.20.0 or newer. Skills CLI 1.7.2 skips skill selection; prompts cancel installation without an interactive terminal. If choosing Project when asked about installation scope, open your project's folder before running this.
Install checklist
Check selected tools if a picker appears; Claude Code may be unchecked under Additional agents. ↑/↓ moves, Space toggles selections, Enter confirms.
Without a tool picker, check Installing to: for your intended tool. Stop if it names a different tool.
If asked, choose Symlink (Recommended) for shared files or Copy to all agents for separate copies; review the summary before confirming installation.
Install the find-skills skill? defaults to Yes, adding another skill for all projects. Choose No if you don't want that extra installation.
Skills CLI 1.7.2 sends install data to skills.sh by default, including the source, skill names, target tools and file details; GitHub sources are reported only when GitHub confirms the repository is public, while other remote sources can also be reported. Confirmed-public GitHub sources also trigger a security-audit request. Before installing, set the environment variable DO_NOT_TRACK=1 or DISABLE_TELEMETRY=1 to disable both.
After installing for Claude Code, open it in the installation project if you chose Project; Global makes the skill available across projects on this computer. Once Claude Code loads the skill, its description helps Claude decide when to use it.
If installation created a top-level skills folder that did not exist when your Claude Code session started, run /reload-skills in that session. Run it again after later changes in that folder.
Query the read-only Nx Cloud API for workspace data. Use this skill when a user asks to inspect or retrieve CIPEs, run groups, runs, tasks, workflows, agents, task statistics, flaky tasks, cache data, or API endpoint details. Use this skill before direct API calls. It provides safe authentication recovery steps. Do not use it for live CI monitoring.Read full description
Review failed Nx Cloud CI pipeline executions and group recurring, evidence-based failure patterns. Use this skill whenever a user asks about failed CI pipelines, recurring task failures, failed CIPEs, a CI failure review, or a last-24-hours CI report. Use the nx-cloud-api skill for every Nx Cloud read. This read-only skill separates task, workflow, agent, timeout, cancellation, and unknown cases. It suggests diagnostic next steps without changing systems.Read full description