hook
Create Claude Code Hooks Safely
Claude Code hooks are powerful but easy to misconfigure. This skill guides hook creation, configuration, validation, and security review.
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" from https://skillstore.io/skills/emz1998-hook.md and its manifest at https://skillstore.io/api/skills/emz1998-hook/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". Create a hook that warns when Bash uses slow search commands.
Expected outcome:
The skill proposes a PreToolUse Bash hook, creates a validator script, links it to local settings, and reports the validation result.
Using "hook". Add a hook that blocks prompts containing secrets.
Expected outcome:
The skill creates a prompt validation workflow, explains the blocked patterns, updates the hook configuration, and lists manual review steps.
Using "hook". Audit my existing hooks before I enable them.
Expected outcome:
The skill reviews hook files and settings, highlights risky commands, checks syntax, and recommends safer matchers or confirmation steps.
Security Audit
High RiskMost static findings are documentation examples or Markdown backticks rather than active malicious code. One static issue is confirmed because an example persists an API key in CLAUDE_ENV_FILE. Semantic review found high-impact hook automation risks but no prompt injection attempt.
Confirmed security concerns (2)
Capability review items (1)
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 (13)
๐ Filesystem access (26)
๐ Env variables (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/emz1998-hook/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/emz1998-hook?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/emz1998-hook?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/emz1998-hook/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/emz1998-hook.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
Emz1998. (2026). hook security audit report (audit version 4) [Author version unspecified]. Skillstore. https://skillstore.io/skills/emz1998-hook/audits/4BibTeX citation
@techreport{emz1998-emz1998-hook-2026,
author = {Emz1998},
title = {hook security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/emz1998-hook/audits/4},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "hook security audit report (audit version 4)"
version: "unspecified"
type: report
authors:
- name: "Emz1998"
date-released: "2026-07-05"
url: "https://skillstore.io/skills/emz1998-hook/audits/4"
identifiers:
- type: other
value: "skillstore:emz1998-hook:audit:4"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Automate Project Checks
Create hooks that run formatters, linters, or validation commands after file edits.
Add Security Guardrails
Build hooks that block unsafe shell commands, sensitive file access, or risky prompts.
Configure Team Workflows
Standardize local hook settings and reusable hook scripts across a project.
Try These Prompts
Create a PostToolUse hook named format-after-edit. It should run our formatter after Write or Edit and report any safety checks.
Review the existing hook named protect-main-branch. Add clearer error handling and keep the current branch protection behavior.
Create a UserPromptSubmit hook that blocks prompts containing secrets, tokens, or private keys. Explain how it is linked and tested.
Design a hook policy for this repository using PreToolUse, PostToolUse, and Stop events. Include matchers, commands, risks, and validation steps.
Best Practices
- Review hook command paths and matchers before enabling them.
- Keep hook scripts small, deterministic, and easy to test.
- Store secrets outside generated hook code and avoid writing them to environment files.
Avoid
- Enabling hooks that auto-approve broad file or shell access.
- Hardcoding tokens, API keys, or private paths in hook scripts.
- Using Stop hooks that can continue sessions without a termination guard.
Frequently Asked Questions
What does this skill create?
Can it configure multiple hook events?
Does it run hooks in a sandbox?
Can it help with security checks?
Will it store credentials?
Is it only for Claude Code?
Developer Details
Author
Emz1998License
MIT
Skillstore revision
r1
Version notice
The author did not declare a version.
Ref
30c73eac2afe762f6aa9c4553158769369d47351
Maintenance freshness
7/18/2026
Usage
5 downloads ยท 145 views