Course Content
LangGraph Skill Pack
A skill pack for scaffolding LangGraph state machines, node design, and graph debugging
What This Pack Covers
Two skills for teams building agents with LangGraph, rather than just using pre-built ones: one scaffolds a new StateGraph from a plain-language description of a flow, and one reviews an existing graph for common structural mistakes. This pack is a slightly different kind of skill than the rest of this course — the “user” is a developer building an agent, and the domain knowledge being packaged is about agent construction itself, which makes it worth noticing how directly the multi-agent design ideas from the companion course map onto LangGraph’s actual API.
Skill 1: langgraph-scaffold
---
name: langgraph-scaffold
description: Scaffolds a LangGraph StateGraph from a plain-language description of an agent's flow — nodes, edges, and conditional routing. Use when the user describes an agent workflow and asks to build, scaffold, or set up a LangGraph graph for it.
metadata:
version: "1.0.0"
---
## Generate the scaffold
1. From the description, identify each distinct step as a node — the same
node-identification discipline as picking design patterns: one node
should do one job, not several.
2. Identify whether the flow is linear (fixed sequence) or branches
(the next node depends on the previous node's output). A linear flow
uses `add_edge`; a branching flow needs `add_conditional_edges` with
a routing function.
3. Generate the scaffold:
\`\`\`python
from langgraph.graph import StateGraph, END
from typing import TypedDict
class AgentState(TypedDict):
# TODO: define the fields this graph actually needs to carry
pass
graph = StateGraph(AgentState)
# TODO: implement each node function below
graph.add_node("research", research_node)
graph.add_node("draft", draft_node)
graph.add_node("review", review_node)
graph.set_entry_point("research")
graph.add_edge("research", "draft")
graph.add_conditional_edges(
"review",
route_after_review, # TODO: implement — returns next node name
{"revise": "draft", "done": END}
)
graph.add_edge("draft", "review")
app = graph.compile()
\`\`\`
4. Leave every node function and routing function as a `TODO` — this
skill's job is the graph's shape, not the logic inside each node,
which needs the same human judgment the free course's capstone
[transformation-skill guidance](/courses/agent-skills-mastery/agent-skills-capstone) applies to any generated scaffold.
5. Always include an explicit path to `END` — a graph with no reachable
`END` will run indefinitely on any input that hits that path.Pattern: Workflow, generating consistent structure — and notice the parallel: a LangGraph node is close kin to an agent role from Multi-Agent Skill Systems — a research node, a draft node, a review node map directly onto researcher, executor, and reviewer roles, just expressed as graph nodes instead of separate agents.
Skill 2: langgraph-graph-review
---
name: langgraph-graph-review
description: Reviews a LangGraph StateGraph definition for structural mistakes — unreachable nodes, missing END paths, and state schema issues. Use when reviewing LangGraph code, debugging a graph that won't terminate, or before shipping a new graph.
metadata:
version: "1.0.0"
---
## Review checklist
1. **Unreachable nodes.** Every node added via `add_node` should have at
least one incoming edge (or be the entry point). Flag any node that's
defined but never targeted by `add_edge` or `add_conditional_edges`.
2. **Missing END path.** Trace every path from the entry point. Flag any
path that has no way to reach `END` — this is the most common cause of
a graph that runs forever or hits a recursion limit.
3. **Conditional edges with incomplete routing.** For every
`add_conditional_edges` call, check that the routing function's
possible return values all appear as keys in the routing dict. A
routing function that can return a value with no matching edge will
fail at runtime, not at graph-definition time — which makes this
easy to miss without a specific check for it.
4. **State schema drift.** If a node function reads or writes a state key
not declared in the `TypedDict` (or equivalent) schema, flag it — this
works today because Python doesn't enforce it, but it's a latent bug
waiting for someone to rename a field elsewhere.
Report findings with the specific node or edge involved, not a general
"the graph has issues" summary.Pattern: Validator, applied to a domain where several of the most serious mistakes (no END reachable, an unhandled conditional routing value) are silent at definition time and only surface as a runtime failure or an infinite loop — exactly the kind of thing worth a dedicated review pass rather than trusting it’ll be caught by running the graph once and having it happen to hit the working path.
Testing Both Skills
For langgraph-scaffold, test against a purely linear description (“first do X, then Y, then Z”) and a description that clearly branches (“check the result, and if it fails, try again”) — confirm the skill correctly picks add_edge versus add_conditional_edges rather than defaulting to one regardless of the description. For langgraph-graph-review, the most valuable test case is a graph with a routing function that can return a value not covered by any edge — this is the failure mode most likely to slip through a casual code review, since it’s invisible until that specific branch actually executes at runtime.
Summary
langgraph-scaffoldis a Workflow skill turning a plain-language flow description intoStateGraphstructure, deliberately leaving node and routing logic asTODOs for a human to implementlanggraph-graph-reviewis a Validator catching structural mistakes that are silent at definition time — unreachable nodes, missingENDpaths, incomplete conditional routing, state schema drift- LangGraph nodes map directly onto the agent-role thinking from Multi-Agent Skill Systems — the same design vocabulary, expressed as graph structure instead of separate agents
- The highest-value test case for the review skill is a routing function with an uncovered return value, since that failure mode is invisible until runtime
Next, one deep enterprise domain pack — banking and financial services, where regulatory and compliance concerns shape almost every skill decision.
