Gate the turn, don't take its word
"All checks pass" in a summary is a claim, not a result. On a run nobody watched, the question is whether Claude ran the checks at all.
Stop being the one who remembers to ask. A Stop hook fires when Claude wants to end its turn, and it can refuse. Wire the queries project's type check into that gate, so a turn cannot end while the project is broken and the failure goes straight back to Claude to fix.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Claude Code in Action
คำแนะนำการฝึกหัด
- Start Claude Code with
claude. - Ask Claude to add a
Stophook to.claude/settings.jsonthat runsnpx tsc --noEmit. - Have the hook refuse to end the turn when the check fails, so the failure is fed back to Claude rather than to you.
- Type
/exitto exit Claude Code.
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำจริง
เปลี่ยนทฤษฎีให้เป็นการลงมือทำด้วยแบบฝึกหัดเชิงโต้ตอบหนึ่งในของเรา
เริ่มแบบฝึกหัด