ess-cli-write-safety

ess-cli-write-safety is a cursor rule for Cursor from CiscoDevNet/essentials. It costs 0 tokens per session (1,002 once invoked), scanned A, original, Apache-2.0.

A repository rule for command-line tools that write, delete, or otherwise change local or remote state. Such commands must provide a dry-run mode, ask for confirmation by default, and accept a --yes option.

In plain words
What is it for?
Use it when building or reviewing command-line tools, including Click, argparse, TypeScript, shell, and Django management commands. The dry run must follow the same target and payload logic without making changes.
Why use it?
It helps prevent accidental changes by showing what would happen first and requiring an explicit confirmation before writing or deleting.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when building or reviewing command-line tools, including Click, argparse, TypeScript, shell, and Django management commands. The dry run must follow the same target and payload logic without making changes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ciscodevnet/essentials/ess-cli-write-safety
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/CiscoDevNet/essentials

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 ess-cli-write-safety

README.md
[![agentmods](https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-cli-write-safety/github.svg)](https://agentmods.dev/rules/ciscodevnet/essentials/ess-cli-write-safety)
Your own site
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/ess-cli-write-safety"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-cli-write-safety/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ess-cli-write-safety

Your own site · 80×15
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/ess-cli-write-safety"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/ess-cli-write-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.01002
Opus 5.5 $0.00000 $0.00401
Sonnet 5.5 $0.00000 $0.00200
Haiku 4.5 $0.00000 $0.00100

Measured 2d ago against content hash 9bf28f4d8ae7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ess-cli-write-safety scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/ess-cli-write-safety.mdc · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI Write Safety

Applies to every command-line tool produced in this repo, whatever the language or argument parser: Click groups, argparse scripts under tools/, Django management commands, TypeScript bin entries, and shell scripts.

The three requirements

Any command that writes remote or local state, deletes, rotates a credential, or is otherwise not trivially reversible must have all three:

  1. --dry-run — runs the same code path, prints exactly what would change, exits 0, and touches nothing. It is not a separate "plan" branch that can drift from the real one; resolve the same targets and build the same payloads, then stop before the write.
  2. Confirmation by default — print a summary of what is about to happen (counts, target names, account/stack/environment), then prompt. Abort on anything but yes.
  3. --yes (alias -y) — bypasses the prompt, and nothing else. It must never imply or cancel --dry-run.

Use these exact flag names

--dry-run and --yes. Do not invent --apply, --submit, --commit, --force, --no-confirm, or --for-real.

Opt-in-to-write flags look safe but are not: they make the safe path the one the operator has to remember, and every tool picks a different word for it, so muscle memory from one tool does nothing for the next. Prompting by default gives the same protection without depending on recall.

Precedence and non-interactive runs

  • --dry-run wins if both flags are passed.
  • When a real write would occur, never silently proceed without explicit consent. Without a TTY, or in --json mode, fail and tell the operator to pass --yes. --dry-run skips this check because nothing is written.

Read-only commands

Must not prompt, and must not offer --dry-run — there is nothing to preview.

Where the flags live

Put --dry-run on the group when it governs every subcommand, and --yes on each write command. The complete shape:

@click.option("--dry-run", is_flag=True, default=False,
              help="Show planned changes without submitting them.")
...
@click.option("--yes", is_flag=True, default=False, help="Skip the confirmation prompt.")

Read the full file on GitHub · 97 lines

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. 2d ago First seen · 97 lines · 1,002 tokens per session scan A 9bf28f4d8ae7

Subscribe to this mod's changes

ess-cli-write-safety is a cursor rule published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,002 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-04.

Related

ess-cli-write-safety compared with cursor rules from other repositories

ess-cli-write-safety next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ess-cli-write-safetyCiscoDevNet/essentialsCursor rule73d agoApache-2.0A0Cursor
dashboard-testingAutomattic/wp-calypsoCursor rule13ktodayGPL-2.0A0Cursor
solarStahlwalker/framework-solarCursor rule23mo agoMITA0Cursor
use-contract-ir-factoriesprisma/ormCursor rule48ktodayApache-2.0A0Cursor
no-barrel-filesprisma/ormCursor rule48ktodayApache-2.0A0Cursor
explicit-opt-in-over-diagnosticsprisma/ormCursor rule48ktodayApache-2.0A730Cursor
no-backward-compatibilityprisma/ormCursor rule48ktodayApache-2.0A0Cursor