From nexa-claude-nextjs
Runs oxlint and oxfmt on TypeScript/JavaScript files to fix lint errors, enforce cyclomatic complexity limits, and apply consistent formatting. Use when the user asks to "lint", "format code", "run code quality checks", or mentions code quality, formatting, or static analysis.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nexa-claude-nextjs:code-qualityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run these checks after generating or modifying TypeScript/JavaScript files.
Run these checks after generating or modifying TypeScript/JavaScript files.
This applies to implementation code, test files, and any .ts/.tsx/.js/.jsx files.
It does not apply to Prisma schema files.
Read and follow ${CLAUDE_PLUGIN_ROOT}/shared/readiness/NEXA_RULES_GATE.md.
Verify oxlint and oxfmt are available in the project:
npx oxlint --version
npx oxfmt --version
If not installed, add them:
npm install -D oxlint oxfmt
If the project does not yet have an oxlintrc.json at the root, create one:
{
"rules": {
"eslint/complexity": ["warn", { "max": 10 }]
}
}
This enforces a cyclomatic complexity ceiling of 10 per function. Functions exceeding this threshold must be refactored before the task is considered complete.
Run oxlint with auto-fix on the source and test directories:
npx oxlint --fix --tsconfig tsconfig.json src/
eslint/complexity): refactor the function —
extract helpers, use early returns, or simplify conditional logic.Format all changed files with oxfmt:
npx oxfmt --write src/
oxlint --fix (fixes code issues, reports complexity violations)oxfmt --write (normalizes style without changing semantics)This order matters because the formatter may reformat the linter's fixes, but not vice versa.
The skill is complete when:
npx oxlint --tsconfig tsconfig.json src/ exits with 0 errors and 0 warningsnpx oxfmt --check src/ exits with code 0 (all files already formatted)npx claudepluginhub nexadevapp/nexa-claude-skills-marketplace --plugin nexa-claude-nextjsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.