agentify-project
Make a project ready for AI agentic engineering by converging it toward a canonical agent-neutral structure — a lean AGENTS.md index with progressive…
Run nx format, lint, test, and build on affected or specified projects, then fix unambiguous failures
$ npx -y skills add eai-org/agent-toolkit --skill run-nx-checks --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/run-nx-checksContext preview
The summary Claude sees to decide when to auto-load this skill.
Run nx format, lint, test, and build on affected or specified projects, then fix unambiguous failures
name: run-nx-checks description: Run nx format, lint, test, and build on affected or specified projects, then fix unambiguous failures context: fork allowed-tools: Bash, Read, Edit, Write, Grep, Glob license: MIT metadata: version: "1.8"
Run format, lint, test, build. Fix unambiguous failures. Report anything judgment-laden.
`$ARGUMENTS` — optional, space-separated: `[cpuCount] [projectName] [--remote-cache]`. Number token → `cpuCount`. Non-number, non-flag token → `projectName`. `--remote-cache` flag → opt back into the remote cache by dropping the remote-cache-off prefix. Default `cpuCount` = cores - 4 (min 1); count cores with `getconf _NPROCESSORS_ONLN` (`nproc` is GNU-only). Default project scope = affected. Default remote-cache state = off (see Steps).
Run nx commands from wherever `nx.json` lives in this repo (commonly the root; in some repos a subdirectory).
Keep the Nx daemon warm so the project graph is reused across targets:
NX_DAEMON=true npx nx daemon --start >/dev/null 2>&1 || true
`nx affected` diffs against the *local* default branch, which is often stale or missing. Resolve the remote-tracking ref once and write it literally into every `affected`, `format:write` and `show projects --affected` command below as `--base=$base` (each call is a fresh shell, see Steps):
base=${NX_BASE:-$(node -p 'const j=require("./nx.json"); j.defaultBase ?? j.affected?.defaultBase ?? "main"' 2>/dev/null || echo main)}
base=${base#remotes/}; [[ $base == */* ]] || base="origin/$base"
GIT_TERMINAL_PROMPT=0 GIT_SSH_COMMAND='ssh -o BatchMode=yes -o ConnectTimeout=15' git fetch --quiet "${base%%/*}" "${base#*/}" || echo "fetch failed: base may be stale"
git rev-parse --verify --quiet "$base" >/dev/null && echo "base=$base" || echo "no such ref: omit --base"reads it itself; the fetch still runs).
untracked files, so an agent's unstaged edits vanish and every check passes vacuously.
final report, and never retry outside the sandbox for it.
Why: [affected-base-rationale.md](affected-base-rationale.md).
errors, test expectations that mirror a clear code change.
assertion, errors pointing at unrelated areas, pre-existing failures unrelated to recent work, anything where multiple plausible fixes exist. Running forked, you can't ask mid-run: leave such failures unfixed and carry them, with your analysis, into the final report.
Affected runs can balloon. Before steps 3–4, check scope with the graph-only `npx nx show projects --affected --base=$base` (fast, no build):
changed files, so an unreadable `.env` reads as *changed* and marks its project affected. Repos with `.env`-bearing apps (e.g. `apps/*-api`) thus drag those into every affected run and build them for nothing. Tell-tale: `git status` prints `<path>/.env: Operation not permitted` for exactly those projects. Fix: rerun the nx commands with the sandbox disabled so `.env` reads succeed, or `--exclude` those projects.
workspace), don't build the world unprompted: skip steps 3–4 and report the project count and scope in the final report so the user can re-run with an explicit scope.
**Scope is mandatory — never narrow it yourself.** With no `$projectName` argument, *every* target runs at full scope — `nx affected` for lint/test/build, whole-changeset `format:write`. The single-project forms in the steps below apply **only** when the user explicitly passed `$projectName`. Never substitute `nx run <proj>:<target>`, `nx <target> <changedLib>`, or file-scoped `format --files` for the affected sweep: that skips every other affected project — exactly where a shared-lib change regresses (a dependent project whose tests import the changed lib). And never add `--skip-nx-cache` (see below).
Always prefix each nx command with **both** remote-cache-off env vars inline (`NX_POWERPACK_CACHE_MODE=no-cache` for Powerpack remote caches, `NX_NO_CLOUD=true` for Nx Cloud). They're additive and the unrecognized one is a no-op, so this is safe regardless of which remote-cache backend (if any) the repo uses.
The invariant: **remote cache always off (unless the user passed `--remote-cache`), local cache always on** — always disable, never autodetect (a passing shell-side auth check doesn't predict the in-process credential chain). Why: [remote-cache-rationale.md](remote-cache-rationale.md).
If the user explicitly passed `--remote-cache`, drop both prefixes. Expect pipeline hits on `build` only: `--fix` and `--maxWorkers=1` are hashed overrides, so lint and test entries never match a pipeline run without them — keep the flags regardless.
**Always keep the local cache on.** The env vars above disable only the _remote_ read-through cache; the local Nx cache must stay enabled so unchanged targets are replayed instead of re-run. Do **not** add `--skip-nx-cache` (nor `NX_SKIP_NX_CACHE=true`) to any command — it bypasses the local cache too, making every run slower for no benefit
A collection of generic agentic tools for common engineering tasks, designed to work with any AI agent on any kind of software project.
Make a project ready for AI agentic engineering by converging it toward a canonical agent-neutral structure — a lean AGENTS.md index with progressive…
Check how much of a ticket is already implemented — split it into requirement blocks, judge each against the code, and save a human-readable TICKET-STATUS…
Draft, rewrite, or refine a doc for maximum token economy without losing any rule or intent. Use for docs kept in version control and regularly re-read by…
Author or refine a skill for maximum token economy without losing intent. Use when creating any new skill or editing an existing `SKILL.md`.
Audit what auto-loads into an agent session's context window and suggest lean, reversible fixes to cut startup tokens.
Turn a refined requirements document into a structured implementation PLAN.md a fresh session can execute. Planning only — decides the "how", not the "what".…