Skip to content
youdede

Cloud resource deletion guard

OperationsHookv1.0.0

A deterministic Claude Code PreToolUse gate that recognizes explicit destructive AWS, Google Cloud, and Azure CLI verbs while allowing their list, describe, show, and get operations.

Runs on

Scope
$npx @youdede/toolkit add cloud-resource-deletion-guard --target claude-code

What it does

Block high-confidence direct cloud CLI deletion, termination, and purge operations.

When it fires

  • setup
  • operations

How it behaves

Recognize direct cloud CLI deletion verbs without contacting provider APIs.

It does not delete, restore, snapshot, or inspect cloud resources.

It does not infer whether an account or resource is production.

It does not accept confirmation flags or prompt text as authorization.

Configuration

targets/claude-code/cloud-resource-deletion-guard.mjsnode · none

Version
1.0.0
Requires
Shell command guard
Licence
RiskThis automatic gate blocks high-confidence direct cloud CLI deletion, termination, and purge operations; a false denial can interrupt legitimate work, but it does not execute the blocked action.
Medium
ModeHow it works: fixed rules, model instructions, or both.
Deterministic only
Behaviour
Enforces, blocks on violation
On failure
Denies and blocks
LatencyThe entrypoint handles one intercepted event to block high-confidence direct cloud CLI deletion, termination, and purge operations without deferred work.
Immediate
Data retentionWhether data remains after use and who manages its storage.
Not retained

Often used with

All in Operations