Agent Skills
› NeverSight/learn-skills.dev
› claude-hooks
claude-hooks
GitHubClaude Code Hooks配置专家,用于创建工具验证、日志记录、通知及自定义自动化钩子。支持PreToolUse、PostToolUse等事件配置,旨在扩展Claude Code功能并实现工作流自动化。
Trigger Scenarios
需要为Claude Code创建或配置钩子
实现工具执行前后的验证与日志记录
设置自定义通知或安全控制
Install
npx skills add NeverSight/learn-skills.dev --skill claude-hooks -g -y
SKILL.md
Frontmatter
{
"tag": "skill",
"name": "claude-hooks",
"type": "skill",
"author": "Joseph OBrien",
"status": "unpublished",
"updated": "2025-12-23",
"version": "1.0.1",
"description": "Claude Code hooks configuration specialist. Use when creating hooks for tool validation, logging, notifications, or custom automation in Claude Code."
}
Claude Hooks Skill
Creates and configures hooks for Claude Code to automate workflows and extend functionality.
What This Skill Does
- Creates PreToolUse validation hooks
- Sets up PostToolUse logging/cleanup
- Configures notification hooks
- Implements custom automation
- Documents hook patterns
When to Use
- Tool execution validation
- Audit logging
- Custom notifications
- Workflow automation
- Security controls
Reference Files
references/CLAUDE_HOOK.template.md- Hook configuration examples and patterns
Hook Events
| Event | Trigger | Use Case |
|---|---|---|
| PreToolUse | Before tool executes | Validation, blocking |
| PostToolUse | After tool completes | Logging, cleanup |
| Notification | Claude sends notification | Alerts |
| Stop | Claude stops | Final reports |
Configuration Location
Hooks are configured in ~/.claude/settings.json under the hooks key.
Best Practices
- Keep hooks fast (< 1 second)
- Handle errors gracefully
- Use specific matchers
- Test hooks independently
- Avoid verbose output
Version History
- e0220ca Current 2026-07-05 21:28


