Analyze the project, suggest practical hooks, and create them with proper testing.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncustomaize-agent:create-hookExecute the skills CLI command in your project's root directory to begin installation:
Fetches customaize-agent:create-hook from neolabhq/context-engineering-kit and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate customaize-agent:create-hook. Access via /customaize-agent:create-hook in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
757
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
757
stars
Analyze the project, suggest practical hooks, and create them with proper testing.
Automatically detect the project tooling and suggest relevant hooks:
When TypeScript is detected (tsconfig.json):
When Prettier is detected (.prettierrc, prettier.config.js):
When ESLint is detected (.eslintrc.*):
When package.json has scripts:
test script → "Run tests before commits"build script → "Validate build before commits"When a git repository is detected:
Decision Tree:
Project has TypeScript? → Suggest type checking hooks
Project has formatter? → Suggest formatting hooks
Project has tests? → Suggest test validation hooks
Security sensitive? → Suggest security hooks
+ Scan for additional patterns and suggest custom hooks based on:
- Custom scripts in package.json
- Unique file patterns or extensions
- Development workflow indicators
- Project-specific tooling configurations
Start by asking: "What should this hook do?" and offer relevant suggestions from your analysis.
Then understand the context from the user's description and only ask about details you're unsure about:
Trigger timing: When should it run?
PreToolUse: Before file operations (can block)PostToolUse: After file operations (feedback/fixes)UserPromptSubmit: Before processing requestsTool matcher: Which tools should trigger it? (Write, Edit, Bash, * etc)
Scope: global, project, or project-local
Response approach:
Blocking behavior (if relevant): "Should this stop operations when issues are found?"
Claude integration (CRITICAL): "Should Claude Code automatically see and fix issues this hook detects?"
additionalContext for error communicationsuppressOutput: true for silent operationContext pollution: "Should successful operations be silent to avoid noise?"
File filtering: "What file types should this hook process?"
You should:
~/.claude/hooks/ or .claude/hooks/ based on scope$CLAUDE_PROJECT_DIR to reference project rootKey Implementation Standards:
additionalContext/systemMessage for Claude communicationsuppressOutput: true for successful operations⚠️ CRITICAL: Input/Output Format
This is where most hook implementations fail. Pay extra attention to:
CRITICAL: Test both happy and sad paths:
Happy Path Testing:
Sad Path Testing: 2. Test expected failure scenario - Create conditions where hook should fail/warn
Verification Steps: 3. Verify expected behavior: Check if it blocks/warns/provides context as intended
Example Testing Process:
If Issues Occur, you should:
chmod +x)#!/usr/bin/env node
// Read stdin JSON, check .ts/.tsx files only
// Run: npx tsc --noEmit --pretty
// Output: JSON with additionalContext for errors
#!/usr/bin/env node
// Read stdin JSON, check supported file types
// Run: npx prettier --write [file]
// Output: JSON with suppressOutput: true
#!/bin/bash
# Read stdin JSON, check for secrets/keys
# Block if dangerous patterns found
# Exit 2 to block, 0 to continue
Complete templates available at: https://docs.claude.com/en/docs/claude-code/hooks#examples
📖 Official Docs: https://docs.claude.com/en/docs/claude-code/hooks.md
Common Patterns:
JSON.parse(process.stdin.read()){continue: true, suppressOutput: true}{continue: true, additionalContext: "error details"}exit(2) in PreToolUse hooksHook Types by Use Case:
Hook Execution Best Practices:
✅ Hook created successfully when:
Result: The user gets a working hook that enhances their development workflow with intelligent automation and quality checks.
Documentation Index
Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt Use this file to discover all available pages before exploring further.
Run shell commands automatically when Claude Code edits files, finishes tasks, or needs input. Format code, send notifications, validate commands, and enforce project rules.
Hooks are user-defined shell commands that execute at specific points in Claude Code's lifecycle. They provide deterministic control over Claude Code's behavior, ensuring certain actions always happen rather than relying on the LLM to choose to run them. Use hooks to enforce project rules, automate repetitive tasks, and integrate Claude Code with your existing tools.
For decisions that require judgment rather than deterministic rules, you can also use prompt-based hooks or agent-based hooks that use a Claude model to evaluate conditions.
For other ways to extend Claude Code, see skills for giving Claude additional instructions and executable commands, subagents for running tasks in isolated contexts, and plugins for packaging extensions to share across projects.
The fastest way to create a hook is through the /hooks interactive menu in Claude Code. This walkthrough creates a desktop notification hook, so you get alerted whenever Claude is waiting for your input instead of watching the terminal.
<Tabs>
<Tab title="macOS">
Uses [`osascript`](https://ss64.com/mac/osascript.html) to trigger a native macOS notification through AppleScript:
```
osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'
```
</Tab>
<Tab title="Linux">
Uses `notify-send`, which is pre-installed on most Linux desktops with a notification daemon:
```
notify-send 'Claude Code' 'Claude Code needs your attention'
```
</Tab>
<Tab title="Windows (PowerShell)">
Uses PowerShell to show a native message box through .NET's Windows Forms:
```
powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"
```
</Tab>
</Tabs>
Hooks let you run code at key points in Claude Code's lifecycle: format files after edits, block commands before they execute, send notifications when Claude needs input, inject context at session start, and more. For the full list of hook events, see the Hooks reference.
Each example includes a ready-to-use configuration block that you add to a settings file. The most common patterns:
Get a desktop notification whenever Claude finishes working and needs your input, so you can switch to other tasks without checking the terminal.
This hook uses the Notification event, which fires when Claude is waiting for input or permission. Each tab below uses the platform's native notification command. Add this to ~/.claude/settings.json, or use the interactive walkthrough above to configure it with /hooks:
Automatically run Prettier on every file Claude edits, so formatting stays consistent without manual intervention.
This hook uses the PostToolUse event with an Edit|Write matcher, so it runs only after file-editing tools. The command extracts the edited file path with jq and passes it to Prettier. Add this to .claude/settings.json in your project root:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
}
]
}
]
}
}
Prevent Claude from modifying sensitive files like .env, package-lock.json, or anything in .git/. Claude receives feedback explaining why the edit was blocked, so it can adjust its approach.
This example uses a separate script file that the hook calls. The script checks the target file path against a list of protected patterns and exits with code 2 to block the edit.
```bash theme={null}
#!/bin/bash
# protect-files.sh
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
PROTECTED_PATTERNS=(".env" "package-lock.json" ".git/")
for pattern in "${PROTECTED_PATTERNS[@]}"; do
if [[ "$FILE_PATH" == *"$pattern"* ]]; then
echo "Blocked: $FILE_PATH matches protected pattern '$pattern'" >&2
exit 2
fi
done
exit 0
```
```bash theme={null}
chmod +x .claude/hooks/protect-files.sh
```
```json theme={null}
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/protect-files.sh"
}
]
}
]
}
}
```
When Claude's context window fills up, compaction summarizes the conversation to free space. This can lose important details. Use a SessionStart hook with a compact matcher to re-inject critical context after every compaction.
Any text your command writes to stdout is added to Claude's context. This example reminds Claude of project conventions and recent work. Add this to .claude/settings.json in your project root:
{
"hooks": {
"SessionStart": [
{
"matcher": "compact",
"hooks": [
{
"type": "command",
"command": "echo 'Reminder: use Bun, not npm. Run bun test before committing. Current sprint: auth refactor.'"
}
]
}
]
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
neolabhq/context-engineering-kit
pproenca/dot-skills
davila7/claude-code-templates
intellectronica/agent-skills
am-will/codex-skills
sickn33/antigravity-awesome-skills
Keeps context tight: customaize-agent:create-hook is the kind of skill you can hand to a new teammate without a long onboarding doc.
customaize-agent:create-hook has been reliable in day-to-day use. Documentation quality is above average for community skills.
Keeps context tight: customaize-agent:create-hook is the kind of skill you can hand to a new teammate without a long onboarding doc.
We added customaize-agent:create-hook from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
customaize-agent:create-hook fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for customaize-agent:create-hook matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in customaize-agent:create-hook — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for customaize-agent:create-hook matched our evaluation — installs cleanly and behaves as described in the markdown.
customaize-agent:create-hook reduced setup friction for our internal harness; good balance of opinion and flexibility.
customaize-agent:create-hook fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 34