langgraph

langgraph is a skill for Claude Code, Codex from davila7/claude-code-templates. It costs 99 tokens per session (1,750 once invoked), scanned A, original, MIT.

A guide to LangGraph, a framework for building AI applications as connected steps with shared state. It covers branching, loops, saved progress, tool use, and human approval points.

In plain words
What is it for?
Use it to build stateful AI agents, tool-using workflows, multi-step processes, streaming applications, and systems that pause for human input.
Why use it?
It helps make multi-step AI workflows easier to structure and inspect than an unplanned sequence of model calls. Saved progress can allow an application to continue after interruption.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 31krepo +44 today A scan Socket: passSnyk: warnSkillSpector: pass 99 tokens original MIT

Good fit Use it to build stateful AI agents, tool-using workflows, multi-step processes, streaming applications, and systems that pause for human input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davila7/claude-code-templates/langgraph
About the project

Claude Code Templates is a command-line tool and catalogue for configuring Anthropic’s Claude Code with agents, commands, settings, hooks, integrations, skills, and project templates. Developers use it to browse and install reusable components for their coding workflows. The catalogue includes many of these Claude Code components.

davila7/claude-code-templates · 30,559 stars · on GitHub · aitmpl.com

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 davila7/claude-code-templates --skill langgraph
Clone the repo
git clone --depth 1 https://github.com/davila7/claude-code-templates

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/davila7/claude-code-templates/langgraph.svg)](https://agentmods.dev/skills/davila7/claude-code-templates/langgraph)
Your own site
<a href="https://agentmods.dev/skills/davila7/claude-code-templates/langgraph"><img src="https://agentmods.dev/badge/skills/davila7/claude-code-templates/langgraph.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 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. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk warn 15 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00099 $0.01750
Opus 5 $0.00049 $0.00875
Sonnet 5 $0.00020 $0.00350
Haiku 4.5 $0.00010 $0.00175

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

Security

Grade A, and why

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

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

cli-tool/components/skills/ai-research/langgraph/SKILL.md · 288 lines

How it starts

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

LangGraph

Role: LangGraph Agent Architect

You are an expert in building production-grade AI agents with LangGraph. You understand that agents need explicit structure - graphs make the flow visible and debuggable. You design state carefully, use reducers appropriately, and always consider persistence for production. You know when cycles are needed and how to prevent infinite loops.

Capabilities

  • Graph construction (StateGraph)
  • State management and reducers
  • Node and edge definitions
  • Conditional routing
  • Checkpointers and persistence
  • Human-in-the-loop patterns
  • Tool integration
  • Streaming and async execution

Requirements

  • Python 3.9+
  • langgraph package
  • LLM API access (OpenAI, Anthropic, etc.)
  • Understanding of graph concepts

Patterns

Basic Agent Graph

Simple ReAct-style agent with tools

When to use: Single agent with tool calling

from typing import Annotated, TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.graph.message import add_messages
from langgraph.prebuilt import ToolNode
from langchain_openai import ChatOpenAI
from langchain_core.tools import tool

# 1. Define State
class AgentState(TypedDict):
    messages: Annotated[list, add_messages]
    # add_messages reducer appends, doesn't overwrite

# 2. Define Tools
@tool
def search(query: str) -> str:
    """Search the web for information."""
    # Implementation here
    return f"Results for: {query}"

@tool
def calculator(expression: str) -> str:
    """Evaluate a math expression."""
    return str(eval(expression))

tools = [search, calculator]

# 3. Create LLM with tools
llm = ChatOpenAI(model="gpt-4o").bind_tools(tools)

# 4. Define Nodes
def agent(state: AgentState) -> dict:
    """The agent node - calls LLM."""
    response = llm.invoke(state["messages"])
    return {"messages": [response]}

# Tool node handles tool execution
tool_node = ToolNode(tools)

# 5. Define Routing
def should_continue(state: AgentState) -> str:
    """Route based on whether tools were called."""
    last_message = state["messages"][-1]
    if last_message.tool_calls:
        return "tools"
    return END

# 6. Build Graph
graph = StateGraph(AgentState)

# Add nodes
graph.add_node("agent", agent)
graph.add_node("tools", tool_node)

# Add edges
graph.add_edge(START, "agent")
graph.add_conditional_edges("agent", should_continue, ["tools", END])
graph.add_edge("tools", "agent")  # Loop back

# Compile
app = graph.compile()

# 7. Run
result = app.invoke({
    "messages": [("user", "What is 25 * 4?")]
})

Read the full file on GitHub · 288 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. 5d ago First seen · 288 lines · 99 tokens per session scan A d193219abd35

Subscribe to this mod's changes

langgraph is a skill published in the GitHub repository davila7/claude-code-templates (30,559 stars, last pushed today), licensed MIT. It adds 99 tokens to every session and 1,750 once invoked, about $0.0005 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-03.

Related

Other skills, from other repositories

ccc-prompt-fix

Fix and sharpen a prompt. Diagnoses it against the 6 prompt-quality patterns, returns a tightened rewrite with the reasoning, and suggests the right library prompt for your task.

KevinZai/commander · 41 tokens

fabric-mlv

Use for Fabric Materialized Lake Views (MLVs) — CREATE MATERIALIZED LAKE VIEW Spark SQL (GA March 2026) + still-preview @fmlv.materializedlakeview PySpark decorator on a schema-enabled lakehouse (Runtime 1.3). Covers CREATE / SHOW / ALTER RENAME / DROP / REFRESH FULL syntax, CONSTRAINT ... CHECK ... ON MISMATCH…

wardawgmalvicious/agent-config · 245 tokens

ccc-data

For large datasets and data files, the Files API can ingest CSVs, JSON, Parquet, and other formats directly — avoiding token limits for bulk data analysis. Use data-ingestion from ccc-research for document-scale inputs.

KevinZai/commander · 35 tokens

fabric-ai-functions

Use for Microsoft Fabric AI Functions (Data Science) — one-line LLM transformations on pandas and PySpark DataFrames in Fabric notebooks: ai.analyzesentiment, ai.classify, ai.extract, ai.embed, ai.summarize, ai.translate, ai.fixgrammar, ai.generateresponse, ai.similarity. Covers the two import paths (synapse.ml.aifunc…

wardawgmalvicious/agent-config · 284 tokens

fabric-data-agent

Use when configuring Microsoft Fabric Data Agents (GA March 2026) — conversational Q&A over Lakehouse / Warehouse / KQL / Semantic Model / Fabric SQL DB / Mirrored DB / Ontology / MS Graph (≤5 sources per agent), consumed in-product or via the agent's MCP endpoint (Assistants API and Copilot-in-Power-BI paths retired…

wardawgmalvicious/agent-config · 230 tokens

fabric-semantic-model-ai-instructions

Use when configuring AI instructions on a Power BI semantic model — the 10,000-character blob attached via Prep data for AI → Add AI instructions in Desktop or the service. Applies everywhere Copilot uses the model (reports, Q&A, Copilot pane). Covers what belongs in the blob (business context, terminology, date…

wardawgmalvicious/agent-config · 154 tokens