Skill
py-code-health
py-code-health — a Claude Code skill from l-mb/python-refactoring-skills
Features
- ✓Automated Python refactoring for code quality
- ✓Detects and fixes security vulnerabilities
- ✓Reduces cyclomatic and cognitive complexity
- ✓Improves test coverage and effectiveness
- ✓Removes dead code and duplication
- ✓Upgrades tooling and syntax
- ✓Configures linters and type checkers
- ✓Sets up automated quality checks with Git hooks
- ✓Visit [GitHub](https://github.com/l-mb/python-refactoring-skills) for more details
Installation Guide
bash
git clone https://github.com/l-mb/python-refactoring-skills.git
cd python-refactoring-skillsbash
# Option A: Symlink approach (recommended - easier to update)
./scripts/install-symlinks.sh # Stable skills only (default)
./scripts/install-symlinks.sh --install-wip # All skills including WIP
# Option B: Copy approach (standalone installation)
cp -r skills/py-refactor skills/py-security skills/py-complexity skills/py-quality-setup skills/py-git-hooks skills/py-code-health skills/py-modernize ~/.claude/skills/ # Stable only
cp -r skills/* ~/.claude/skills/ # All skillsSkill Status: Skills are tagged as stable (mostly reviewed) or wip (work-in-progress, functional but may change). Default installation includes only stable skills.
Skills install analysis tools into your project's virtual environment automatically.
To pre-install, add to your pyproject.toml:
toml
[dependency-groups]
dev = ["radon", "vulture", "pylint", "bandit", "lizard", "pytest-cov", "mutmut", "wily", "xenon", "pyupgrade", "ruff", "mypy", "basedpyright", "pre-commit"]Then run: uv sync && source .venv/bin/activate
Note: Tools are tracked in pyproject.toml for reproducibility. See [docs/installation.md](docs/installation.md) for details.
Basic Usage
In Claude Code, invoke any skill:
text
# Quick security audit
Please use py-security to scan for vulnerabilities
# Reduce complexity in specific module
Use py-complexity to refactor the handlers.py module
# Comprehensive refactoring
Use py-refactor to systematically improve this codebaseSee [docs/quick-start.md](docs/quick-start.md) for more examples.