nx-config-cache-check

Detect misaligned Nx cache inputs and outputs in project configs.

1|Updated Jun 3, 2025
One-click install
npx skills add https://github.com/jaysoo/dot-ai-config --skill nx-config-cache-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-config-cache-check
Source: https://github.com/jaysoo/dot-ai-config/tree/main/dot_gemini/skills/nx-config-cache-check
Command: npx skills add https://github.com/jaysoo/dot-ai-config --skill nx-config-cache-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically detects misalignments between Nx cache inputs and outputs when project configuration files change, preventing stale or incorrect cache restores.

Core Features & Use Cases

  • Detects cacheability conflicts and overlapping outputs between targets and dependencies.
  • Validates that inputs cover all source files affecting outputs, including using dependentTasksOutputFiles for dependency outputs.
  • Highlights targetDefaults and namedInputs changes that may introduce misconfigurations.
  • Assists PR reviews and pre-push checks by surfacing actionable recommendations.

Quick Start

Run the cache config checker against your changed Nx targets to detect misaligned inputs and outputs.

Frequently Asked Questions about nx-config-cache-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect misaligned Nx cache inputs and outputs when project configs change?

To detect misaligned Nx cache inputs and outputs, validate diffs to project.json, package.json targets, and nx.json targetDefaults. This surfaces cacheability conflicts, overlapping outputs, and sandbox violations to prevent stale cache restores during PR reviews.

Why does my Nx cache restore stale outputs after modifying namedInputs?

Nx cache restores stale outputs when namedInputs or targetDefaults changes propagate misconfigurations. If cacheable targets do not declare accurate inputs or use dependentTasksOutputFiles for dependency outputs, the cache hash fails to capture relevant source file changes.

How do I validate Nx targetDefaults changes to prevent cache misconfigurations?

Validate Nx targetDefaults changes by checking that cacheable targets declare accurate inputs and outputs. Ensure dependentTasksOutputFiles properly captures dependency outputs, and flag any targetDefaults modifications that might introduce cacheability conflicts or sandbox violations across the workspace.

Can I use Nx cache config validation for pre-push checks?

Yes, you can use Nx cache config validation for pre-push checks. It surfaces actionable recommendations by detecting overlapping outputs between targets and dependencies, ensuring inputs cover all source files affecting outputs before changes are merged.

What is the best way to prevent overlapping outputs between Nx targets and dependencies?

The best way to prevent overlapping outputs is to ensure cacheable targets declare accurate inputs and outputs, utilizing dependentTasksOutputFiles for dependency outputs. Validating nx.json targetDefaults and namedInputs helps identify and resolve cacheability conflicts.