Automatically formats code files after edits and runs commands before stopping.
npx claudepluginhub dsmolchanov/rpaDefined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'command -v npm >/dev/null 2>&1 && npm run lint --silent 2>/dev/null || echo \"Lint: npm not found or no lint script\"'"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "bash -c 'MODIFIED=$(git diff --name-only 2>/dev/null | head -5); if [ -n \"$MODIFIED\" ]; then command -v npm >/dev/null 2>&1 && npm test -- --bail --findRelatedTests $MODIFIED 2>/dev/null || echo \"Tests: npm not found\"; fi'"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'FILE=$(cat | jq -r \".tool_input.file_path\"); command -v prettier >/dev/null 2>&1 && npx prettier --write \"$FILE\" 2>/dev/null || true'"
}
],
"matcher": "Edit"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 3
},
"eventStats": {
"Stop": 2,
"PostToolUse": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 3
}
}