dispatch
Shared multi-model CLI dispatch infrastructure for the adv plugin. Houses dispatch.sh, preflight.sh, run-phase.sh, scope.sh, and…
Use this skill when creating or refining Claude Code hooks. Hooks are shell commands that execute at specific lifecycle events (tool use, prompt submit, notifications, session events). Helps design event handlers for notifications, formatting, logging, feedback, and permission
Claude Code
$ npx -y skills add andisab/swe-marketplace --skill hook-dev --agent claude-code
Codex
$ npx skills add andisab/swe-marketplace --skill hook-dev -a codex -y
Cursor
$ npx skills add andisab/swe-marketplace --skill hook-dev -a cursor -y
Gemini CLI
$ npx skills add andisab/swe-marketplace --skill hook-dev -a gemini-cli -y
GitHub Copilot
$ npx skills add andisab/swe-marketplace --skill hook-dev -a github-copilot -y
OpenCode
$ npx skills add andisab/swe-marketplace --skill hook-dev -a opencode -y
Windsurf
$ npx skills add andisab/swe-marketplace --skill hook-dev -a windsurf -y
name: hook-dev description: > Use this skill when creating or refining Claude Code hooks. Hooks are shell commands that execute at specific lifecycle events (tool use, prompt submit, notifications, session events). Helps design event handlers for notifications, formatting, logging, feedback, and permission control. Automatically invoked when user requests "create a hook", "add automation", "event handler", "workflow automation", or mentions hook development. allowed-tools: Read, Write, Edit, Grep, Bash(which:*), Bash(jq:*), Bash(osascript:*)
This skill helps create production-ready Claude Code hooks following Anthropic's official specifications.
**Hooks** are user-defined shell commands that execute at various points in Claude Code's lifecycle. They provide:
| Feature | Hook | Skill | Command | |---------|------|-------|---------| | **Trigger** | Lifecycle event | Context match | User invocation | | **Type** | Shell command | AI capability | Prompt template | | **Use case** | Automation, validation | Autonomous features | Reusable prompts | | **Control** | Deterministic | LLM-driven | User-initiated |
**When to use Hooks**: Automatic formatting, logging, notifications, permission control, code validation
Ten lifecycle events trigger hooks:
Executes **after Claude creates tool parameters but before processing**.
**Use cases**:
**Blocking capability**: Yes - exit code 2 blocks with error fed to Claude; JSON output with `"permissionDecision": "deny"` also blocks
Runs **immediately after successful tool completion**.
**Use cases**:
**Blocking capability**: No - tool already executed
Fires when users **submit prompts, before Claude processes them**.
**Use cases**:
**Blocking capability**: Yes - JSON output with `"decision": "block"` prevents submission
Activates when **permission dialogs appear to users**.
**Use cases**:
**Blocking capability**: Yes - can allow, deny, or pass through to user
Triggers when **Claude Code sends notifications**.
**Use cases**:
**Blocking capability**: No - notification already generated
Activates when **the main agent finishes responding**.
**Use cases**:
**Blocking capability**: Yes - JSON output with `"decision": "block"` prevents stop
Runs when **subagent tasks complete**.
**Use cases**:
**Blocking capability**: Yes - JSON output with `"decision": "block"` prevents stop
Executes **before context window compaction operations**.
**Use cases**:
**Blocking capability**: Yes - can prevent compaction
Triggers at **session initialization or resumption**.
**Use cases**:
**Blocking capability**: No - session already started
Runs when **sessions terminate**.
**Use cases**:
**Blocking capability**: No - session already ending
Hooks are configured in `.claude/settings.json`:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "echo 'Editing file' >> /tmp/claude-audit.log"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | { read file_path; if echo \"$file_path\" | grep -q '\\.py$'; then black \"$file_path\"; fi; }"
}
]
}
]
}
}{
"hooks": {
"EventName": [ // Event type (PreToolUse, PostToolUse, etc.)
{
"matcher": "ToolPattern", // Tool name, regex (pipe-separated), or "*" for all
"hooks": [ // Array of hooks for this matcher
{
"type": "command", // "command" or "prompt"
"command": "shell command", // Shell command to execute
"timeout": 60 // Optional timeout in seconds (default: 60)
}
]
}
]
}
}A collection of Claude Code plugins for everyday software engineering and knowledge work.
Shared multi-model CLI dispatch infrastructure for the adv plugin. Houses dispatch.sh, preflight.sh, run-phase.sh, scope.sh, and…
Use this skill when creating or refining Claude Code sub-agent definitions. Helps design specialized AI assistants with proper…
Use this skill when creating or refining custom Claude Code slash commands. Slash commands are user-invoked reusable prompts that…
Create MCP servers — multi-tool services exposed via Model Context Protocol. Use this skill whenever users mention MCP servers,…
Create MCP tools — individual tool functions exposed via Model Context Protocol. Use this skill whenever users mention MCP tools,…
Use this skill when creating or refining Claude Code plugins. Plugins are bundled collections of agents, skills, commands, hooks,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.