hooks-test
CommunityDemonstrates hooks: PreToolUse, PostToolUse.
System Documentation
What problem does it solve?
This Skill provides a ready-to-use demonstration of an event-driven hooks system that injects pre-execution, post-execution, and stop-time hooks around tool usage in Claude Agent SDK workflows.
Core Features & Use Cases
- PreToolUse hooks run before a tool is executed, enabling validation, setup, and contextual preparation.
- PostToolUse hooks run after a tool completes, enabling logging, auditing, and results aggregation.
- Stop hooks run when the skill session ends to clean up resources and finalize state.
- Supports pattern matching by tool name and per-hook configuration, including once-per-session behavior.
Quick Start
To see the hooks in action, trigger a small workflow that calls a Bash tool or a simulated tool. Observe the PreToolUse messages before execution, the PostToolUse messages after completion, and the Stop hook on termination. You can modify the YAML in the SKILL.md to add more tools or adjust matcher patterns.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: hooks-test Download link: https://github.com/louloulin/claude-agent-sdk/archive/main.zip#hooks-test Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.