readonly

readonly is a command for Claude Code from smrafiz/claude-supercharger. It costs 0 tokens per session (485 once invoked), scanned C, original, MIT.

A temporary read-only mode that blocks file edits and shell commands that change data, while allowing inspection and planning.

In plain words
What is it for?
Use it for a session or globally, check its status, set an expiry such as 20 minutes, or turn it off when editing is safe.
Why use it?
It prevents accidental changes while you explore or review a codebase.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: names the NotebookEdit tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the supercharger plugin — 37 commands, 10 agents, 28 hooks shipped together

Good fit Use it for a session or globally, check its status, set an expiry such as 20 minutes, or turn it off when editing is safe.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add smrafiz/claude-supercharger
Claude Code
/plugin install supercharger

Made for: Claude Code.

Or install supercharger, the plugin that ships this one along with the rest of its 37 commands, 10 agents, 28 hooks.

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 readonly

README.md
[![agentmods](https://agentmods.dev/badge/commands/smrafiz/claude-supercharger/readonly.svg)](https://agentmods.dev/commands/smrafiz/claude-supercharger/readonly)
Your own site
<a href="https://agentmods.dev/commands/smrafiz/claude-supercharger/readonly"><img src="https://agentmods.dev/badge/commands/smrafiz/claude-supercharger/readonly.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 485 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00485
Opus 5 $0.00000 $0.00243
Sonnet 5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade C, and why

readonly 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.

- This is a **workflow guard** ("don't touch"), not a security sandbox — precise for the editor tools, best-effort for Bash. The always-on safety hooks (`rm -rf`, force-push, credential leaks) are the real floor and stay
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

commands/readonly.md · 26 lines

What it actually says

Read-only mode — "look, don't touch" for a while. Arguments: $ARGUMENTS ( [session|global] | off | status)

The inverse of /sc-autopilot: while read-only mode is on, Supercharger blocks every file edit (Write/Edit/MultiEdit/NotebookEdit) and every mutating shell command (rm, mv, git commit/push, npm install, sed -i, redirects that write a file, …). Reads, searches, and planning stay allowed. Great for exploring or reviewing a codebase without any risk of accidental changes. It auto-expires and is hard-capped at 2 hours.

Scope (default is per-session):

  • session (default) — only this Claude session is read-only.
  • global — every session on the machine is read-only.

Run it (pass the argument straight through; default to status if none given):

bash ${CLAUDE_PLUGIN_ROOT}/tools/readonly.sh $ARGUMENTS

Then report the tool's output verbatim.

  • /sc-readonly 20m — read-only for 20 minutes in this session only. Accepts 20m, 2h, 90s, or a bare number (minutes).
  • /sc-readonly 20m global — read-only for all sessions on the machine.
  • /sc-readonly off — turn it off now; edits are allowed again.
  • /sc-readonly status — show whether it's on (per-session and/or global) and how long is left.

Notes to surface to the user:

  • This is a workflow guard ("don't touch"), not a security sandbox — precise for the editor tools, best-effort for Bash. The always-on safety hooks (rm -rf, force-push, credential leaks) are the real floor and stay active either way.
  • It ends automatically at the deadline (checked on each tool call — no background timer). The statusline shows a ⚡ Read-only: Nm left indicator while it's active.
  • Interacts cleanly with autopilot: read-only wins — a blocked edit is blocked even if autopilot would have auto-approved it (tighten beats loosen).
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 · 26 lines · 0 tokens per session scan C 7da66718d494

Subscribe to this mod's changes

readonly is a command published in the GitHub repository smrafiz/claude-supercharger (11 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 485 tokens. 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.