Agent skill · AI & Agents

hook-creator

This skill should be used when the user asks to "create a hook", "write hook config", "add hooks.json", "configure event hooks", "create PreToolUse hook", "add SessionStart hook", "implement hook validation", "set up event-driven automation", needs guidance on hooks.json structure, hook events (PreToolUse, PostToolUse, Stop, SessionStart, SessionEnd, UserPromptSubmit), or wants to automate workflows and implement event-driven behavior in Claude Code plugins.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill hook-creator-basher83-agent-auditor --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/agent/hook-creator-basher83-agent-auditor/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Hook Creator ## Overview Creates hook configurations that respond to Claude Code events automatically. Hooks enable automation like formatting on save, running tests after edits, or custom session initialization. **When to use:** User wants to automate workflows, needs event-driven behavior, or requests hooks for their plugin. **References:** Consult `plugins/meta/claude-docs/skills/claude-docs/reference/plugins-reference.md` for hook specifications and available events. ## Hook Structure Requirements Hooks are defined in `hooks/hooks.json` with: 1. **Event type** (SessionStart, PostToolUse, etc.) 2. **Matcher** (optional, for filtering which tool uses trigger hook) 3. **Hook actions** (command, validation, notification) 4. **Proper use of** `${CLAUDE_PLUGIN_ROOT}` for plugin-relative paths ## Available Events From official documentation: - `PreToolUse` - Before Claude uses any tool - `PostToolUse` - After Claude uses any tool - `UserPromptSubmit` - When user submits a prompt - `Notification` - When Claude Code sends notifications - `Stop` - When Claude attempts to stop - `SubagentStop` - When subagent attempts to stop - `SessionStart` - At session beginning - `SessionEnd` - At s

What's inside
Steps it walks through
  1. Overview
  2. Hook Structure Requirements
  3. Available Events
  4. Creation Process
  5. Step 1: Identify Event and Purpose
  6. Step 2: Choose Hook Type
  7. Step 3: Write Hook Configuration
  8. Step 4: Create Associated Scripts
  9. Step 5: Verify Against Official Docs
  10. Key Principles
  11. Examples
  12. Example 1: Code Formatting Hook
  13. Example 2: Session Welcome Message
  14. Example 3: Test Runner Hook
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the hook-creator skill do?

This skill should be used when the user asks to "create a hook", "write hook config", "add hooks.json", "configure event hooks", "create PreToolUse hook", "add SessionStart hook", "implement hook validation", "set up event-driven automation", needs guidance on hooks.json structure, hook events (PreToolUse, PostToolUse, Stop, SessionStart, SessionEnd, UserPromptSubmit), or wants to automate workflows and implement event-driven behavior in Claude Code plugins.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill hook-creator-basher83-agent-auditor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going