Tips, tricks, and lessons from building software.
Tips, tricks, and lessons from building software — a personal dev blog by Tommy.
Controlling Claude with Hook Exit Codes and JSON
Exit codes give hooks blunt control; JSON on stdout gives them structured decisions like denying a tool call with a reason.
Running Checks When a Session Starts
A SessionStart hook can load fresh project context into every session so Claude begins with the state that matters.
Notifying Yourself with Notification Hooks
A Notification hook can send a desktop alert or sound when Claude needs your attention, so you can step away and still stay in the loop.
Debugging Hooks That Don't Fire
A checklist for when a hook stays silent: verify the config, the event, the matcher, the exit code, and the command itself.
What Is the Model Context Protocol?
MCP lets Claude Code reach external systems by connecting to servers that expose tools and resources it can use.
Adding Your First MCP Server with claude mcp add
Use claude mcp add to connect a server, naming it, choosing a transport, and passing any command or URL it needs.