edit

edit is a command for coding agents from arielaizn/grok-plugin-cc. It costs 11 tokens per session (388 once invoked), scanned A, original, MIT.

A command that edits an existing image with Grok while preserving parts not mentioned in the instruction.

In plain words
What is it for?
Use it to make targeted changes to one or more image files, with the edited copies saved separately.
Why use it?
It changes a source image without recreating the whole scene, reducing the risk of losing the original subject or details.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the grok plugin — 3 skills, 9 commands, 1 agent 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/arielaizn/grok-plugin-cc/edit
Clone the repo
git clone --depth 1 https://github.com/arielaizn/grok-plugin-cc

Or install grok, the plugin that ships this one along with the rest of its 3 skills, 9 commands, 1 agent.

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/arielaizn/grok-plugin-cc/edit.svg)](https://agentmods.dev/commands/arielaizn/grok-plugin-cc/edit)
Your own site
<a href="https://agentmods.dev/commands/arielaizn/grok-plugin-cc/edit"><img src="https://agentmods.dev/badge/commands/arielaizn/grok-plugin-cc/edit.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 388 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 $0.00011 $0.00388
Opus 5 $0.00005 $0.00194
Sonnet 5 $0.00002 $0.00078
Haiku 4.5 $0.00001 $0.00039

Measured 4d ago against content hash 3b4fdbdbf3fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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/grok/commands/edit.md · 41 lines

What it actually says

Edit an existing image with Grok's image_edit tool.

Raw slash-command arguments: $ARGUMENTS

Argument handling:

  • --image is required and repeatable; each one is a path to a source image, or a data: URL.
  • If the user described an image but gave no --image, find the file first (Glob) and confirm the path with them rather than guessing.
  • Pass the instruction through verbatim. Describe only what changes — image_edit preserves everything the instruction does not mention, so extra scene description works against the edit.
  • Use this, not /grok:image, whenever there is a source image: re-generating from scratch will not preserve the subject.

Execution — foreground by default, roughly 25 seconds:

node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" edit $ARGUMENTS

Background, when the user asked for it or requested several variations:

Bash({
  command: `node "${CLAUDE_PLUGIN_ROOT}/scripts/grok-companion.mjs" edit $ARGUMENTS`,
  description: "Grok image edit",
  run_in_background: true
})

Output rules:

  • Relay the companion's output, then Read each saved file so the user can see the result.
  • The source image is never modified; edits are written as new files.
  • To iterate, run /grok:edit again against the newest output rather than re-running the original edit.
  • If the run failed, relay the reason verbatim and do not retry automatically.
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. 4d ago First seen · 41 lines · 11 tokens per session scan A 3b4fdbdbf3fa

Subscribe to this mod's changes

edit is a command published in the GitHub repository arielaizn/grok-plugin-cc (6 stars, last pushed 21d ago), licensed MIT. It adds 11 tokens to every session and 388 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.