Learn Everything

Paths/Claude Engineer/MCP & Hooks / Hooks

Challengeadvancedubuntu:24.04Ask AI

Write the Safety Rules for Hooks

A hook that blocks without saying why is the fastest way to lose a team's trust. Write the rules that keep hooks predictable.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • File ~/claude/hook-policy.md exists○
  • The policy states how a blocking hook must behave○
  • The policy states the timeout rule and the failure rule○

02Walkthrough

1 of 4 revealed
  1. 01

    Write the policy heading

    A hook is code that runs on every step of every session - it needs a contract like any other.

    echo '# Hook policy\n\nHooks run on every step, so they have to be predictable and quiet.' > ~/claude/hook-policy.md
  2. 3 locked · each failed submit reveals one

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list