Tooluck logoTooluck
SKILL.md

langgraph-fundamentals

Agent skill fromlangchain-ai/langchain-skills

INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

How to install langgraph-fundamentals

install langgraph-fundamentals
# install the langchain-skills pack with the skills CLI
npx skills add langchain-ai/langchain-skills

# or add only this skill to Claude Code: copy the folder

config/skills/langgraph-fundamentals/

# into

~/.claude/skills/langgraph-fundamentals/ (all projects)

.claude/skills/langgraph-fundamentals/ (one project)

config/skills/langgraph-fundamentals/SKILL.md

MITFull file
1<overview>
2LangGraph models agent workflows as **directed graphs**:
3
4- **StateGraph**: Main class for building stateful graphs
5- **Nodes**: Functions that perform work and update state
6- **Edges**: Define execution order (static or conditional)
7- **START/END**: Special nodes marking entry and exit points
8- **State with Reducers**: Control how state updates are merged
9
10Graphs must be `compile()`d before execution.
11</overview>
12
13<design-methodology>
14
15### Designing a LangGraph application
16
17Follow these 5 steps when building a new graph:
18
191. **Map out discrete steps** — sketch a flowchart of your workflow. Each step becomes a node.
202. **Identify what each step does** — categorize nodes: LLM step, data step, action step, or user input step. For each, determine static context (prompt), dynamic context (from state), retry strategy, and desired outcome.
213. **Design your state** — state is shared memory for all nodes. Store raw data, format prompts on-demand inside nodes.
224. **Build your nodes** — implement each step as a function that takes state and returns partial updates.
235. **Wire it together** — connect nodes with edges, add conditional routing, compile with a checkpointer if needed.
24
25</design-methodology>
26
27<when-to-use-langgraph>
28
29| Use LangGraph When | Use Alternatives When |
30|-------------------|----------------------|
31| Need fine-grained control over agent orchestration | Quick prototyping → LangChain agents |
32…

Excerpt shown under the repository's MIT license.

More skills in langchain-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates