Fetching from the wire…
Public story · 2026-07-02 · high
A skill can now block a destructive command or redact a secret for anyone who installs it, without altering other sessions.
Why now: Claude Code's hooks docs describe the skill-level scoping as how a self-contained skill ships its own safety rails, not as a swap-in for settings.json.
Claude Code hooks can now live inside a skill's own frontmatter, not just settings.json, per Claude Code's hooks docs.
That means a skill can carry deterministic guards, like blocking a destructive command, enforcing a test, or redacting a secret. It doesn't impose those rules on every other session on the machine.
Hooks are Claude Code's way of enforcing rules that don't depend on the model choosing to follow them. Defined in settings.json, they apply to every session. Defined in a skill's or subagent's frontmatter, they only fire while that component is active.
That's useful for anyone packaging a skill for someone else to run. A scoped hook ships with the skill itself, so it doesn't depend on the person installing it to configure the same rule in their settings.json.
The docs don't say what happens when a scoped hook and a settings.json hook target the same event, or which one wins.
Each link below shares sources, entities, or timing with this story.
Same source domain / Shared topic / Tension
Reported by the same outlet (code.claude.com); overlapping topics (claude, code, deterministic, skill); pushes against this story (vs).
Same source / Shared topic
Cite the same source (docs); overlapping topics (claude, code, hook).
Same source domain / Shared topic
Reported by the same outlet (code.claude.com); overlapping topics (claude, code, frontmatter, hook, skill).
Same source domain / Shared topic / Tension
Reported by the same outlet (code.claude.com); overlapping topics (active, claude, code); pushes against this story (against).
Same source domain / Shared topic
Reported by the same outlet (code.claude.com); overlapping topics (claude, code, command, skill).
Reported by the same outlet (code.claude.com); overlapping topics (claude, code, command, directly).
Reported by the same outlet (code.claude.com); overlapping topics (block, carry, claude, code).
Reported by the same outlet (code.claude.com); overlapping topics (block, claude, code, hook).