← ClaudeAtlas

langgraph-state-machine-designerlisted

Converts a workflow description into a LangGraph node/edge graph with typed state, conditional routing, and human-in-the-loop checkpoints.
Notysoty/openagentskills · ★ 9 · AI & Automation · score 80
Install: claude install-skill Notysoty/openagentskills
# LangGraph State Machine Designer ## What this skill does This skill takes a plain-language description of an agentic workflow and designs the corresponding LangGraph state machine: typed state schema, node functions, conditional edges, and checkpoint configuration. It handles the hard parts — state typing, routing logic, error recovery, and human-in-the-loop interrupts. ## How to use ### Claude Code / Cline Copy this file to `.agents/skills/langgraph-state-machine-designer/SKILL.md` in your project root. Then ask: - *"Use the LangGraph State Machine Designer to build a research-then-write workflow."* - *"Design a LangGraph agent that routes between a SQL tool and a web search tool."* Provide: - What the agent should do (in plain English) - What tools or actions it has available - Whether humans need to approve any steps - Your LangGraph version (v0.2+ assumed) ### Cursor / Codex Describe the workflow and paste these instructions. Ask for the full graph code. ## The Prompt / Instructions for the Agent When asked to design a LangGraph state machine, produce the following: ### Step 1 — Define the TypedDict state Every LangGraph graph has a single shared state object. Define it as a TypedDict with `Annotated` fields for lists (so they append rather than overwrite): ```python from typing import TypedDict, Annotated, Sequence from langchain_core.messages import BaseMessage import operator class AgentState(TypedDict): messages: Annotated[Sequence[BaseMessage], o