pre-action-gates

pre-action-gates is a cursor rule for Cursor from IgorGanapolsky/ThumbGate. It costs 236 tokens per session, scanned C, original, MIT.

A safety rule for checking risky commands before they run. It covers actions such as pushing Git changes, deleting files recursively, publishing packages, deploying, changing databases, or modifying secrets.

In plain words
What is it for?
Use it before running high-risk development and deployment commands, and ask for confirmation when a rule blocks an action.
Why use it?
It creates a pause before actions that could delete data, publish unfinished code, change live systems, or affect credentials.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it before running high-risk development and deployment commands, and ask for confirmation when a rule blocks an action.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/igorganapolsky/thumbgate/pre-action-gates
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/IgorGanapolsky/ThumbGate

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pre-action-gates

README.md
[![agentmods](https://agentmods.dev/badge/rules/igorganapolsky/thumbgate/pre-action-gates.svg)](https://agentmods.dev/rules/igorganapolsky/thumbgate/pre-action-gates)
Your own site
<a href="https://agentmods.dev/rules/igorganapolsky/thumbgate/pre-action-gates"><img src="https://agentmods.dev/badge/rules/igorganapolsky/thumbgate/pre-action-gates.svg" alt="Measured on agentmods" height="20"></a>
Per session 236 This file is loaded in full into every session.
When invoked 236 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00236 $0.00236
Opus 5 $0.00118 $0.00118
Sonnet 5 $0.00047 $0.00047
Haiku 4.5 $0.00024 $0.00024

Measured 8d ago against content hash 08b4db2509f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

pre-action-gates scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

description: Before risky tool calls (git push, rm -rf, npm publish, deploy), check prevention rules via the thumbgate MCP server. If a rule matches, STOP and explain why.
plugins/cursor-marketplace/rules/pre-action-gates.mdc · 31 lines

What it actually says

Pre-Action Gates

Before executing any of these risky actions, query the prevention_rules MCP tool to check for matching prevention rules:

  • git push (especially force push)
  • rm -rf or recursive file deletion
  • npm publish
  • deploy commands (any deployment target)
  • Database migration commands
  • Secret or credential changes

Enforcement flow

  1. Extract the command or action about to be executed.
  2. Call prevention_rules with the action description to check for matching rules.
  3. If a rule matches:
    • STOP the action immediately.
    • Display the matched rule's description and corrective action.
    • Ask the user to confirm before proceeding.
  4. If no rules match, proceed normally.

After a blocked action

  • Suggest the corrective action from the matched prevention rule.
  • Offer to capture feedback if the block was incorrect (false positive).
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 31 lines · 236 tokens per session scan C 08b4db2509f8

Subscribe to this mod's changes

pre-action-gates is a cursor rule published in the GitHub repository IgorGanapolsky/ThumbGate (26 stars, last pushed today), licensed MIT. It adds 236 tokens to every session, about $0.0012 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.