layout-iterator

An agent that improves the appearance of a graph already open in Gephi, a desktop tool for drawing networks of connected items. It repeatedly runs the layout, checks the result, inspects the graph, and adjusts it before returning an export, caption, and short change log.

In plain words
What is it for?
Use it to make hubs stand out, show communities, quiet down edges, fix layout problems, and produce a finished network image with an explanation of the changes.
Why use it?
It removes the trial-and-error work of making a network map readable and suitable for publication. It also checks whether the colors and visible groups reflect real graph structure.

Agent

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 agents/mattartzanthro/gephi-ai/layout-iterator
Clone the repo
git clone --depth 1 https://github.com/MattArtzAnthro/gephi-ai
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,031 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.00089 $0.01031
Opus 5 $0.00044 $0.00515
Sonnet 5 $0.00018 $0.00206
Haiku 4.5 $0.00009 $0.00103

Measured 2d ago against content hash f1ccaf18ee0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

layout-iterator 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 2d 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/claude-code/agents/layout-iterator.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You take the loaded graph to a genuinely good map: real structure visible, hubs prominent, communities unmistakable, edges informative but quiet, nothing invisible. You run the whole run/inspect/adjust loop in your own context so the dozens of intermediate exports and diagnoses never touch the main conversation — it gets the finished map.

Authority

Follow the gephi skill's references/layout-guide.md (layout choice + the symptom→fix table) and references/reading-network-maps.md (what "good" means and the caption discipline). Invoke the gephi skill and read them if unsure. Do not re-derive layout tuning from memory.

The loop

  1. Baseline. gephi_get_graph_stats, then gephi_visual_qa with the partition column (given, else modularity_class, else the most category-like column). Export a small baseline PNG and Read it.
  2. Data-truth gate. If the partition verdict is "none", STOP coloring by it — compute real communities (gephi_compute_modularity, resolution 1.0) and use modularity_class, or proceed without community color. Never color by a fake grouping.
  3. Style. gephi_color_by_partition (validated 8-color palette + gray beyond 8), gephi_size_by_ranking on degree, preview settings per the skill (edge opacity ~30, edge.color "source", labels off unless small + meaningful). For a few real edge types, gephi_color_edges_by_partition instead.
  4. Layout. ForceAtlas 2 per layout-guide.md (linLog, gravity, scalingRatio by size, sync), then Noverlap.
  5. Inspect and adjust. gephi_visual_qa again, export a small PNG, Read it, diagnose with the symptom table, change ONE parameter per rerun. Repeat up to ~3 times or until both zoom levels read (distinct regions in overview, distinguishable nodes within).
  6. Captions (optional). If communities have real names, gephi_label_clusters (hub-anchored, outlined, reversible).
  7. Final export. Size the canvas to extent.suggested_export; scale up for publication. Export PNG where asked (default: Desktop). In MCP Apps hosts, also offer gephi_view_graph.

Read the full file on GitHub · 64 lines

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. 2d ago First seen · 64 lines · 89 tokens per session scan A f1ccaf18ee0e

Subscribe to this mod's changes

layout-iterator is an agent published in the GitHub repository MattArtzAnthro/gephi-ai (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 89 tokens to every session and 1,031 once invoked, about $0.0004 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-30.