Skip to content

eslint-config — Agent usage

These are shared engineering skills.

Trigger

MUST load before writing or refactoring TypeScript or React in a project that follows the nexload way: creating, naming, moving or splitting a file, module, component or helper; extracting repeated code; exports; branching on a union or status. Picks the file role, module location and helper rung. Lint and enola enforce the mechanical rules.
Terminal window
npx skills add gecut/nexload-sdk --skill nexload-way

Trigger

Use when the primary task changes or evaluates the shipped contract of a publishable Nexload TypeScript package: ownership, public exports and subpaths, entrypoint runtime isolation, core/adapter direction where shared policy exists, metadata, dependencies or peers, packed artifacts, package-scoped compatibility, or README/API alignment. Do not use for internal-only code, React behavior, visual styling, repository-wide runtime standards, or release execution.
Terminal window
npx skills add gecut/nexload-sdk --skill nexload-package

Enable the nexload-way rules (file roles, import boundaries, size limits) per project:

import { nexloadConfig } from "@nexload-sdk/eslint-config";
export default nexloadConfig({ doctrine: true });

The exported doctrineConfig (also at @nexload-sdk/eslint-config/doctrine) can be spread into a custom flat config instead. The option is off by default; existing projects are never migrated implicitly. Whole-project moves: Migrate a Project to the nexload Way.

The nexload-doctrine bin ships with the package:

Terminal window
pnpm exec nexload-doctrine names <path...>
pnpm exec nexload-doctrine suggest <path> --kind <role>
pnpm exec nexload-doctrine verify [--base <ref>]
  • names checks file names and prints violations.
  • suggest prints the correct file name and export symbol for a role. Verb-named roles (util, service and the Payload before-* / after-* hooks) print a <verb><What> symbol hint, such as <verb>Slug. A junk-drawer name (utils, helpers, common) exits 2: split the file by responsibility first.
  • verify runs ESLint and the name check on changed files, then enola check on the whole repository. A missing tool prints <tool>: not run (<reason>). An installed ESLint that crashes or prints unreadable output prints eslint: failed (eslint exit <n>) and its error line, and counts as a failure. A file-name finding reported by both the name check and ESLint’s nexload/file-role rule is printed and counted once. The last line is verify: <n> violation(s); not run: ....

The skill also ships inside the package at node_modules/@nexload-sdk/eslint-config/skills/nexload-way/. Without a bin, run node node_modules/@nexload-sdk/eslint-config/skills/nexload-way/scripts/doctrine.mjs verify.

Paste into the consumer project’s AGENTS.md:

## Code conventions — MANDATORY
Load the installed `nexload-way` skill before you create, name, move or split a file, module, component or helper, or extract repeated code. Open only the reference its index names.
- File name: `[_]<what>.<role>[.server|.client].<ext>`; `<what>` never repeats the folder name. No `export default` outside framework-mandated files. Branch on unions with `match().exhaustive()`, not `switch`.
- Lint and check messages start with a rule ID (for example `[ST-06]`). Fix the code; never suppress the rule.
- Before reporting done, run `pnpm lint` and `pnpm exec nexload-doctrine verify`. Report any check that did not run as not run.
Install: `npx skills add gecut/nexload-sdk --skill nexload-way` (also at `node_modules/@nexload-sdk/eslint-config/skills/nexload-way/`).
For @nexload-sdk/eslint-config, load nexload-way when its trigger matches. Read the package bundle and check public exports against the installed version before editing.

Scoped Markdown bundle.

Configure ESLint for the project runtime. Use @nexload-sdk/eslint-config and nexload-way. Inspect the installed version and show a minimal typed example for my project.
Review my @nexload-sdk/eslint-config integration against the optimization page. Identify the relevant source for each finding and one test for the highest-risk behavior.