Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 line
632 B
JSON

{"content": "{\n \"description\": \"Automatically backup files before editing. Creates timestamped backups in a .backups directory when files are modified.\",\n \"hooks\": {\n \"PreToolUse\": [\n {\n \"matcher\": \"Edit|MultiEdit\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"if [[ -n \\\"$CLAUDE_TOOL_FILE_PATH\\\" && -f \\\"$CLAUDE_TOOL_FILE_PATH\\\" ]]; then mkdir -p .backups && cp \\\"$CLAUDE_TOOL_FILE_PATH\\\" \\\".backups/$(basename \\\"$CLAUDE_TOOL_FILE_PATH\\\").$(date +%Y%m%d_%H%M%S).bak\\\"; fi\"\n }\n ]\n }\n ]\n }\n}"}