PulseAugur
EN
LIVE 20:40:28

Claude Code hooks: Understanding JSON structure and usage

This article details the JSON structure used by Claude Code hooks, explaining the common fields present in every event and the specific fields added by different event types like PreToolUse and PostToolUse. It covers how to access and utilize this JSON data, particularly with tools like `jq`, and provides examples of script configurations for handling hook events, including file protection mechanisms. AI

IMPACT Provides technical guidance for developers using Claude Code, detailing its hook system.

RANK_REASON Article explains a specific feature and usage pattern of a developer tool.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code hooks: Understanding JSON structure and usage

How we ranked this

Signal score
26 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
Article explains a specific feature and usage pattern of a developer tool.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · aicoding-guide ·

    The JSON your Claude Code hooks receive on stdin: common and per-event fields

    <p><em>Originally published at <a href="https://aicoding-guide.com/en/posts/claude-code-hooks-stdin-json/" rel="noopener noreferrer">https://aicoding-guide.com</a>.</em></p> <p>You have the hook configured and your script is running, but nothing tells you which file was just edit…