/plugin marketplace add jwplatta/prompt-library/plugin install pythonic@jwplatta-claude-toolsDefined 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"
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 4
},
"eventStats": {
"PreToolUse": 2,
"PostToolUse": 2
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 4
}
}