skills/lint-first-authoring/SKILL.md
Lint-first coding workflow for this repo. Use when authoring or editing code and the goal is to produce changes that pass lint on the first try by matching local patterns, applying repo-specific constraints early, and validating before finishing. Do NOT use when the main task is fixing existing lint failures after they appear; use lint-error-resolution for that.
npx skillsauth add bkinsey808/songshare-effect lint-first-authoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Requires: file-read, terminal (linting/testing). No network access needed.
Full reference: /docs/lint-best-practices.md
AGENTS.md and docs/ai/rules.md.npm run lint after meaningful changes and fix any issues before finishing.Validation note:
npm run lint is the repo-standard lint command.oxlint; do not swap in npx eslint unless a specialized check explicitly requires it.any; use unknown plus guards or schema validation.import type when appropriate.useEffect.Use this prompt when the user wants an agent to write lint-clean code:
Read AGENTS.md, docs/ai/rules.md, and docs/lint-best-practices.md first.
Match surrounding patterns exactly.
No any, no barrel files, no test-file lint disables, and no unnecessary memoization.
Use explicit types, safe validation, direct imports, and useEffect comments.
Run npm run lint after editing and fix any issues before finishing.
npm run lint was run and whether it passed.Input: "Add a new React hook and keep it lint-safe."
Expected: Reads the target file and nearby patterns, loads react-best-practices, writes the hook without any or manual memoization, adds any required useEffect comments, runs npm run lint, and reports the validation result.
Input: "Generate a new API helper that should pass lint on first try."
Expected: Reads nearby API helpers, avoids unsafe assertions, prefers schema validation or guards, uses direct imports, runs npm run lint, and reports what was checked.
tools
Zustand state management patterns for this project — store creation, selectors, Immer middleware, async actions with loading states, devtools, persist, and testing. Use when authoring or editing Zustand stores (use*Store files) or components that subscribe to stores. Do NOT use for React component structure or TypeScript-only utilities.
testing
How to write, update, or split skill files in this repo. Use when creating a new SKILL.md, updating an existing one, or deciding whether to put content in a skill vs. docs/.
development
Complete guide for testing React hooks — renderHook, Documentation by Harness, installStore, fixtures, subscription patterns, lint/compiler traps, and pre-completion checklist. Read docs/testing/unit-test-hook-best-practices.md for the full reference.
development
Vitest unit test authoring for this repo — setup, mocking, API handler testing, and common pitfalls for non-hook code. Use when the user asks to add, update, fix, or review unit tests for utilities, components, API handlers, or scripts. Do NOT use for React hook tests — load unit-test-hook-best-practices instead.