
from aiekit15
Improve Python/ML code quality with type annotations, contract docstrings, exception audits, Hypothesis property-based tests, and mutmut mutation testing.
This skill provides a practical playbook for raising Python (especially ML) code quality. It guides annotating public APIs, writing contract-style docstrings, auditing exception handling, and applying property-based testing via Hypothesis. It also covers mutation testing (mutmut) to measure test strength, Ruff configuration for ML projects, and pre-mortem exercises to find fragile assumptions before they fail. The guidance is actionable — checklists, templates, and testing patterns you can drop into an existing codebase.
Use this skill when you need to harden an existing Python or ML pipeline: adding or tightening type annotations, writing contract docstrings for public functions, auditing try/except blocks, creating Hypothesis strategies for tensors or configs, diagnosing flaky tests, or assessing test coverage quality with mutation testing. It’s suited for code review, CI test hardening, and preparing modules for production use.
references/ with templates and deep-dives (has_references=true).Best used with agents that run or author code and CI tasks (Copilot-like code assistants, Claude Code, Codex/Code models) and any workflow that can surface or apply shell/python commands in a repo.
This skill has not been reviewed by our automated audit pipeline yet.