aiskillstore/marketplace / skills/89jobrien/claude-hooks
claude-hooks
VerifiedClaude Code hooks configuration specialist. Use when creating hooks for tool validation, logging, notifications, or custom automation in Claude Code.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.3 KB |
| references/claude-hook.template.md | markdown | 3.2 KB |
| skill-report.json | config | 16.3 KB |
skill-report.json
View on GitHub{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-07-05T11:13:21.617Z",
"slug": "89jobrien-claude-hooks",
"source_url": "https://github.com/89jobrien/steve/tree/main/steve/skills/claude-hooks",
"source_ref": "main",
"model": "codex",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "41204149017eff1a5cb3ef49b991d1540099b516f45835eab5fbcf024a1178ff",
"tree_hash": "f6a4f9475942ac5bedf44213c2c155dc639a6aa6f26fe74fb2e13f030076aeed",
"provenance": {
"model_effective": "codex",
"fallback_chain": [
{
"agent": "codex",
"outcome": "success"
}
],
"analysis_version": "3.0.0"
}
},
"skill": {
"name": "claude-hooks",
"description": "Create and review Claude Code hooks for tool validation, logging, notifications, and workflow automation.",
"summary": "Helps design Claude Code hook configurations for validation, logging, notifications, and automation.",
"icon": "π¦",
"version": "1.0.2",
"author": "Joseph OBrien",
"license": "MIT",
"tags": [
"claude-code",
"hooks",
"automation",
"tool-validation",
"logging"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"filesystem",
"external_commands"
],
"category": "devops"
},
"security_audit": {
"risk_level": "safe",
"is_blocked": false,
"safe_to_publish": true,
"analysis_status": "ok",
"summary": "All ten static findings were adjudicated as false positives. The flagged backticks are Markdown formatting, the hidden path references document Claude Code configuration or local example logging, and the reconnaissance alerts match benign logging guidance. No prompt injection, network exfiltration, or malicious hook intent was found in the reviewed files.",
"remediation": [],
"risk_factor_evidence": [
{
"factor": "filesystem",
"evidence": [
{
"file": "references/claude-hook.template.md",
"line_start": 17,
"line_end": 17
},
{
"file": "references/claude-hook.template.md",
"line_start": 81,
"line_end": 81
},
{
"file": "references/claude-hook.template.md",
"line_start": 17,
"line_end": 17
},
{
"file": "references/claude-hook.template.md",
"line_start": 81,
"line_end": 81
},
{
"file": "SKILL.md",
"line_start": 48,
"line_end": 48
},
{
"file": "SKILL.md",
"line_start": 48,
"line_end": 48
}
]
},
{
"factor": "external_commands",
"evidence": [
{
"file": "SKILL.md",
"line_start": 35,
"line_end": 35
},
{
"file": "SKILL.md",
"line_start": 48,
"line_end": 48
}
]
}
],
"static_findings": [
{
"id": "filesystem:references/claude-hook.template.md:17:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/claude-hook.template.md",
"line_start": 17,
"line_end": 17,
"snippet": "Hooks are configured in `~/.claude/settings.json` under the `hooks` key."
},
{
"id": "filesystem:references/claude-hook.template.md:81:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/claude-hook.template.md",
"line_start": 81,
"line_end": 81,
"snippet": "\"command\": \"echo 'File written: $CLAUDE_FILE_PATH' >> ~/.claude/file_log.txt\""
},
{
"id": "filesystem:references/claude-hook.template.md:17:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/claude-hook.template.md",
"line_start": 17,
"line_end": 17,
"snippet": "Hooks are configured in `~/.claude/settings.json` under the `hooks` key."
},
{
"id": "filesystem:references/claude-hook.template.md:81:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/claude-hook.template.md",
"line_start": 81,
"line_end": 81,
"snippet": "\"command\": \"echo 'File written: $CLAUDE_FILE_PATH' >> ~/.claude/file_log.txt\""
},
{
"id": "blocker:references/claude-hook.template.md:135:system-reconnaissance",
"category": "blocker",
"severity": "low",
"pattern": "System reconnaissance",
"file": "references/claude-hook.template.md",
"line_start": 135,
"line_end": 135,
"snippet": "4. **Log sparingly** - Avoid verbose output that clutters context"
},
{
"id": "external_commands:SKILL.md:35:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 35,
"line_end": 35,
"snippet": "- `references/CLAUDE_HOOK.template.md` - Hook configuration examples and patterns"
},
{
"id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 48,
"line_end": 48,
"snippet": "Hooks are configured in `~/.claude/settings.json` under the `hooks` key."
},
{
"id": "filesystem:SKILL.md:48:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "SKILL.md",
"line_start": 48,
"line_end": 48,
"snippet": "Hooks are configured in `~/.claude/settings.json` under the `hooks` key."
},
{
"id": "filesystem:SKILL.md:48:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "SKILL.md",
"line_start": 48,
"line_end": 48,
"snippet": "Hooks are configured in `~/.claude/settings.json` under the `hooks` key."
},
{
"id": "blocker:SKILL.md:56:system-reconnaissance",
"category": "blocker",
"severity": "low",
"pattern": "System reconnaissance",
"file": "SKILL.md",
"line_start": 56,
"line_end": 56,
"snippet": "- Avoid verbose output"
}
],
"finding_verdicts": [
{
"id": "filesystem:references/claude-hook.template.md:17:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This line documents the expected Claude Code settings path for hook configuration. It does not read, write, or hide user data."
},
{
"id": "filesystem:references/claude-hook.template.md:81:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.78,
"reason": "The example appends a local hook log under the Claude configuration directory and is shown transparently as documentation. No stealth behavior, privilege escalation, or exfiltration is present."
},
{
"id": "filesystem:references/claude-hook.template.md:17:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "The hidden path is the documented Claude Code configuration location. The text is explanatory and does not perform hidden file access."
},
{
"id": "filesystem:references/claude-hook.template.md:81:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.78,
"reason": "The command is a visible local logging example for PostToolUse events. It stores a file path locally and does not access secrets or transmit data."
},
{
"id": "blocker:references/claude-hook.template.md:135:system-reconnaissance",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The line advises users to log sparingly to avoid noisy output. It contains no system discovery command or reconnaissance intent."
},
{
"id": "external_commands:SKILL.md:35:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The backticks are Markdown formatting around a reference file path. There is no Ruby code, shell execution, or dynamic command evaluation."
},
{
"id": "external_commands:SKILL.md:48:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The backticks are Markdown formatting around the Claude settings path. The line documents configuration and does not execute a shell command."
},
{
"id": "filesystem:SKILL.md:48:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This line identifies the standard Claude Code settings file used for hooks. It is documentation of an expected location, not hidden persistence or unauthorized access."
},
{
"id": "filesystem:SKILL.md:48:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "The referenced hidden file is the normal user-owned Claude Code configuration file. The skill text does not read or modify it automatically."
},
{
"id": "blocker:SKILL.md:56:system-reconnaissance",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The line is a best practice to avoid verbose hook output. It does not request host information or perform system reconnaissance."
}
],
"semantic_findings": [],
"critical_findings": [],
"high_findings": [],
"medium_findings": [],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 2,
"total_lines": 203,
"audit_model": "codex",
"audited_at": "2026-07-05T11:13:21.617Z",
"agent_auto_install_policy": "allowed",
"manual_install_policy": "allowed"
},
"content": {
"user_title": "Configure Claude Code Hooks",
"value_statement": "Claude Code hooks are powerful but easy to misconfigure. This skill helps design validation, logging, notification, and cleanup hooks with clear event patterns.",
"seo_keywords": [
"Claude",
"Codex",
"Claude Code",
"Claude Code hooks",
"hook configuration",
"PreToolUse hooks",
"PostToolUse logging",
"tool validation",
"workflow automation",
"notification hooks"
],
"actual_capabilities": [
"Explains the Claude Code hook events: PreToolUse, PostToolUse, Notification, and Stop.",
"Shows where hooks are configured in the Claude Code settings file.",
"Provides a basic hook configuration structure with event, matcher, type, and command fields.",
"Includes examples for Bash validation, file write logging, and desktop notifications.",
"Lists supported environment variables available to hook commands.",
"Provides matcher patterns and a quality checklist for hook review."
],
"limitations": [
"It provides templates and guidance, not an automatic hook installer.",
"It does not validate shell command safety for every operating system.",
"It does not manage secrets, permissions, or team policy enforcement.",
"Notification examples are platform specific and may require local changes."
],
"use_cases": [
{
"title": "Add Command Guardrails",
"description": "Create PreToolUse hooks that check tool use before execution and explain the matcher strategy.",
"target_user": "Application developer"
},
{
"title": "Create Local Audit Logs",
"description": "Design PostToolUse logging for selected file events while keeping log scope clear and controlled.",
"target_user": "Engineering lead"
},
{
"title": "Build Development Notifications",
"description": "Configure notification or stop-event hooks that alert developers without interrupting normal Claude Code work.",
"target_user": "DevOps engineer"
}
],
"prompt_templates": [
{
"title": "Create a Basic Hook",
"prompt": "Help me create a Claude Code hook for one event. Ask me which event, matcher, and local command I want before drafting it.",
"scenario": "Beginner setup"
},
{
"title": "Add Tool Validation",
"prompt": "Design a PreToolUse hook that warns before risky Bash commands. Explain the matcher choice and include testing steps.",
"scenario": "Intermediate validation"
},
{
"title": "Configure Local Logging",
"prompt": "Create a PostToolUse logging hook for file writes. Keep the log local, avoid secret data, and explain the privacy tradeoffs.",
"scenario": "Operational logging"
},
{
"title": "Review a Hook Policy",
"prompt": "Audit my planned Claude Code hook set for command safety, matcher scope, error handling, and noisy output. Recommend safer alternatives.",
"scenario": "Advanced review"
}
],
"output_examples": [
{
"input": "I need a hook that checks Bash commands before they run.",
"output": "A concise PreToolUse plan with the Bash matcher, validation goal, command review points, and testing checklist."
},
{
"input": "I want to log file edits from Claude Code.",
"output": "A PostToolUse logging approach that records local file paths only, notes privacy risks, and suggests log rotation."
},
{
"input": "I want a notification after Claude finishes work.",
"output": "A Stop event notification plan with platform notes, quick execution guidance, and failure-handling recommendations."
}
],
"best_practices": [
"Keep hook commands fast and fail gracefully so automation does not interrupt Claude Code.",
"Use the narrowest matcher that covers the intended tool or command pattern.",
"Review logging and environment variable use for secrets before enabling a hook."
],
"anti_patterns": [
"Using a wildcard matcher when a specific tool matcher is enough.",
"Logging complete tool inputs or outputs without reviewing sensitive data exposure.",
"Running complex or long-lived shell commands directly inside synchronous hooks."
],
"faq": [
{
"question": "Does this skill install hooks automatically?",
"answer": "No. It provides templates and guidance for configuring Claude Code hooks."
},
{
"question": "Which Claude Code events does it cover?",
"answer": "It covers PreToolUse, PostToolUse, Notification, and Stop events."
},
{
"question": "Can I use it with Codex?",
"answer": "Yes. Codex can use the guidance to reason about Claude Code hook configuration."
},
{
"question": "Does it support security validation hooks?",
"answer": "Yes. It can help design PreToolUse validation and blocking patterns."
},
{
"question": "Does it send data over the network?",
"answer": "The reviewed skill content does not include network calls or external data transfers."
},
{
"question": "What should I review before enabling a hook?",
"answer": "Review the matcher, shell command, environment variables, log destination, and failure behavior."
}
]
},
"file_structure": [
{
"name": "references",
"type": "dir",
"path": "references",
"children": [
{
"name": "claude-hook.template.md",
"type": "file",
"path": "references/claude-hook.template.md",
"lines": 146
}
]
},
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 57
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why β repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" β or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself β your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |