Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:58:21 +08:00
commit d03a9a9eac
7 changed files with 283 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
---
event: user-prompt-submit
description: Example hook that runs before user prompts are submitted
---
# User Prompt Submit Hook
This hook runs before a user's prompt is submitted to Claude, allowing you to modify or validate the input.
## Implementation
When this hook is triggered:
1. **Validate Input**: Check if the user's input meets certain criteria
2. **Transform**: Optionally modify the prompt before submission
3. **Add Context**: Inject additional context or instructions
## Example Use Cases
- Add custom system prompts
- Validate user input
- Inject project-specific context
- Track usage patterns
## Hook Execution
This hook receives the user's prompt and can return a modified version or the original.