Hook Development
Build Claude Code Hook Workflows
Claude Code hooks can be hard to configure safely across events. This skill guides hook formats, validation patterns, testing, and migration to prompt-based workflows.
Stop for confirmation before installing.
Review the plan and obtain explicit user consent before changing files.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "Hook Development" from https://skillstore.io/skills/hook-development.md and its manifest at https://skillstore.io/api/skills/hook-development/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "Hook Development". Create a hook that reviews Write operations before they run.
Expected outcome:
A plan with a PreToolUse matcher, safety criteria, timeout guidance, and test scenarios.
Using "Hook Development". Migrate a bash validation hook to prompt hooks.
Expected outcome:
- Summary of the old checks
- Prompt hook validation criteria
- Migration and testing checklist
Using "Hook Development". Check my hook configuration before release.
Expected outcome:
A review of event names, hook types, matchers, timeout values, and restart requirements.
Security Audit
High RiskMost static alerts are false positives caused by Markdown formatting, shebangs, defensive deny checks, and test fixtures. Confirmed risks include shell injection in the test runner, unsafe jq filter construction, and predictable temporary files. Semantic review also found prompt-injection exposure, fail-open validators, SQL injection, sensitive logging, and unpinned package execution.
Confirmed security concerns (6)
Capability review items (21)
These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.
Risk Factors
โ๏ธ External commands (50)
๐ Filesystem access (45)
๐ Env variables (1)
๐ Network access (1)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/hook-development/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/hook-development?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/hook-development?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/hook-development/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/hook-development.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
anthropics. (2026). Hook Development security audit report (audit version 10) [Author version 0.1.0]. Skillstore. https://skillstore.io/skills/hook-development/audits/10BibTeX citation
@techreport{anthropics-hook-development-2026,
author = {anthropics},
title = {Hook Development security audit report (audit version 10)},
institution = {Skillstore},
year = {2026},
number = {10},
url = {https://skillstore.io/skills/hook-development/audits/10},
note = {Author version 0.1.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "Hook Development security audit report (audit version 10)"
version: "0.1.0"
type: report
authors:
- name: "anthropics"
date-released: "2026-07-19"
url: "https://skillstore.io/skills/hook-development/audits/10"
identifiers:
- type: other
value: "skillstore:hook-development:audit:10"
description: "Skillstore immutable audit report identifier"
Compare variants
3 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
hook-development
2026-08-21
anthropics-hook-development
2026-08-21
davila7-hook-development
2026-08-21
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Add pre-flight tool validation
Create PreToolUse hooks that review bash commands, file writes, and sensitive paths before tools run.
Migrate script hooks
Replace brittle shell checks with prompt hooks that express validation rules in natural language.
Test hooks before release
Validate hook configuration, run sample event payloads, and inspect hook output before publishing a plugin.
Try These Prompts
Use the Hook Development skill to create a PreToolUse hook that asks before Bash commands with destructive operations. Explain the files to edit.
Use the Hook Development skill to design a Write/Edit hook that blocks system paths, path traversal, and credential files. Include testing steps.
Use the Hook Development skill to convert this command hook into a prompt-based hook. Preserve safety rules and list edge cases to test: [paste hook].
Use the Hook Development skill to design a plugin hook suite with PreToolUse, PostToolUse, Stop, and SessionStart hooks. Include validation, observability, and rollback guidance.
Best Practices
- Start with prompt hooks for contextual security decisions and use command hooks for deterministic checks.
- Quote shell variables, validate input, and test hooks with representative event payloads.
- Restart Claude Code after hook changes and verify behavior with debug logs.
Avoid
- Do not pass raw untrusted content into security prompts without delimiters and denial criteria.
- Do not log complete hook inputs to external systems or local files without redaction.
- Do not build test commands with shell strings that include untrusted paths.
Frequently Asked Questions
Does this skill create hooks automatically?
Which hook events does it cover?
When should I use prompt hooks?
When should I use command hooks?
What tools do the examples require?
Are the examples production ready?
Developer Details
Author
anthropicsLicense
MIT
Author version
v0.1.0
Skillstore revision
r1
Repository
https://github.com/anthropics/claude-code/tree/main/plugins/plugin-dev/skills/hook-developmentRef
6e2dddf587274c5f8c929a916ca092529545819b
Maintenance freshness
7/21/2026
Usage
17 downloads ยท 259 views
File structure
๐ examples/
๐ load-context.sh
๐ validate-bash.sh
๐ validate-write.sh
๐ references/
๐ advanced.md
๐ migration.md
๐ patterns.md
๐ scripts/
๐ hook-linter.sh
๐ README.md
๐ test-hook.sh
๐ SKILL.md