langgraph-patterns

langgraph-patterns is a skill for Claude Code from frankxai/claude-skills-library. It costs 53 tokens per session (1,770 once invoked), scanned A, original, MIT.

A guide to building agent workflows with LangGraph, a framework for connecting AI tasks as graphs and state machines.

In plain words
What is it for?
Use it when building or debugging LangGraph applications and when adding human review or advanced control flow to an agent.
Why use it?
It helps structure workflows that need saved state, branching decisions, human approval, or checkpoints instead of one uninterrupted model call.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-skills-library plugin — 114 skills shipped together

Good fit Use it when building or debugging LangGraph applications and when adding human review or advanced control flow to an agent.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/frankxai/claude-skills-library/langgraph-patterns
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.

Any agent
npx skills add frankxai/claude-skills-library --skill langgraph-patterns
Clone the repo
git clone --depth 1 https://github.com/frankxai/claude-skills-library

Made for: Claude Code.

Or install claude-skills-library, the plugin that ships this one along with the rest of its 114 skills.

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 langgraph-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/frankxai/claude-skills-library/langgraph-patterns/github.svg)](https://agentmods.dev/skills/frankxai/claude-skills-library/langgraph-patterns)
Your own site
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/langgraph-patterns"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/langgraph-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langgraph-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/frankxai/claude-skills-library/langgraph-patterns"><img src="https://agentmods.dev/badge/skills/frankxai/claude-skills-library/langgraph-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00053 $0.01770
Opus 5.5 $0.00021 $0.00708
Sonnet 5.5 $0.00011 $0.00354
Haiku 4.5 $0.00005 $0.00177

Measured 28d ago against content hash fd8df29a0104, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

langgraph-patterns 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 28d 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.

free-skills/langgraph-patterns/SKILL.md · 298 lines

How it starts

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

LangGraph Patterns Expert Skill

Purpose

Master LangGraph for building production-ready AI agents with fine-grained control, checkpointing, streaming, and complex state management.

Core Philosophy

LangGraph is: An orchestration framework with both declarative and imperative APIs focused on control and durability for production agents.

Not: High-level abstractions that hide complexity - instead provides building blocks for full control.

Migration: LangGraph replaces legacy AgentExecutor - migrate all old code.

The Six Production Features

  1. Parallelization - Run multiple nodes concurrently
  2. Streaming - Real-time partial outputs
  3. Checkpointing - Pause/resume execution
  4. Human-in-the-Loop - Approval/correction workflows
  5. Tracing - Observability and debugging
  6. Task Queue - Asynchronous job processing

Graph-Based Architecture

from langgraph.graph import StateGraph, END

# Define state
class AgentState(TypedDict):
    messages: Annotated[list, add_messages]
    next_action: str

# Create graph
graph = StateGraph(AgentState)

# Add nodes
graph.add_node("analyze", analyze_node)
graph.add_node("execute", execute_node)
graph.add_node("verify", verify_node)

# Define edges
graph.add_edge("analyze", "execute")
graph.add_conditional_edges(
    "execute",
    should_verify,
    {"yes": "verify", "no": END}
)

# Compile
app = graph.compile()

Core Patterns

Pattern 1: Agent with Tools

from langgraph.prebuilt import create_react_agent

tools = [search_tool, calculator_tool, db_query_tool]

agent = create_react_agent(
    model=llm,
    tools=tools,
    checkpointer=MemorySaver()
)

# Run with streaming
for chunk in agent.stream({"messages": [("user", "Analyze sales data")]}):
    print(chunk)

Pattern 2: Multi-Agent Collaboration

# Supervisor coordinates specialist agents
supervisor_graph = StateGraph(SupervisorState)

supervisor_graph.add_node("supervisor", supervisor_node)
supervisor_graph.add_node("researcher", researcher_agent)
supervisor_graph.add_node("analyst", analyst_agent)
supervisor_graph.add_node("writer", writer_agent)

# Supervisor routes to specialists
supervisor_graph.add_conditional_edges(
    "supervisor",
    route_to_agent,
    {
        "research": "researcher",
        "analyze": "analyst",
        "write": "writer",
        "finish": END
    }
)

Read the full file on GitHub · 298 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. 28d ago Changed fd8df29a0104
  2. 1mo ago Changed 02cde9c96108
  3. 1mo ago First seen · 298 lines · 53 tokens per session scan A 1c47fdcd97b6

Subscribe to this mod's changes

langgraph-patterns is a skill published in the GitHub repository frankxai/claude-skills-library (47 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 1,770 once invoked, about $0.0002 per session on Opus 5.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-03.

Related

Other skills, from other repositories

low-code-platforms

Low-code and internal tool platforms including Retool, Supabase, Appsmith, Tooljet, n8n, and Zapier. Use when building admin panels, internal tools, workflow automations, or integrating low-code platforms with custom code.

travisjneuman/.claude · 54 tokens

calcom-access

Access the Cal.com API via CLI with a 1Password API key: bookings, event types, schedules and availability. TRIGGERS - calcom, cal.com, list bookings, event types, create booking page.

terrylica/cc-skills · 49 tokens

nodejs-backend-patterns

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

chidekina/aria-superpowers · 58 tokens

api-design-principles

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

chidekina/aria-superpowers · 44 tokens

token-saver

Token optimization guide for Claude Code. This skill should be used when the user wants to reduce API costs, learn model routing strategies, or understand how to use free/cheaper tools (Ollama, Haiku) instead of burning expensive Claude tokens on routine tasks. Triggers on: save tokens, reduce costs, token tips, cheap…

chidekina/aria-superpowers · 85 tokens

collab

Generate collaborative editing infrastructure.

barnburner121/claude-plugin-marketplace · 7 tokens