Skip to content

Quiz

Hooks: rules the harness enforces so the agent cannot forget

Read the lesson Study guide

Check what you learned

10 questions from this lesson. Answers are checked as you go; nothing is recorded.

  1. 1 / 10

    What is the difference between a CLAUDE.md rule and a hook?

    Hint

    The note and the lock.

  2. 2 / 10

    According to Anthropic, what is the sign that a rule belongs in a hook?

    Hint

    Capital letters are a clue.

  3. 3 / 10

    Which hook moment runs just before the agent edits a file or runs a command?

    Hint

    Before the tool.

  4. 4 / 10

    What does exit code 2 from a hook do?

    Hint

    Blocked, with a reason.

  5. 5 / 10

    What does a matcher such as Edit|Write do?

    Hint

    Narrows it.

  6. 6 / 10

    The Stop hook in Anthropic's example blocks the finish when what happens?

    Hint

    No finishing with errors.

  7. 7 / 10

    Where would you put a hook that should apply to every project on your computer in Claude Code?

    Hint

    Your home folder.

  8. 8 / 10

    What does Cursor say about hooks set at the user level?

    Hint

    Not everywhere.

  9. 9 / 10

    Which of these is the safest first hook to try?

    Hint

    Harmless and useful.

  10. 10 / 10

    Why read a hook carefully before installing it?

    Hint

    Power and risk.

After the quiz

Back to the lesson