Industrial
Linguistics
Slide 14 of 55

Claude Code - Advanced

Slide 14 / 55

Practice

Add a linting hook

Check your work

You should be able to see a PostToolUse:Edit when you run hooks

Narration

Listen or continue with the transcript

Transcript

Exercise: Hook Script - Linter After Edit

---

Now it's time to put the anti-hallucination pattern into practice. In this exercise, you'll set up a hook script that runs your linter automatically after every edit.

The goal is simple: configure Claude Code to run your linter - ESLint, Pylint, or whatever your project uses - immediately after Claude makes any code change. This creates that feedback loop we talked about, where errors get caught and fixed in real-time.

Try it out, see how it catches issues automatically, and notice how Claude responds to the linter feedback. This is where theory meets practice.