# Prompt Hook

> A hook that asks a Claude model a yes or no question.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** type: prompt, $ARGUMENTS

## Think of it like

It is like you ask a friend a yes or no question. Then you go on.

## Definition

A prompt hook is a hook whose type is prompt, so it sends a prompt to a Claude model for a single answer. $ARGUMENTS in the prompt is swapped for the event's JSON. The model replies with ok true to allow, or ok false with a reason. It is used where the check needs judgment, not a fixed rule. Its default timeout is 30 seconds.

## Example

Lucy cannot write a script that knows if a task is finished. A prompt hook on Stop asks a model to judge it.

## Example code

```json
{
  "type": "prompt",
  "prompt": "Check if every task the user asked for is done: $ARGUMENTS"
}
```

Ask a model if Claude is really done.

## Why it matters

Some checks are about meaning. A model can judge them where a script cannot.

## Common mistake

Leaving out $ARGUMENTS. Then the model judges with no idea of what took place.

## Three principles

- **Asks a model.** One answer.
- **ok true or false.** With a reason.
- **For judgment.** Not fixed rules.

## Related terms

- [Agent Hook](https://learn.benibix.com/term/ai/agent-hook)
- [Stop Hook](https://learn.benibix.com/term/ai/stop-hook)
- [Command Hook](https://learn.benibix.com/term/ai/command-hook)

## Told apart from

- [Prompt Hook vs Agent Hook](https://learn.benibix.com/compare/prompt-hook-vs-agent-hook): People think both just ask a model. A prompt hook asks once and sees only the event. An agent hook starts a helper that can open files with tools, for up to 50 turns. Use a prompt hook for a quick judgment, and an agent hook when the answer is in the files.

---

Source: https://learn.benibix.com/term/ai/prompt-hook
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
