# code-quality

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.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 6091 repo stars
- Author: ChrisWiles
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/commands/code-quality.md
- Updated: 2026-01-06
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/code-quality

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/code-quality.md` — Call it with /code-quality. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/code-quality.md` — Call it with /prompts:code-quality. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/code-quality.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/code-quality.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ChrisWiles/claude-code-showcase/tree/HEAD/.claude/commands/code-quality.md

## When to use it
- inspect `.ts` and `.tsx` files in a directory
- spot TypeScript `any` usage
- check error and loading handling
- find missing empty states in lists
- sort findings by severity

## Example prompts
- Run `/code-quality <directory>` to review the selected folder.
- Check the TypeScript quality in `src` and group the findings by severity.
- Run `/code-quality <directory>` and inspect mutations, loading states, and empty lists.

## Similar
- [code-review-and-quality](https://affpapa.org/en/nevibecode/skills/code-review-and-quality.md) — skill · 92300 installs
- [thermo-nuclear-code-quality-review](https://affpapa.org/en/nevibecode/skills/thermo-nuclear-code-quality-review.md) — skill · 24700 installs
- [improve-code-quality](https://affpapa.org/en/nevibecode/skills/improve-code-quality.md) — skill · 2700 installs
- [nextjs-code-quality-enforcer](https://affpapa.org/en/nevibecode/hooks/nextjs-code-quality-enforcer.md) — hook · 2249 installs
- [pr-feedback-quality-gate](https://affpapa.org/en/nevibecode/skills/pr-feedback-quality-gate.md) — skill · 2000 installs
- [code-review-quality](https://affpapa.org/en/nevibecode/skills/code-review-quality.md) — skill · 1600 installs

From the same set: [chriswiles/claude-code-showcase](https://affpapa.org/en/nevibecode/by/chriswiles/claude-code-showcase.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
