pre-commit SKIP env silently skips hooks in CI
pre-commit reads the SKIP environment variable and skips any hook id listed in it. A SKIP value set at the workflow or org level can silently disable the hooks you rely on in CI.
What this error means
A specific hook prints "Skipped" while others run, and the job passes. The hook is not disabled in the config; a SKIP env value names it.
pre-commit
flake8...............................................(SKIP=flake8)Skipped
black....................................................................PassedCommon causes
A SKIP value is set in the environment
A workflow env, a job env, or an organization-level variable sets SKIP to a comma-separated list of hook ids, and pre-commit honours it.
A debugging SKIP was left in place
Someone set SKIP to bypass a hook temporarily and the value persisted into CI.
How to fix it
Unset or correct SKIP in CI
- Search workflow and org env for a
SKIPvalue. - Remove it, or narrow it to hooks you truly want skipped.
- Re-run and confirm the previously skipped hook now executes.
.github/workflows/ci.yml
env:
SKIP: ""Gate on the SKIP value explicitly
Fail the job if a critical hook id appears in SKIP so it cannot be silently bypassed.
.github/workflows/ci.yml
- run: |
case ",$SKIP," in *,flake8,*) echo "flake8 must not be skipped"; exit 1;; esacHow to prevent it
- Do not set
SKIPat the workflow or org level. - Audit env for leftover SKIP values that disable gates.
- Fail CI if a required hook id is present in SKIP.
Related guides
pre-commit only checks changed files in CI (missing --all-files)Fix pre-commit checking only changed files in CI - without --all-files pre-commit runs against the staged dif…
pre-commit hook with stages: [manual] never runs in CIFix a pre-commit hook that never runs in CI because it is set to stages: [manual] - the default `pre-commit r…
pre-commit "Hook id ... not present in repo" in CIFix pre-commit "Hook id `X` not present in repository ..." in CI - the hook id in your config does not exist…