Nx ci

From qauth-labs/qauth · View interactive version

Nx ci is an AI agent skill from the GitHub repository qauth-labs/qauth. CI/CD workflows with Nx affected commands. Use when setting up pipelines, debugging CI failures, or optimizing builds.

How to use this skill

Skill file

Nx CI/CD Workflows

Affected Commands

pnpm nx affected -t test
pnpm nx affected -t lint test build
pnpm nx affected -t test --base=origin/main --head=HEAD

GitHub Actions

- uses: actions/checkout@v4
  with:
    fetch-depth: 0 # Required for affected

- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4

- run: pnpm install --frozen-lockfile
- run: pnpm nx affected -t lint test build --base=origin/main

Remote cache

Not Nx Cloud (neverConnectToCloud in nx.json). CI's affected legs use a self-hosted

server that speaks Nx's HTTP cache spec, through .github/actions/nx-remote-cache: a push

to main reads and writes, every other run only reads, and a fork's pull request runs on the

local cache. The action's job-summary table shows each leg's hits and misses. Local runs do

not use it.

Local CI Simulation

pnpm nx affected -t lint test build --base=origin/main
pnpm nx run-many -t lint test build --all

Debugging CI Failures

pnpm nx affected:graph --base=origin/main
pnpm nx affected --target=test --base=origin/main --dry-run
pnpm nx test {failing-project} --skip-nx-cache

Cache Management

pnpm nx reset                          # Clear cache
pnpm nx test {project} --skip-nx-cache # Bypass cache
pnpm nx report                         # Cache status

Best Practices

  1. Use affected commands in CI
  2. Keep main branch green
  3. Set proper base/head refs
  4. Use --parallel for independent tasks
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.