code-quality — Claude Code command: code checks and setup
code-quality reviews TypeScript files in a chosen directory, runs npm checks, and groups findings by severity. Use it before a code change or review.
no license ★ 6,091 updated 2026-01-06
.claude/commands/code-quality.mdWhat code-quality does
The command searches a target directory for .ts and .tsx files while leaving out tests and generated files. It then runs npm run lint -- $ARGUMENTS and npm run typecheck. The agent also reviews error handling, loading behavior, and empty list states.
Findings are grouped as Critical, Warning, or Suggestion. The checklist covers TypeScript any, onError handlers on mutations, and disabled buttons during async work. The automated checks depend on the project having lint and typecheck npm scripts.
What it helps with
- inspect
.tsand.tsxfiles in a directory - spot TypeScript
anyusage - check error and loading handling
- find missing empty states in lists
- sort findings by severity
Example prompts for the agent
- Run
/code-quality <directory>to review the selected folder. - Check the TypeScript quality in
srcand group the findings by severity. - Run
/code-quality <directory>and inspect mutations, loading states, and empty lists.
How to install code-quality
Manually: put the files in place
.claude/commands/code-quality.mdCall it with /code-quality. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/code-quality.mdCall it with /prompts:code-quality. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/code-quality.prompt.mdManually: put the files in place
.gemini/commands/code-quality.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about code-quality
How do I install code-quality in Claude Code?
Create the command file at .claude/commands/code-quality.md.
What does code-quality do?
It finds .ts and .tsx files, runs npm run lint -- $ARGUMENTS and npm run typecheck, then reports findings under Critical, Warning, or Suggestion.
What does the manual review cover?
It checks any, error handling, loading states, empty lists, mutation onError handlers, and button state during async operations.