SKIP env var: Skip Hooks in CI
Setting SKIP to a comma-separated list of hook ids tells pre-commit to skip those hooks for this run.
SKIP is the clean way to bypass a specific hook in one environment without editing the config. It is far better than --no-verify, which disables everything.
What it does
pre-commit reads the SKIP environment variable as a comma-separated list of hook ids and silently skips each one for that invocation. The rest of the hooks run normally. It affects only the current process, so it is ideal for a single CI step.
Common usage
# skip one hook in a CI step
SKIP=no-commit-to-branch pre-commit run --all-files
# skip several
SKIP=flake8,mypy pre-commit run --all-filesOptions
| Variable / flag | What it does |
|---|---|
| SKIP=id1,id2 | Skip these hook ids for this run |
| SKIP (empty) | Skip nothing (the default) |
| --no-verify (git) | Bypass ALL hooks; blunt, avoid in favor of SKIP |
| PRE_COMMIT_ALLOW_NO_CONFIG | Let pre-commit run when no config exists |
In CI
Prefer SKIP over git commit --no-verify so you disable exactly one check, not the whole suite. A common case is skipping no-commit-to-branch on a release automation that legitimately commits to main, or skipping a hook that needs network on an offline runner.
Common errors in CI
Listing an id that does not exist in SKIP is harmless; it is ignored. A skipped hook prints "Skipped" in the output, so if a check you expected did not run, grep the log for SKIP set in the environment. Note SKIP takes hook ids, not repo names; a repo url in SKIP skips nothing.