| name | python-pre-commit |
| description | Configures pre-commit hooks for uv-based Python projects by producing a valid `.pre-commit-config.yaml` with the canonical hook set. Use this when a uv Python project needs pre-commit setup or an existing config needs hooks merged in. |
| complexity | medium |
| risk_profile | ["code_modification","external_tooling"] |
| inputs | ["Target project directory path.","Whether `.pre-commit-config.yaml` already exists in the project root.","Whether pyright strict mode is used in the project (determines optional pyright hook inclusion).","Target ruff rev tag from ruff-pre-commit releases (independent of the uv-installed ruff version)."] |
| outputs | ["`.pre-commit-config.yaml` written to the project root.","Install instructions reported to the user: `uv run pre-commit install` and `uv run pre-commit run --all-files`."] |
| use_when | ["A uv-based Python project has no `.pre-commit-config.yaml` and needs one created from scratch.","An existing `.pre-commit-config.yaml` in a uv project is missing canonical hooks and needs them merged in.","The user asks to \"set up pre-commit\", \"add pre-commit hooks\", or \"configure commit hooks\" for a uv Python project."] |
| do_not_use_when | ["The project does not use uv (pip, poetry, conda, or bare virtualenv).","The request is about CI/CD pipeline configuration (GitHub Actions, pre-commit.ci cloud service).","The request is about secrets scanning hooks (detect-secrets, gitleaks, etc.).","The request asks for `.git/hooks/` file creation rather than `.pre-commit-config.yaml`."] |