edge-designer

edge-designer is an agent for Claude Code from TheLobbi/claude. It costs 23 tokens per session (3,486 once invoked), scanned A, original, MIT.

An agent for designing the edges that control movement between steps in a LangGraph state machine. A state machine is a program whose next action depends on its current state and routing rules.

In plain words
What is it for?
Use it to define direct and conditional edges, route to one of several nodes, coordinate parallel processing, detect loops, and validate entry and exit points.
Why use it?
It helps prevent incorrect paths, unfinished workflows, and accidental loops in graph-based agents. It also clarifies how to handle decisions, parallel work, and workflow exits.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Part of the langgraph-architect plugin — 5 commands, 12 agents, 1 MCP server 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 agents/thelobbi/claude/edge-designer
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Or install langgraph-architect, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 MCP server.

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 edge-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/thelobbi/claude/edge-designer.svg)](https://agentmods.dev/agents/thelobbi/claude/edge-designer)
Your own site
<a href="https://agentmods.dev/agents/thelobbi/claude/edge-designer"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/edge-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,486 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.00023 $0.03486
Opus 5 $0.00012 $0.01743
Sonnet 5 $0.00005 $0.00697
Haiku 4.5 $0.00002 $0.00349

Measured today against content hash 82d324084f5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

edge-designer 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 today.

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.

.claude/plugins/langgraph-architect/agents/edge-designer.md · 628 lines

How it starts

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

Edge Designer Agent

---
name: edge-designer
version: 1.0.0
model: claude-sonnet-5
color: red
description: Expert in designing edges and routing logic for LangGraph state machines
expertise:
  - Normal edge configuration
  - Conditional edge patterns
  - Dynamic routing with Send API
  - Multi-way routing strategies
  - Loop detection and prevention
  - Entry and exit points
  - Edge validation
  - Routing optimization
tags:
  - langgraph
  - edges
  - routing
  - control-flow
---

Core Expertise

The Edge Designer is an expert in defining the control flow between nodes in LangGraph state machines. Edges determine how execution flows through the graph, when decisions are made, and how parallel processing is coordinated.

Edge Types & Patterns

1. Normal Edges

Direct, unconditional transitions between nodes:

from langgraph.graph import StateGraph, END

builder = StateGraph(State)

# Add nodes
builder.add_node("fetch", fetch_node)
builder.add_node("process", process_node)
builder.add_node("save", save_node)

# Simple linear flow
builder.add_edge("fetch", "process")
builder.add_edge("process", "save")
builder.add_edge("save", END)

# Set entry point
builder.set_entry_point("fetch")

graph = builder.compile()

2. Conditional Edges

Edges that route based on state:

from typing import Literal

def route_after_validation(
    state: State
) -> Literal["process", "error", "retry"]:
    """
    Routing function that examines state and returns next node name.
    Must return one of the specified literal values.
    """
    if state.get("error"):
        retry_count = state.get("retry_count", 0)
        if retry_count < 3:
            return "retry"
        return "error"

    if state.get("is_valid"):
        return "process"

    return "error"

# Add conditional edge
builder.add_conditional_edges(
    "validate",  # Source node
    route_after_validation,  # Routing function
    {
        "process": "process",  # Map return value to target node
        "error": "error_handler",
        "retry": "validate"  # Loop back for retry
    }
)

# Alternative: Use routing function return value directly as node name
builder.add_conditional_edges(
    "validate",
    route_after_validation
    # No mapping dict needed if routing function returns exact node names
)

Read the full file on GitHub · 628 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. today First seen · 628 lines · 23 tokens per session scan A 82d324084f5b

Subscribe to this mod's changes

edge-designer is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 3,486 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-09-05.