iterate

iterate is a command for coding agents from jessepike/diagram-forge. It costs 10 tokens per session (312 once invoked), scanned A, original, MIT.

A command for revising an existing diagram with instructions such as changing its labels, layout, components, connections, colors, or readability.

In plain words
What is it for?
Use it to edit a diagram file, select a suitable provider, apply requested changes, and produce an updated version.
Why use it?
It gives the agent a defined process for improving a diagram rather than requiring the whole image to be recreated immediately.

Command

Part of the diagram-forge plugin — 1 skill, 4 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/jessepike/diagram-forge/iterate
Clone the repo
git clone --depth 1 https://github.com/jessepike/diagram-forge

Or install diagram-forge, the plugin that ships this one along with the rest of its 1 skill, 4 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 iterate

README.md
[![agentmods](https://agentmods.dev/badge/commands/jessepike/diagram-forge/iterate.svg)](https://agentmods.dev/commands/jessepike/diagram-forge/iterate)
Your own site
<a href="https://agentmods.dev/commands/jessepike/diagram-forge/iterate"><img src="https://agentmods.dev/badge/commands/jessepike/diagram-forge/iterate.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 312 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.00010 $0.00312
Opus 5 $0.00005 $0.00156
Sonnet 5 $0.00002 $0.00062
Haiku 4.5 $0.00001 $0.00031

Measured 5d ago against content hash 84ed7e0d1350, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

iterate 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 5d 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.

diagram-forge-plugin/commands/iterate.md · 39 lines

What it actually says

Diagram Iteration Workflow

You are helping the user refine an existing diagram using the diagram-forge edit_diagram MCP tool.

Steps

  1. Verify the image: Confirm the provided image_path exists using the Read tool (it can read images).

  2. Gather edit instructions: If the user provided instructions, use them. Otherwise, ask what they want to change. Common edits include:

    • Add/remove components
    • Change layout or grouping
    • Update labels or text
    • Adjust colors or styling
    • Add connections or data flows
    • Improve legibility
  3. Select provider: Use the same provider that generated the original diagram if known. Gemini and OpenAI both support editing.

  4. Execute edit: Call edit_diagram with the image path, edit instructions, and provider.

  5. Present results: Show the new output path. Offer to iterate further or compare with the original.

Guidelines

  • Show the edit prompt before executing
  • Mention that edits may not be pixel-perfect — sometimes regenerating with an updated prompt works better
  • If multiple rounds of editing degrade quality, suggest regenerating from scratch with a refined prompt
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. 5d ago First seen · 39 lines · 10 tokens per session scan A 84ed7e0d1350

Subscribe to this mod's changes

iterate is a command published in the GitHub repository jessepike/diagram-forge (1 stars, last pushed 28d ago), licensed MIT. It adds 10 tokens to every session and 312 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.