Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides creating Claude Code and Agent SDK hooks for event interception, validation, and security enforcement.
26% 96%+70 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 6 of 23 without it.
In a CI/CD build script, we need to force Claude Code plugins to check for updates on startup even if the core auto-updater setting is disabled. What environment variable controls this behavior?
Identifies the FORCE_AUTOUPDATE_PLUGINS environment variable.
This test ran on v3. v6 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
abstract:hooks-eval)abstract:hook-scope-guide)abstract:skill-authoring)Hooks are event interceptors that allow you to extend Claude Code and Claude Agent SDK behavior by executing custom logic at specific points in the agent lifecycle. They enable validation before tool use, logging after actions, context injection, workflow automation, and security enforcement.
This skill teaches you how to write effective, secure, and performant hooks for both declarative JSON (Claude Code) and programmatic Python (Claude Agent SDK) use cases.
New in 2.1.9: PreToolUse hooks can now return
additionalContextto inject information before a tool executes. This enables patterns like cache hints, security warnings, or relevant context injection.
Create a simple logging hook in .claude/settings.json:
{
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "echo \"$(date): Executed $(jq -r '.tool_name')\" >> ~/.claude/audit.log"
}]
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.