edit

edit is a command for Claude Code from AmirSoleimani/claude-stash. It costs 17 tokens per session (564 once invoked), scanned A, original, MIT.

A command for changing a saved item in the `.claude/stash.md` file, either by replacing its text or opening it in an editor.

In plain words
What is it for?
Use it to edit one stash entry by number, replace its text inline, or open that entry in your editor for broader changes.
Why use it?
It lets you update a stored note without changing its original capture time or disturbing other notes.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the stash plugin — 7 commands shipped together

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.

agentmods
npx agentmods add commands/amirsoleimani/claude-stash/edit
Clone the repo
git clone --depth 1 https://github.com/AmirSoleimani/claude-stash

Made for: Claude Code.

Or install stash, the plugin that ships this one along with the rest of its 7 commands.

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 edit

README.md
[![agentmods](https://agentmods.dev/badge/commands/amirsoleimani/claude-stash/edit.svg)](https://agentmods.dev/commands/amirsoleimani/claude-stash/edit)
Your own site
<a href="https://agentmods.dev/commands/amirsoleimani/claude-stash/edit"><img src="https://agentmods.dev/badge/commands/amirsoleimani/claude-stash/edit.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 564 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00017 $0.00564
Opus 5 $0.00009 $0.00282
Sonnet 5 $0.00003 $0.00113
Haiku 4.5 $0.00002 $0.00056

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

Security

Grade A, and why

edit 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 6d 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.

plugins/stash/commands/edit.md · 54 lines

What it actually says

Edit a stash item in .claude/stash.md. Two modes depending on $ARGUMENTS:

Mode A — Inline replacement (when text is provided after N):

If $ARGUMENTS is N <new text>, replace the item's text inline.

  1. Read .claude/stash.md. If empty or missing, respond: Stash is empty. and stop.
  2. Find item at position N. If out of range, respond with the current count and stop.
  3. Parse the line's [YYYY-MM-DD HH:MM] prefix and keep it unchanged — the timestamp records original capture, not last edit.
  4. Replace the line with:
    - [<original timestamp>] <new text>
    
    Position stays the same. Other lines untouched. Save.
  5. Respond:
    Edited item N.
    N. <new text>
    

Mode B — Open in editor (when only N is provided, no text):

If $ARGUMENTS is just N (a positive integer with no text after it), open the file in the user's editor so they can edit any line freely.

  1. Run this bash command (do not modify the file yourself):

    ${EDITOR:-vi} +<N+H> .claude/stash.md
    

    Where <N+H> calculates the line number of item N in the file (header is typically 2 lines: # Stash + blank line, so item N is on line N+2 — but verify by reading the file structure first). The +LINE syntax positions the cursor on that line for most editors.

  2. After the editor exits, respond:

    Editor closed. Run /stash:list to verify the change.
    

Mode C — Error (no valid input):

If $ARGUMENTS is empty or doesn't start with a positive integer, respond:

Usage:
  /stash:edit N <new text>   — replace inline
  /stash:edit N              — open in editor

Notes:

  • Mode A is fastest when you know the full new text.
  • Mode B is best when you want to tweak a single word, fix typos, or edit multiple lines.
  • Neither mode logs to .claude/stash.log.md. The log only tracks items leaving the stash (popped or dropped).
  • Timestamp preservation: if you want to refresh the timestamp (signal renewed urgency), use /stash:drop N then /stash:push <text>.
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. 6d ago First seen · 54 lines · 17 tokens per session scan A d18d727c1d09

Subscribe to this mod's changes

edit is a command published in the GitHub repository AmirSoleimani/claude-stash (10 stars, last pushed 3mo ago), licensed MIT. It adds 17 tokens to every session and 564 once invoked, about $0.0001 per session on Opus 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-08-31.