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
npx skills add brianbell-x/codehygiene --skill codehygiene -a claude-codeWhat 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.pyfor 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-code2Manually: put the files in place
~/.claude/skills/codehygiene/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/codehygiene/
1Skills CLI (Vercel)
npx skills add brianbell-x/codehygiene --skill codehygiene -a codex2Manually: put the files in place
.agents/skills/codehygiene/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add brianbell-x/codehygiene --skill codehygiene -a cursor2Manually: put the files in place
.cursor/skills/codehygiene/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install brianbell-x/codehygiene codehygiene2Manually: put the files in place
.github/skills/codehygiene/SKILL.md1Skills CLI (Vercel)
npx skills add brianbell-x/codehygiene --skill codehygiene -a gemini-cli2Platform CLI
gemini skills install https://github.com/brianbell-x/codehygiene --path codehygieneManually: put the files in place
.devin/skills/codehygiene/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.