Stats
Actions
Tags
From mella
Blocks Bash tool calls that attempt to run `git worktree add`, preventing accidental worktree creation. Executes a shell script to inspect and reject matching commands.
1 event · 1 hook
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined inline in plugin.json manifest
Event handlers and matchers — expand Raw Configuration for the full JSON
BashI=$(cat); C=$(printf '%s' "$I" | jq -r '.tool_input.command // empty'); [ -z "$C" ] && exit 0; printf '%s' "$C" | grep -qiE '^(mysql|sqlite3)|php artisan (tinker|db([^:a-z]|$))|herd php artisan (tinker|db([^:a-z]|$))|sail (mysql|tinker|artisan tinker|artisan db)' || exit 0; (printf '%s' "$C" | grep -qiE 'DROP (TABLE|DATABASE|INDEX|VIEW|USER|COLUMN|IF)|DELETE FROM|TRUNCATE|UPDATE [^ ]+ SET|INSERT INTO|REPLACE INTO|ALTER TABLE|RENAME TABLE|GRANT |REVOKE |LOAD DATA|SET GLOBAL|FLUSH PRIVILEGES|SOURCE ' || printf '%s' "$C" | grep -qE '->save\(|->create\(|::create\(|->update\(|->delete\(|->forceDelete\(|::destroy\(|->truncate\(|->insert\(|->upsert\(|->updateOrCreate\(|->firstOrCreate\(|->forceCreate\(|->push\(|->increment\(|->decrement\(|DB::statement|DB::unprepared|DB::insert|DB::update|DB::delete|Schema::drop|Schema::dropIfExists|Schema::rename|Cache::flush|Storage::delete|Artisan::call' || printf '%s' "$C" | grep -qE '< *[^ ]+\.sql') && echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"ask","permissionDecisionReason":"Database write operation detected"}}'npx claudepluginhub cjmellor/mella-marketplace --plugin mella