npx claudepluginhub jwplatta/prompt-library --plugin pythonicDefined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "FILE_PATH=$(echo \"$TOOL_INPUT\" | jq -r '.file_path') && uv run ruff format \"$FILE_PATH\"",
"enabled": false,
"description": "Auto-format Python files with ruff before writing"
}
],
"matcher": "Write|Edit",
"pattern": "**/*.py"
},
{
"hooks": [
{
"type": "command",
"command": "uv run ruff check . && uv run mypy src && uv run pytest",
"enabled": false,
"description": "Run quality checks before git commits"
}
],
"matcher": "Bash",
"pattern": "git commit"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "FILE_PATH=$(echo \"$TOOL_INPUT\" | jq -r '.file_path') && uv run ruff check --fix \"$FILE_PATH\"",
"enabled": false,
"description": "Auto-fix linting issues after writing Python files"
}
],
"matcher": "Write|Edit",
"pattern": "**/*.py"
},
{
"hooks": [
{
"type": "command",
"command": "FILE_PATH=$(echo \"$TOOL_INPUT\" | jq -r '.file_path') && FILE_NAME=$(basename \"$FILE_PATH\" .py) && uv run pytest tests/test_${FILE_NAME}.py",
"enabled": false,
"description": "Run related tests when saving Python files"
}
],
"matcher": "Write|Edit",
"pattern": "**/*.py",
"excludePattern": "**/test_*.py"
}
]
}"PreToolUse hook runs pre-commit-reminder.sh before git commit/push bash commands. PostToolUse on Write/Edit executes quality-gate.sh and draft-status.sh bash scripts, touching files."