3Hooks and the SDK

Hooks and SDK Self-Assessment

2 min read260 words

Time: 5 minutes

Confidence check across the hooks and SDK module. Rate each statement honestly — the final quiz tests the same material, so this is your chance to catch anything you want to revisit first.

1.I can explain the difference between PreToolUse and PostToolUse hooks — which runs when, and which can block.

2.I can implement a hook with a matcher, stdin JSON parsing, and the right exit codes.

3.I understand how PostToolUse hooks create self-correcting feedback loops via stderr.

4.I know the absolute-path security recommendation and the `settings.example.json` + setup script pattern for sharing hooks across a team.

5.I can name at least three hook types beyond PreToolUse and PostToolUse.

6.I can use the Claude Code SDK to run Claude programmatically from a TypeScript script.

7.I understand the read-only default and how to enable write access via `allowedTools`.

0 of 7 answered

You now understand how to extend Claude Code with hooks and integrate it into larger workflows with the SDK — time for the final quiz.