langgraph · davila7 — Claude Code skill: build agents as graphs
A Claude skill for building LangGraph agents: state, branching, checkpointers and the ReAct loop.
npx claude-code-templates@latest --skill ai-research/langgraphWhat langgraph does
This skill turns Claude into a LangGraph architect. It walks through StateGraph construction: declaring state, adding nodes and edges, wiring conditional routing. Reducers get their own treatment — add_messages appends instead of overwriting, and a custom reducer can merge dicts coming from several nodes.
Inside are code templates: a basic ReAct agent with ToolNode, state with multiple reducers, branching on query type. There is also an anti-patterns section. A loop with no exit burns tokens, and stateless nodes throw away the main LangGraph benefit — you cannot resume a conversation.
You need Python 3.9+, the langgraph package and LLM API access such as OpenAI or Anthropic. If your graph has a cycle, put an iteration counter in state: without an exit condition the agent loops and hits your request limit.
What it helps with
- build a ReAct agent that calls tools
- define state with reducers for accumulating data
- route queries into branches with conditional edges
- add a checkpointer and resume a conversation
- catch an infinite loop in an agent graph
Example prompts for the agent
- help me build a StateGraph for an agent with search and a calculator
- write state with a reducer that merges findings from several nodes
- add an exit condition based on an iteration counter
How to install langgraph
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/langgraph2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill langgraph -a claude-code3Manually: put the files in place
~/.claude/skills/langgraph/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/langgraph/
Manually: put the files in place
.agents/skills/langgraph/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/langgraph/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates langgraph2Manually: put the files in place
.github/skills/langgraph/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/langgraphManually: put the files in place
.devin/skills/langgraph/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about langgraph
How do I install langgraph in Claude?
Use the templates: npx claude-code-templates@latest --skill ai-research/langgraph. Or run npx skills add davila7/claude-code-templates --skill langgraph -a claude-code.
What does the langgraph skill do?
It helps you design LangGraph agents: graphs, state, reducers, branching, checkpointers and human-in-the-loop patterns. Code templates and common mistakes are included.
What do I need to run it?
Python 3.9+, the langgraph package installed, and LLM API access — Anthropic, Anthropic or another provider. Some familiarity with graph concepts helps.
Similar skills
Everything for AI and ML →langgraph by other authors comes first.