/plugin marketplace add CharlesWiltgen/Axiom/plugin install axiom@axiom-marketplaceDefined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/stop-validation.sh\""
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If the file path contains .xcdatamodeld, add context: 'Warning: Core Data model changes require migration planning. Run /axiom:audit-core-data after changes to verify safety.'"
}
],
"matcher": "Edit|Write"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If this bash command was xcodebuild/swift build and it failed (non-zero exit), suggest: 'Build failed. Run /axiom:fix-build for automatic diagnostics?'"
},
{
"type": "command",
"command": "bash -c 'O=\"$CLAUDE_TOOL_OUTPUT\"; echo \"$O\" | grep -qE \"Unable to simultaneously satisfy constraints\" && echo \"๐ก Auto Layout conflict. Try: skill auto-layout-debugging\"; echo \"$O\" | grep -qE \"Actor-isolated|Sendable|data race|@MainActor\" && echo \"๐ก Concurrency issue. Try: skill swift-concurrency\"; echo \"$O\" | grep -qE \"no such column|FOREIGN KEY constraint|migration\" && echo \"๐ก Database migration issue. Try: skill database-migration\"; echo \"$O\" | grep -qE \"retain cycle|memory leak|deinit.*never called\" && echo \"๐ก Memory issue detected. Try: skill memory-debugging\"; echo \"$O\" | grep -qE \"CKError|CKRecord.*error\" && echo \"๐ก CloudKit issue. Try: skill cloudkit-ref or cloud-sync-diag\"; echo \"$O\" | grep -qE \"ubiquitous.*error|iCloud Drive|NSFileCoordinator\" && echo \"๐ก iCloud Drive issue. Try: skill icloud-drive-ref or cloud-sync-diag\"; echo \"$O\" | grep -qE \"file.*disappeared|file not found|storage.*full\" && echo \"๐ก File storage issue. Try: skill storage-diag\"; echo \"$O\" | grep -qE \"FileProtection|data protection|file.*locked\" && echo \"๐ก File protection issue. Try: skill file-protection-ref\"; echo \"$O\" | grep -qE \"error:.*module.*not found|linker command failed\" && echo \"๐ก Build configuration issue. Try: /axiom:fix-build\"; exit 0'"
}
],
"matcher": "Bash"
},
{
"hooks": [
{
"type": "command",
"command": "bash -c 'if [[ \"$TOOL_INPUT_FILE_PATH\" == *.swift ]]; then if command -v swiftformat &>/dev/null; then swiftformat \"$TOOL_INPUT_FILE_PATH\" --quiet || true; else echo \"โ ๏ธ Axiom: swiftformat not found. Install with: brew install swiftformat\"; fi; fi; exit 0'"
}
],
"matcher": "Write|Edit"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\""
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/user-prompt-submit.sh\""
}
]
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 2,
"command": 5
},
"eventStats": {
"Stop": 1,
"PreToolUse": 1,
"PostToolUse": 3,
"SessionStart": 1,
"UserPromptSubmit": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 3,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 5
}
}