Skip to main content
skill CX Codex

codehygiene — Claude Code skill for code checks

The codehygiene Claude Code skill checks code readability after writing, editing, refactoring, or reviewing code. It flags issues such as deep nesting and swallowed errors that formatters miss.

no license ★ 287 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add brianbell-x/codehygiene --skill codehygiene -a claude-code
Open on GitHub

What codehygiene does

codehygiene scans changed files in Python, TypeScript, JavaScript, Rust, Go, C, C++, Zig, Java, C#, and Lua. It flags deep nesting, redundant comments, swallowed errors, unclear variable names, magic indices, and duplicated blocks. Run the check after each coding change.

The runner needs Python and the skill files, including weights.npz; it works offline. If numpy is not installed, use uv run --with numpy. To scan files, run python3 "<SKILL_DIR>" <touched-files> --check. Run it again after fixes; a clean check exits with code 0.

What it helps with

  • catch swallowed errors and unsafe fallbacks
  • flatten deeply nested control flow
  • replace unclear names and magic indices
  • remove redundant comments and duplicated blocks

Example prompts for the agent

  • Check the readability of my changed files and fix every finding.
  • Review src/parser.py for readability problems.
  • Run codehygiene on the files changed in this refactor.

How to install codehygiene

1Skills CLI (Vercel)

npx skills add brianbell-x/codehygiene --skill codehygiene -a claude-code

2Manually: put the files in place

~/.claude/skills/codehygiene/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/codehygiene/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about codehygiene

How do I install codehygiene in Claude Code?

Run npx skills add brianbell-x/codehygiene --skill codehygiene -a claude-code. The skill file is installed at ~/.claude/skills/codehygiene/SKILL.md.

What does codehygiene do?

It scans changed code for readability problems, including deep nesting, swallowed errors, duplication, and unclear names. Run it after writing or editing code.

What does codehygiene need to run?

It needs Python and the skill files, including weights.npz. If numpy is missing, run it with uv run --with numpy; the check works offline.

Similar skills

All skills for Code review and refactoring →

Project sponsors

Companies that keep this analytics open