Module 07 References
Official Documentation
-
Claude Code Hooks
https://docs.anthropic.com/en/docs/claude-code/hooks
Primary reference for hook event types, payload schemas, exit code behavior, and
configuration structure. Read this before writing any hook. -
Settings Reference
https://docs.anthropic.com/en/docs/claude-code/settings
Complete annotated schema for settings.json — permissions, env, hooks, mcpServers.
Covers global vs project vs local precedence. -
Slash Commands (Skills)
https://docs.anthropic.com/en/docs/claude-code/slash-commands
How skill files are structured, loaded, and invoked. Covers frontmatter fields,
trigger conditions, and args. -
Claude Code Memory (CLAUDE.md)
https://docs.anthropic.com/en/docs/claude-code/memory
Explains the relationship between CLAUDE.md, skills, and session context. Clarifies
when to use each mechanism.
Key Concepts Quick Reference
Hook Event Types
| Event | When it fires | Exit code effect |
|---|---|---|
| PreToolUse | Before tool executes | Non-zero blocks tool; stdout sent to Claude |
| PostToolUse | After tool executes | Exit code ignored; stdout ignored |
| Notification | When Claude needs attention | OS-level alerting |
| Stop | After Claude finishes response | Cleanup / notifications |
Settings Precedence (highest to lowest)
.claude/settings.local.json(project + machine, never committed).claude/settings.json(project, committed to repo)~/.claude/settings.local.json(global + machine, never committed)~/.claude/settings.json(global defaults)
Skill File Frontmatter Fields
name: skill-name # Required. Must match filename.
description: string # Optional. Shown in /help.
trigger: string # Optional. Natural language auto-invoke condition.
args: # Optional. Named parameters.
- name: param-name
description: string
default: stringPermissions Syntax
"allow": ["Read", "Bash(git *)", "Bash(npm run *)"]
"deny": ["Bash(sudo *)", "Bash(rm -rf *)"]Tools and Libraries Mentioned
- black: https://black.readthedocs.io — Python auto-formatter used in hook examples
- isort: https://pycqa.github.io/isort — Python import sorter
- flake8: https://flake8.pycqa.org — Python linter
- gh CLI: https://cli.github.com — GitHub CLI used in skill examples
- osascript: macOS built-in AppleScript runner used for desktop notifications
Related Modules in This Curriculum
- Module 01: Environment setup — installing Claude Code, initial configuration
- Module 05: MCP — registering MCP servers in mcpServers section of settings.json
- Module 09: Advanced agents — using skills + hooks in complex multi-step agents