Skip to main content
TrueCourse can install a pre-commit hook that blocks commits introducing new violations at or above a configured severity:

How it works

On every commit the hook runs truecourse analyze --diff against the repo’s last full analysis and blocks if any newly-introduced violation matches the configured block severities. The hook diffs against .truecourse/LATEST.json, so you need a committed baseline first; see Baselines & diff. Without it the hook has nothing to diff against.
Commits will take as long as a full diff analysis; on large repos that can be tens of seconds per commit. truecourse hooks install warns you and requires confirmation before writing the hook.
Bypass: git commit --no-verify (standard git).

Configuration

hooks install seeds <repo>/.truecourse/hooks.yaml with starter defaults; commit the file so your team shares one policy. The hook reads only from this file. If you delete it, the hook warns and passes every commit (no hidden code-level defaults). Current shape:
There’s also a Claude Code skill for this: /truecourse-hooks installs, configures, or removes the hook conversationally. See Claude Code skills.

Next steps

Claude Code skills

Drive analysis, fixes, and hooks conversationally from Claude Code.

Dashboard

Review what the hook caught, visually.