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.
git clone --depth 1 https://github.com/CiscoDevNet/essentialsWrote 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.
[](https://agentmods.dev/rules/ciscodevnet/essentials/cli-write-safety)<a href="https://agentmods.dev/rules/ciscodevnet/essentials/cli-write-safety"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/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.
<a href="https://agentmods.dev/rules/ciscodevnet/essentials/cli-write-safety"><img src="https://agentmods.dev/badge/rules/ciscodevnet/essentials/cli-write-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01053 | $0.01053 |
| Opus 5.5 | $0.00421 | $0.00421 |
| Sonnet 5.5 | $0.00211 | $0.00211 |
| Haiku 4.5 | $0.00105 | $0.00105 |
Grade A, and why
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 21d 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.
How it starts
The opening of the file, as written. The whole thing — 100 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:
--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.- 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.
--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-runwins if both flags are passed.- When a real write would occur, never silently proceed without explicit consent.
Without a TTY, or in
--jsonmode, fail and tell the operator to pass--yes.--dry-runskips 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. keys delete in packages/python/ess-langsmith-client/src/ess_langsmith_client/tools/keys.py
shows the confirmation half: it lists the keys it will delete, prompts by default, and
accepts --yes. It does not yet offer --dry-run, and its prompt goes to stdout; do not
copy those two gaps. The complete shape:
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.
- 21d ago First seen · 100 lines · 1,053 tokens per session scan A 20ce9f62dffe
cli-write-safety is a cursor rule published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 10d ago), licensed Apache-2.0. It adds 1,053 tokens to every session, about $0.0042 per session on Opus 5.5. 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-09-25.
Other cursor rules, from other repositories
solar
Rules for building with Solar (solarbuild) — a runtime UI framework for AI-generated code.
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
no-barrel-files
Avoid barrel files and unnecessary re-exports.
interface-factory-pattern
Interface-based design with factory functions (keep classes private).
explicit-opt-in-over-diagnostics
Prefer requiring explicit opt-in over emitting diagnostics on intentional user paths.
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.