Task: Convert Project Rules to Claude Code Hooks
Description
You are an expert at converting natural language project rules into Claude Code hook configurations. Your task is to analyze the given rules and generate appropriate hook configurations following the
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Task: Convert Project Rules to Claude Code Hooks
You are an expert at converting natural language project rules into Claude Code hook configurations. Your task is to analyze the given rules and generate appropriate hook configurations following the official Claude Code hooks specification.
Instructions
If rules are provided as arguments, analyze those rules
If no arguments are provided, read and analyze the CLAUDE.md file from these locations:
./CLAUDE.md(project memory)./CLAUDE.local.md(local project memory)~/.claude/CLAUDE.md(user memory)
For each rule, determine:
- The appropriate hook event (PreToolUse, PostToolUse, Stop, Notification)
- The tool matcher pattern (exact tool names or regex)
- The command to execute
Generate the complete hook configuration following the exact JSON structure
Save it to `~/.claude/hooks.json` (merge with existing hooks if present)
Provide a summary of what was configured
Hook Events
PreToolUse
- When: Runs BEFORE a tool is executed
- Common Keywords: "before", "check", "validate", "prevent", "scan", "verify"
- Available Tool Matchers:
Task- Before launching agent tasksBash- Before running shell commandsGlob- Before file pattern matchingGrep- Before content searchingRead- Before reading filesEdit- Before editing single filesMultiEdit- Before batch editing filesWrite- Before writing/creating filesWebFetch- Before fetching web contentWebSearch- Before web searchingTodoRead- Before reading todo listTodoWrite- Before updating todo list
- Special Feature: Can block tool execution if command returns non-zero exit code
PostToolUse
- When: Runs AFTER a tool completes successfully
- Common Keywords: "after", "following", "once done", "when finished"
- Available Tool Matchers: Same as PreToolUse
- Common Uses: Formatting, linting, building, testing after file changes
Stop
- When: Runs when Claude Code finishes responding
- Common Keywords: "finish", "complete", "end task", "done", "wrap up"
- No matcher needed: Applies to all completions
- Common Uses: Final status checks, summaries, cleanup
Notification
- When: Runs when Claude Code sends notifications
- Common Keywords: "notify", "alert", "inform", "message"
- Special: Rarely used for rule conversion
Hook Configuration Structure
{
"hooks": {
"EventName": [
{
"matcher": "ToolName|AnotherTool|Pattern.*",
"hooks": [
{
"type": "command",
"command": "your-command-here"
}
]
}
]
}
}
Matcher Patterns
- Exact match:
"Edit"- matches only Edit tool - Multiple tools:
"Edit|MultiEdit|Write"- matches any of these - Regex patterns:
".*Edit"- matches Edit and MultiEdit - All tools: Omit matcher field entirely
Related Skills
Epic Decompose
Break an epic into task children without creating task branches.
Productivity Claude Code Terminal Title
Gives each Claude Code terminal window a dynamic title describing the work being done
Productivity N8n Skills
Enables AI assistants to directly understand and operate n8n workflows
Productivity Composio Make
Trigger and manage Make (Integromat) scenarios
Productivity Getting Help
career-ops is an open source project maintained in limited time. Here's how to get help efficiently.
Productivity Worktree Status Check
Verify the current worktree environment and show task details.
Productivity