Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:40:02 +08:00
commit 0a8a6c982f
21 changed files with 4153 additions and 0 deletions

31
hooks/hooks.json Normal file
View File

@@ -0,0 +1,31 @@
{
"description": "Safety and quality hooks for Claude Code Arsenal",
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"description": "Security validation: Protects sensitive files from modification",
"hooks": [
{
"type": "command",
"command": "uv run --directory ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/hooks/security/file_protection.py",
"description": "Prevents modification of sensitive files (.env, keys, production configs)",
"timeout": 30
}
]
},
{
"matcher": "Bash",
"description": "Quality validation: Pre-commit checks",
"hooks": [
{
"type": "command",
"command": "uv run --directory ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/hooks/quality/pre_commit_validate.py",
"description": "Runs linting and tests before git commits",
"timeout": 120
}
]
}
]
}
}