Three domain-specific code quality assurance skills based on Robert C. Martin's Clean Code heuristics. Each version extends generic Clean Code checks with domain-specific bad-smell detection.
clean-code-audit/
├── README.md
├── LICENSE
├── generic/
│ ├── SKILL.md
│ └── scanner.py
├── ai/
│ ├── SKILL.md
│ └── scanner.py
└── quant/
├── SKILL.md
└── scanner.py
The full Clean Code book has been distilled into a bilingual Chinese-English theme-based digest in the docs/ directory — 15 theme files covering all 17 chapters + 3 appendices.
Use it alongside the scanners as a reference: when the scanner flags an issue with a heuristic ID (e.g. G30), look it up in the digest for the full context.
| Version | Scanner | Domain-Specific Heuristics |
|---|---|---|
| Generic | generic/scanner.py |
Clean Code heuristics only (G1–G36, N1–N7, F1–F4, etc.) |
| AI/ML | ai/scanner.py |
Data leakage, missing seeds, hardcoded hyperparameters, model versioning (AI1–AI8) |
| Quant | quant/scanner.py |
Lookahead bias, hardcoded tickers, transaction costs, signal-position coupling (Q1–Q8) |
python3 generic/scanner.py --file src/main.py
python3 generic/scanner.py --dir ./project --ext .py,.java
python3 generic/scanner.py --git-diffpython3 ai/scanner.py --file train.py
python3 ai/scanner.py --dir ./ml-project --ext .py
python3 ai/scanner.py --git-diffpython3 quant/scanner.py --file backtest.py
python3 quant/scanner.py --dir ./quant-project --ext .py
python3 quant/scanner.py --git-diffFrom any machine with GitHub access, install all three skills in one command:
npx skills add elonwoo-02/clean-code-audit --global --yesOr install a single version:
npx skills add elonwoo-02/clean-code-audit@code-quality --global --yes
npx skills add elonwoo-02/clean-code-audit@code-quality-ai --global --yes
npx skills add elonwoo-02/clean-code-audit@code-quality-quant --global --yesThis installs the skill symlinks into ~/.agents/skills/ and makes them available to Claude Code, Cursor, Codex, GitHub Copilot, and other compatible agents.
If you cannot reach GitHub from your machine (network/firewall), clone the repo first and install from the local path:
git clone https://github.com/elonwoo-02/clean-code-audit.git npx skills add --global --yes ./clean-code-audit
Each subdirectory is a standalone skill — copy its contents into a ~/.claude/skills/<name>/ folder.
# Generic
mkdir -p ~/.claude/skills/code-quality
cp generic/SKILL.md ~/.claude/skills/code-quality/
cp generic/scanner.py ~/.claude/skills/code-quality/
# AI/ML
mkdir -p ~/.claude/skills/code-quality-ai
cp ai/SKILL.md ~/.claude/skills/code-quality-ai/
cp ai/scanner.py ~/.claude/skills/code-quality-ai/
# Quant
mkdir -p ~/.claude/skills/code-quality-quant
cp quant/SKILL.md ~/.claude/skills/code-quality-quant/
cp quant/scanner.py ~/.claude/skills/code-quality-quant/All three scanners use only Python 3 standard library (ast, re, argparse). No pip install needed.
MIT