Blog

#Hooks

Posts tagged #Hooks

/goal in Claude Code: keep a session running until the condition holds

/goal in Claude Code: keep a session running until the condition holds

Anthropic shipped the /goal slash command. A session-scoped wrapper over a prompt-based Stop hook: you write a condition, a small evaluator reads the transcript after each turn, and the session ends only when it says yes. When to reach for /goal, when for /loop, when for a Stop hook — and why you write the condition for Haiku, not for the main model.

Jakub Kontra
Jakub KontraDeveloper
Claude Code and .env files — the certification answer that isn't enough

Claude Code and .env files — the certification answer that isn't enough

The certification question has one correct answer out of four — a PreToolUse hook on Read and Grep. In production, your `.env` still leaks through Bash. A working hook that closes it.

Jakub Kontra
Jakub KontraDeveloper
Claude Code hooks — the complete guide to guardrails that actually work

Claude Code hooks — the complete guide to guardrails that actually work

PreToolUse, PostToolUse, Notification. What Claude Code hooks are, how to configure them in settings.json, and the three patterns I use in every production repo.

Jakub Kontra
Jakub KontraDeveloper