[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74PHS1EB2PYGYZM3BJGB0Y1":3,"skill-same:01M74PHS1EB2PYGYZM3BJGB0Y1":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M74PHS1EB2PYGYZM3BJGB0Y1","run-nx-checks",null,"Run nx format, lint, typecheck, test, and build on affected or specified projects, then fix unambiguous failures","eai-org\u002Fagent-toolkit","eai-org","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F301886321?v=4","01M74PFC3HF57T58MQ14P212BQ","Engineering in the age of AI","01M74PFC46MSKTT9SW5Q437FSD",85,"MIT","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frun-nx-checks\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: run-nx-checks\ndescription: Run nx format, lint, typecheck, test, and build on affected or specified projects, then fix unambiguous failures\ncontext: fork\nallowed-tools: Bash, Read, Edit, Write, Grep, Glob\nlicense: MIT\nmetadata:\n  version: \"1.10\"\n---\n\n# Run Nx Checks\n\nRun format, lint, typecheck, test, build. Fix unambiguous failures. Report anything judgment-laden\nand every file you changed.\n\n## Arguments\n\n`$ARGUMENTS` — optional, space-separated: `[cpuCount] [projectName] [--remote-cache]`. Number\ntoken → `cpuCount`. Non-number, non-flag token → `projectName`. `--remote-cache` flag → opt back\ninto the remote cache by dropping the remote-cache-off prefix. Default `cpuCount` = cores - 4\n(min 1); count cores with `node -p 'os.cpus().length'`.\nDefault project scope = affected. Default remote-cache state = off (see Steps).\n\n`$base`, `$cpuCount`, `$projectName` and `$snap` in the commands below are placeholders:\nsubstitute their values (a fresh shell per Bash tool call holds none of them).\n\n## Workspace\n\nRun nx commands from wherever `nx.json` lives in this repo (commonly the root; in some repos a\nsubdirectory).\n\n## Setup (before step 1)\n\nKeep the Nx daemon warm so the project graph is reused across targets:\n\n```bash\nNX_DAEMON=true npx nx daemon --start >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nSnapshot the dirty files, so the final report can name every file the run changes (`hash-object`\nwithout `-w` writes nothing); substitute the printed path for `$snap` there:\n\n```bash\nsnap=$(mktemp -d \"${TMPDIR:-\u002Ftmp}\u002Fnx-checks.XXXXXX\") && git ls-files -z -mo --exclude-standard | while IFS= read -r -d '' f; do echo \"$(git hash-object \"$f\" 2>\u002Fdev\u002Fnull) $f\"; done > \"$snap\u002Fbefore.txt\" && echo \"snap=$snap\"\n```\n\n### Affected base\n\n`nx affected` and `format:write` diff against the *local* default branch, which is often stale or\nmissing. `$projectName` replaces only the `affected` commands, so resolve the base in both modes.\n`NX_BASE` set: skip this section and omit `--base` from every command below; Nx reads it and a\ndeliberate env setting wins. Otherwise resolve the remote-tracking ref once and substitute the\nprinted ref for `$base` in every `affected`, `format:write` and `show projects --affected` command\nbelow:\n\n```bash\nbase=$(node -p 'const j=require(\".\u002Fnx.json\"); j.defaultBase ?? j.affected?.defaultBase ?? \"main\"' 2>\u002Fdev\u002Fnull || echo main)\nbase=${base#remotes\u002F}; [[ $base == *\u002F* ]] || base=\"origin\u002F$base\"\nGIT_TERMINAL_PROMPT=0 GIT_SSH_COMMAND='ssh -o BatchMode=yes -o ConnectTimeout=15' git fetch --quiet \"${base%%\u002F*}\" \"${base#*\u002F}\" || echo \"fetch failed: base may be stale\"\ngit rev-parse --verify --quiet \"$base\" >\u002Fdev\u002Fnull && echo \"base=$base\" || echo \"no such ref: omit --base\"\n```\n\n- Omit `--base` when the ref is missing (Nx falls back to `defaultBase`).\n- **Never pass `--head`.** With both flags Nx diffs two commits and ignores uncommitted and\n  untracked files, so an agent's unstaged edits vanish and every check passes vacuously.\n- A failed fetch is not a failure: continue on the current ref, flag \"base may be stale\" in the\n  final report, and never retry outside the sandbox for it.\n\nWhy: [affected-base-rationale.md](affected-base-rationale.md).\n\n## Fix rule\n\n- Apply only mechanical\u002Funambiguous fixes: lint auto-fix output, missing imports\u002Ftypes, obvious type\n  errors, test expectations that mirror a clear code change. An assertion or snapshot update is\n  mechanical only when the failing expectation names a value the working-tree diff changed on\n  purpose; edit that expectation by hand. Never pass `-u`\u002F`--updateSnapshot` to a target.\n- Never guess on anything judgment-laden: test failure that could be a real bug vs. an outdated\n  assertion, errors pointing at unrelated areas, pre-existing failures unrelated to recent work,\n  anything where multiple plausible fixes exist. Running forked, you can't ask mid-run: leave such\n  failures unfixed and carry them, with your analysis, into the final report.\n- Keep changes minimal and scoped to the failure. No drive-by refactors.\n- After fixing, re-run the same step command; the local cache replays the untouched projects.\n  Repeat until clean or only judgment-laden failures remain.\n\n## Affected scope — sanity-check before step 1\n\nAffected runs only (no `$projectName`); they can balloon. Before step 1, check scope with the\ngraph-only `npx nx show projects --affected --base=$base` (fast, no build):\n\n- **Sandbox `.env` false positives.** The sandbox denies reading `**\u002F.env`; `nx affected` hashes\n  changed files, so an unreadable `.env` reads as *changed* and marks its project affected. Repos\n  with `.env`-bearing apps (e.g. `apps\u002F*-api`) thus drag those into every affected run and build\n  them for nothing. Tell-tale: run `git status`; it prints `\u003Cpath>\u002F.env: Operation not permitted`\n  for exactly those projects. Fix: add `--exclude=\u003Ctheir project names>` to every `affected`\n  command (`format:write` takes none) and list them as excluded in the final report, naming any\n  real edits they hold. Never re-run them outside the sandbox yourself; the user can, to include\n  them.\n- **Large fan-out.** Large = more than half of `npx nx show projects | wc -l` or more than 20\n  projects, whichever is lower, counting affected projects after the `.env` exclusions (e.g. a\n  widely-shared lib change rippling across the workspace). Don't build the world unprompted: skip\n  steps 3–5 and report the project count and list in the final report so the user can re-run with\n  `$projectName`.\n\n## Steps\n\n**Scope is mandatory — never narrow it yourself.** With no `$projectName` argument, *every* target\nruns at full scope — `nx affected` for lint\u002Ftypecheck\u002Ftest\u002Fbuild, whole-changeset `format:write`.\nThe single-project forms in the steps below apply **only** when the user explicitly passed\n`$projectName`. Never substitute `nx run \u003Cproj>:\u003Ctarget>`, `nx \u003Ctarget> \u003CchangedLib>`, or\nfile-scoped `format --files` for the affected sweep: that skips every other affected project —\nexactly where a shared-lib change regresses (a dependent project whose tests import the changed\nlib).\n\nAlways prefix each task-running nx command (steps 1–5 and the flaky retry; `daemon` and\n`show projects` run no tasks) with the remote-cache-off env vars inline:\n`NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache`.\n`NX_SKIP_REMOTE_CACHE` turns off every remote cache on Nx 20.4 and later; the other two cover\nearlier versions and Powerpack. Unknown vars are no-ops, so the prefix is safe whatever\nremote-cache backend (if any) the repo uses.\n\nThe invariant: **remote cache always off (unless the user passed `--remote-cache`), local cache\nalways on** — always disable, never autodetect (a passing shell-side auth check doesn't predict\nthe in-process credential chain). Why: [remote-cache-rationale.md](remote-cache-rationale.md).\n\nIf the user explicitly passed `--remote-cache`, drop the prefix. Expect pipeline hits on `build`\n(same `--configuration`) and `typecheck`; on `test` only in the single-project form and the flaky\nretry (the affected run's `--maxWorkers=1` is a hashed override); never on `lint` (`--fix`) — keep\nthe flags regardless.\n\n**Always keep the local cache on.** The env vars above disable only the _remote_ read-through\ncache; the local Nx cache must stay enabled so unchanged targets are replayed instead of re-run.\nDo **not** add `--skip-nx-cache` (nor `NX_SKIP_NX_CACHE=true`) to any command — it bypasses the\nlocal cache too, making every run slower for no benefit. The only valid reason to pass\n`--skip-nx-cache` is a specific, stated need to bypass the local cache — e.g. investigating a\nfailure you suspect is caused by a stale cache entry. In that case, scope it to the single command\nunder investigation and say why; never use it as the default.\n\nWrite the env vars literally at the start of each such command, exactly as in the steps below. Do\n**not** rely on `export` — each Bash tool call is a fresh shell, so exports do not carry across\ncalls (true for any nx env var). Never stash the prefix in a shell variable\n(`NX_OFF=\"…\"; $NX_OFF npx nx …` fails with \"command not found\": expanded variables are not parsed\nas assignments).\n\n1. Lint — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t lint --base=$base --parallel=$cpuCount --fix`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx lint $projectName --fix`).\n2. Format — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx format:write --base=$base`\n   (both modes).\n3. Typecheck — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t typecheck --base=$base --parallel=$cpuCount`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx typecheck $projectName --parallel=$cpuCount`).\n   Without the target, `affected` runs nothing and exits 0 and the single-project form errors with\n   \"cannot find configuration\": report typecheck as n\u002Fa, never as failing.\n4. Test — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t test --base=$base --parallel=$cpuCount --maxWorkers=1`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx test $projectName`).\n5. Build — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t build --base=$base --configuration=production --parallel=$cpuCount`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx build $projectName --configuration=production --parallel=$cpuCount`).\n\nApply the fix rule on any failure in steps 1–5 (a test failure: retry once first, see Flaky\ntests). A failure left unfixed never stops the run: carry on with the next step.\n\n### Flags per target\n\nWhy `--configuration=production` and `--maxWorkers=1`: [flags-rationale.md](flags-rationale.md).\n\n- **`--maxWorkers=1` on the test step only.** Forwarding it to lint (ESLint) or build (esbuild)\n  fails as an unknown option.\n- **Affected\u002Frun-many only, not single-project.** With one project there's no project-level\n  fan-out, so capping to one worker just serializes it — let a single project use all cores.\n- Same reason, `--parallel` is dropped from single-project **lint** and **test** (one task each —\n  no fan-out). It stays on single-project **typecheck** and **build**, because both fan out across\n  the whole dependency chain: `build` has `dependsOn: [\"^build\"]` and the inferred `typecheck`\n  `dependsOn: [\"^typecheck\"]`.\n\n## Flaky tests — retry once to classify\n\nA failed `test` target may be flaky, not a real break. On a test failure, re-run that one target\nonce in step 4's single-project form, prefixed like the steps (`… npx nx test \u003Cproject>`). If it\nthen passes (or, with Nx Cloud on, Nx prints `NX detected a flaky task`), it's flaky — don't try\nto \"fix\" it; record it as a flaky `project:target` for the report. If it fails the same way again,\ntreat it as real under the Fix rule.\n\n## Final report (mandatory)\n\nThis skill runs in a forked context, so its final message is the only channel back to the caller.\nEnd with:\n\n- the affected base used: the resolved ref, `NX_BASE` and its value, or omitted because the ref is\n  missing; flag a failed fetch as possibly stale;\n- per target (lint \u002F format \u002F typecheck \u002F test \u002F build): clean, n\u002Fa, skipped (with the reason —\n  for large fan-out, the project count and list; for `.env` false positives, the excluded\n  projects), or each failing `project:target` with its cause, plus any flaky `project:target`;\n- every file the run changed: hand-fixed (from your own edits — file plus one line on what and\n  why) and tool-applied (lint `--fix`, `format:write` — every other file that differs or is new\n  when the Setup snapshot's `git ls-files` pipeline, not its `mktemp`, is re-run into\n  `$snap\u002Fafter.txt` and the two files are diffed; then `rm -rf \"$snap\"`: a finished run leaves\n  nothing in TMPDIR).\n\nNever report a bare \"checks passed\": an unlisted failure, skipped target or unmentioned edit reads\nas green and the caller can't act on it.\n","# Run Nx Checks\n\nRun format, lint, typecheck, test, build. Fix unambiguous failures. Report anything judgment-laden\nand every file you changed.\n\n## Arguments\n\n`$ARGUMENTS` — optional, space-separated: `[cpuCount] [projectName] [--remote-cache]`. Number\ntoken → `cpuCount`. Non-number, non-flag token → `projectName`. `--remote-cache` flag → opt back\ninto the remote cache by dropping the remote-cache-off prefix. Default `cpuCount` = cores - 4\n(min 1); count cores with `node -p 'os.cpus().length'`.\nDefault project scope = affected. Default remote-cache state = off (see Steps).\n\n`$base`, `$cpuCount`, `$projectName` and `$snap` in the commands below are placeholders:\nsubstitute their values (a fresh shell per Bash tool call holds none of them).\n\n## Workspace\n\nRun nx commands from wherever `nx.json` lives in this repo (commonly the root; in some repos a\nsubdirectory).\n\n## Setup (before step 1)\n\nKeep the Nx daemon warm so the project graph is reused across targets:\n\n```bash\nNX_DAEMON=true npx nx daemon --start >\u002Fdev\u002Fnull 2>&1 || true\n```\n\nSnapshot the dirty files, so the final report can name every file the run changes (`hash-object`\nwithout `-w` writes nothing); substitute the printed path for `$snap` there:\n\n```bash\nsnap=$(mktemp -d \"${TMPDIR:-\u002Ftmp}\u002Fnx-checks.XXXXXX\") && git ls-files -z -mo --exclude-standard | while IFS= read -r -d '' f; do echo \"$(git hash-object \"$f\" 2>\u002Fdev\u002Fnull) $f\"; done > \"$snap\u002Fbefore.txt\" && echo \"snap=$snap\"\n```\n\n### Affected base\n\n`nx affected` and `format:write` diff against the *local* default branch, which is often stale or\nmissing. `$projectName` replaces only the `affected` commands, so resolve the base in both modes.\n`NX_BASE` set: skip this section and omit `--base` from every command below; Nx reads it and a\ndeliberate env setting wins. Otherwise resolve the remote-tracking ref once and substitute the\nprinted ref for `$base` in every `affected`, `format:write` and `show projects --affected` command\nbelow:\n\n```bash\nbase=$(node -p 'const j=require(\".\u002Fnx.json\"); j.defaultBase ?? j.affected?.defaultBase ?? \"main\"' 2>\u002Fdev\u002Fnull || echo main)\nbase=${base#remotes\u002F}; [[ $base == *\u002F* ]] || base=\"origin\u002F$base\"\nGIT_TERMINAL_PROMPT=0 GIT_SSH_COMMAND='ssh -o BatchMode=yes -o ConnectTimeout=15' git fetch --quiet \"${base%%\u002F*}\" \"${base#*\u002F}\" || echo \"fetch failed: base may be stale\"\ngit rev-parse --verify --quiet \"$base\" >\u002Fdev\u002Fnull && echo \"base=$base\" || echo \"no such ref: omit --base\"\n```\n\n- Omit `--base` when the ref is missing (Nx falls back to `defaultBase`).\n- **Never pass `--head`.** With both flags Nx diffs two commits and ignores uncommitted and\n  untracked files, so an agent's unstaged edits vanish and every check passes vacuously.\n- A failed fetch is not a failure: continue on the current ref, flag \"base may be stale\" in the\n  final report, and never retry outside the sandbox for it.\n\nWhy: [affected-base-rationale.md](affected-base-rationale.md).\n\n## Fix rule\n\n- Apply only mechanical\u002Funambiguous fixes: lint auto-fix output, missing imports\u002Ftypes, obvious type\n  errors, test expectations that mirror a clear code change. An assertion or snapshot update is\n  mechanical only when the failing expectation names a value the working-tree diff changed on\n  purpose; edit that expectation by hand. Never pass `-u`\u002F`--updateSnapshot` to a target.\n- Never guess on anything judgment-laden: test failure that could be a real bug vs. an outdated\n  assertion, errors pointing at unrelated areas, pre-existing failures unrelated to recent work,\n  anything where multiple plausible fixes exist. Running forked, you can't ask mid-run: leave such\n  failures unfixed and carry them, with your analysis, into the final report.\n- Keep changes minimal and scoped to the failure. No drive-by refactors.\n- After fixing, re-run the same step command; the local cache replays the untouched projects.\n  Repeat until clean or only judgment-laden failures remain.\n\n## Affected scope — sanity-check before step 1\n\nAffected runs only (no `$projectName`); they can balloon. Before step 1, check scope with the\ngraph-only `npx nx show projects --affected --base=$base` (fast, no build):\n\n- **Sandbox `.env` false positives.** The sandbox denies reading `**\u002F.env`; `nx affected` hashes\n  changed files, so an unreadable `.env` reads as *changed* and marks its project affected. Repos\n  with `.env`-bearing apps (e.g. `apps\u002F*-api`) thus drag those into every affected run and build\n  them for nothing. Tell-tale: run `git status`; it prints `\u003Cpath>\u002F.env: Operation not permitted`\n  for exactly those projects. Fix: add `--exclude=\u003Ctheir project names>` to every `affected`\n  command (`format:write` takes none) and list them as excluded in the final report, naming any\n  real edits they hold. Never re-run them outside the sandbox yourself; the user can, to include\n  them.\n- **Large fan-out.** Large = more than half of `npx nx show projects | wc -l` or more than 20\n  projects, whichever is lower, counting affected projects after the `.env` exclusions (e.g. a\n  widely-shared lib change rippling across the workspace). Don't build the world unprompted: skip\n  steps 3–5 and report the project count and list in the final report so the user can re-run with\n  `$projectName`.\n\n## Steps\n\n**Scope is mandatory — never narrow it yourself.** With no `$projectName` argument, *every* target\nruns at full scope — `nx affected` for lint\u002Ftypecheck\u002Ftest\u002Fbuild, whole-changeset `format:write`.\nThe single-project forms in the steps below apply **only** when the user explicitly passed\n`$projectName`. Never substitute `nx run \u003Cproj>:\u003Ctarget>`, `nx \u003Ctarget> \u003CchangedLib>`, or\nfile-scoped `format --files` for the affected sweep: that skips every other affected project —\nexactly where a shared-lib change regresses (a dependent project whose tests import the changed\nlib).\n\nAlways prefix each task-running nx command (steps 1–5 and the flaky retry; `daemon` and\n`show projects` run no tasks) with the remote-cache-off env vars inline:\n`NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache`.\n`NX_SKIP_REMOTE_CACHE` turns off every remote cache on Nx 20.4 and later; the other two cover\nearlier versions and Powerpack. Unknown vars are no-ops, so the prefix is safe whatever\nremote-cache backend (if any) the repo uses.\n\nThe invariant: **remote cache always off (unless the user passed `--remote-cache`), local cache\nalways on** — always disable, never autodetect (a passing shell-side auth check doesn't predict\nthe in-process credential chain). Why: [remote-cache-rationale.md](remote-cache-rationale.md).\n\nIf the user explicitly passed `--remote-cache`, drop the prefix. Expect pipeline hits on `build`\n(same `--configuration`) and `typecheck`; on `test` only in the single-project form and the flaky\nretry (the affected run's `--maxWorkers=1` is a hashed override); never on `lint` (`--fix`) — keep\nthe flags regardless.\n\n**Always keep the local cache on.** The env vars above disable only the _remote_ read-through\ncache; the local Nx cache must stay enabled so unchanged targets are replayed instead of re-run.\nDo **not** add `--skip-nx-cache` (nor `NX_SKIP_NX_CACHE=true`) to any command — it bypasses the\nlocal cache too, making every run slower for no benefit. The only valid reason to pass\n`--skip-nx-cache` is a specific, stated need to bypass the local cache — e.g. investigating a\nfailure you suspect is caused by a stale cache entry. In that case, scope it to the single command\nunder investigation and say why; never use it as the default.\n\nWrite the env vars literally at the start of each such command, exactly as in the steps below. Do\n**not** rely on `export` — each Bash tool call is a fresh shell, so exports do not carry across\ncalls (true for any nx env var). Never stash the prefix in a shell variable\n(`NX_OFF=\"…\"; $NX_OFF npx nx …` fails with \"command not found\": expanded variables are not parsed\nas assignments).\n\n1. Lint — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t lint --base=$base --parallel=$cpuCount --fix`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx lint $projectName --fix`).\n2. Format — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx format:write --base=$base`\n   (both modes).\n3. Typecheck — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t typecheck --base=$base --parallel=$cpuCount`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx typecheck $projectName --parallel=$cpuCount`).\n   Without the target, `affected` runs nothing and exits 0 and the single-project form errors with\n   \"cannot find configuration\": report typecheck as n\u002Fa, never as failing.\n4. Test — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t test --base=$base --parallel=$cpuCount --maxWorkers=1`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx test $projectName`).\n5. Build — `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx affected -t build --base=$base --configuration=production --parallel=$cpuCount`\n   (or `NX_SKIP_REMOTE_CACHE=true NX_NO_CLOUD=true NX_POWERPACK_CACHE_MODE=no-cache npx nx build $projectName --configuration=production --parallel=$cpuCount`).\n\nApply the fix rule on any failure in steps 1–5 (a test failure: retry once first, see Flaky\ntests). A failure left unfixed never stops the run: carry on with the next step.\n\n### Flags per target\n\nWhy `--configuration=production` and `--maxWorkers=1`: [flags-rationale.md](flags-rationale.md).\n\n- **`--maxWorkers=1` on the test step only.** Forwarding it to lint (ESLint) or build (esbuild)\n  fails as an unknown option.\n- **Affected\u002Frun-many only, not single-project.** With one project there's no project-level\n  fan-out, so capping to one worker just serializes it — let a single project use all cores.\n- Same reason, `--parallel` is dropped from single-project **lint** and **test** (one task each —\n  no fan-out). It stays on single-project **typecheck** and **build**, because both fan out across\n  the whole dependency chain: `build` has `dependsOn: [\"^build\"]` and the inferred `typecheck`\n  `dependsOn: [\"^typecheck\"]`.\n\n## Flaky tests — retry once to classify\n\nA failed `test` target may be flaky, not a real break. On a test failure, re-run that one target\nonce in step 4's single-project form, prefixed like the steps (`… npx nx test \u003Cproject>`). If it\nthen passes (or, with Nx Cloud on, Nx prints `NX detected a flaky task`), it's flaky — don't try\nto \"fix\" it; record it as a flaky `project:target` for the report. If it fails the same way again,\ntreat it as real under the Fix rule.\n\n## Final report (mandatory)\n\nThis skill runs in a forked context, so its final message is the only channel back to the caller.\nEnd with:\n\n- the affected base used: the resolved ref, `NX_BASE` and its value, or omitted because the ref is\n  missing; flag a failed fetch as possibly stale;\n- per target (lint \u002F format \u002F typecheck \u002F test \u002F build): clean, n\u002Fa, skipped (with the reason —\n  for large fan-out, the project count and list; for `.env` false positives, the excluded\n  projects), or each failing `project:target` with its cause, plus any flaky `project:target`;\n- every file the run changed: hand-fixed (from your own edits — file plus one line on what and\n  why) and tool-applied (lint `--fix`, `format:write` — every other file that differs or is new\n  when the Setup snapshot's `git ls-files` pipeline, not its `mktemp`, is re-run into\n  `$snap\u002Fafter.txt` and the two files are diffed; then `rm -rf \"$snap\"`: a finished run leaves\n  nothing in TMPDIR).\n\nNever report a bare \"checks passed\": an unlisted failure, skipped target or unmentioned edit reads\nas green and the caller can't act on it.\n",{"name":5,"context":24,"license":15,"metadata":25,"description":7,"allowed-tools":27},"fork",{"version":26},"1.10","Bash, Read, Edit, Write, Grep, Glob","main","12db59437c9d48b9bd62b18888e9974b17adafaf","skills\u002Frun-nx-checks",19,"https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit","https:\u002F\u002Feai-org.github.io\u002Fagent-toolkit-docs","https:\u002F\u002Fgithub.com\u002Feai-org","https:\u002F\u002Fmedium.com\u002Fengineering-in-the-age-of-ai","2026-11-14 22:36:21",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add eai-org\u002Fagent-toolkit --skill run-nx-checks",{"tool":43,"command":44},"bunx","bunx skills add eai-org\u002Fagent-toolkit --skill run-nx-checks",{"tool":46,"command":47},"pnpm","pnpm dlx skills add eai-org\u002Fagent-toolkit --skill run-nx-checks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frun-nx-checks\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"affected-base-rationale.md","REFERENCE","参考文档",1947,"https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frun-nx-checks\u002Faffected-base-rationale.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"flags-rationale.md",569,"https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frun-nx-checks\u002Fflags-rationale.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"remote-cache-rationale.md",2126,"https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Frun-nx-checks\u002Fremote-cache-rationale.md",[66,72,79,86,93,100],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M74PKAVPTTY5PSSAWHCRVY9T","no-frontmatter","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M74PK8J99W7V3669Y4JG2JKV","other-name","Fixture skill whose name differs from its folder.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fname-mismatch\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74PK6T9DHVRCNHTEV2ZA4Y3","md-off","A fixture skill whose folder turns the line length off below a root that sets 99.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fmd-off\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M74PK4H4N3D290V4C08M4DGY","long-line","Fixture skill with one prose line of 100 characters, over the fixtures' limit of 99.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Flong-line\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M74PK2DJ2MCR5KFPMYVQWNJG","flag-without-flow","Fixture skill with the flag and no type.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fflag-without-flow\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M74PK03XGEBQ986FDAE46WCM","double-backtick","A fixture skill with double-backtick code spans holding a link template and an overrun.","https:\u002F\u002Fgithub.com\u002Feai-org\u002Fagent-toolkit\u002Fblob\u002Fmain\u002Ftest\u002Fcompact-skill-creator\u002Ffixtures\u002Fdouble-backtick\u002FSKILL.md",[],[]]