From langgraph-code-review-plugin
Production-grade LangGraph code review. Use when reviewing LangGraph implementations, agent architectures, state management, graph topology, multi-agent systems, or production reliability patterns. Triggers on mentions of LangGraph, agents, state machines, graphs, checkpoints, or LangSmith.
How this skill is triggered — by the user, by Claude, or both
Slash command
/langgraph-code-review-plugin:langgraph-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review LangGraph code for production readiness, focusing on architectural integrity, reliability, and performance. This skill ensures implementations follow the "Control over Agency" philosophy essential for enterprise systems.
Review LangGraph code for production readiness, focusing on architectural integrity, reliability, and performance. This skill ensures implementations follow the "Control over Agency" philosophy essential for enterprise systems.
The primary mandate in production systems is developer-controlled orchestration over high-level agent abstractions. High-level wrappers introduce "Black Box" failure modes. For enterprise stability:
Check: Are state channels restricted to essential data?
# BAD: Over-serialized, loss of type safety
class GlobalState(TypedDict):
data_blob: str # Single JSON string containing everything
# GOOD: Granular control, typed channels
class AgentState(TypedDict):
conversation_history: Annotated[list[AnyMessage], add_messages]
current_intent: str
security_clearance: bool
internal_scratchpad: list[str]
Check: Is state defined using TypedDict with explicit types?
Check: Are message reducers (add_messages) used correctly?
Check: Is recursion_limit explicitly set for every graph invocation?
# GOOD: Explicit recursion limit
graph.invoke(inputs, config={"recursion_limit": 50})
Check: Are critical guardrails handled by rule-based routers?
def route_after_scan(state: AgentState):
# Deterministic check - NOT LLM-based
if not state.get("security_scan_passed"):
return "unauthorized_access_node"
# Semantic routing for non-critical paths
return "execute_tool_node"
Check: Are independent nodes explicitly parallelized?
Check: Is a Postgres/Redis checkpointer enabled for multi-turn threads?
from langgraph.checkpoint.postgres import PostgresSaver
checkpointer = PostgresSaver(connection_string)
graph.invoke(inputs, config={"configurable": {"thread_id": "user-123"}})
Check: Are interrupt() calls placed before sensitive tool executions?
Check: Is a double-texting strategy defined?
Check: Is state size being monitored?
Check: Are token-level and update-level streams implemented?
values: Full state streamupdates: Changed channels onlymessages: Real-time tokensasync for event in graph.astream_events(inputs, version="v2"):
if event["event"] == "on_chat_model_stream":
yield event["data"]["chunk"]
Check: Are complex agent behaviors encapsulated in independent subgraphs?
Check: Does the supervisor pattern minimize unnecessary LLM chatter?
Warning: Pure loop agents where LLM directs its own process
Warning: Supervisor approves every trivial sequential step
Warning: Vague or implicit graph termination
Warning: Agents sharing full message history unnecessarily
Provide a structured review:
## Architecture Assessment
[Overall pattern and approach]
## Critical Issues
[Must-fix before production]
## Warnings
[Should address for production quality]
## Recommendations
[Nice-to-have improvements]
## Checklist Summary
- [ ] State Minimalism: [PASS/FAIL]
- [ ] Strict Typing: [PASS/FAIL]
- [ ] Reducer Logic: [PASS/FAIL]
- [ ] Recursion Limits: [PASS/FAIL]
- [ ] Deterministic Safety Edges: [PASS/FAIL]
- [ ] Parallel Efficiency: [PASS/FAIL/N/A]
- [ ] Persistence Layer: [PASS/FAIL/N/A]
- [ ] Strategic Interruption: [PASS/FAIL/N/A]
- [ ] Concurrency Strategy: [PASS/FAIL/N/A]
- [ ] Serialization Check: [PASS/FAIL]
- [ ] Streaming Implementation: [PASS/FAIL/N/A]
- [ ] Modular Subgraphs: [PASS/FAIL/N/A]
- [ ] Supervisor Efficiency: [PASS/FAIL/N/A]
Be concise, actionable, and focused on production readiness. Prioritize reliability and safety over flexibility.
npx claudepluginhub zegging/useful-skills --plugin langgraph-code-review-pluginReviews LangGraph code for bugs, anti-patterns, and improvements in state management, graph structure, and async patterns. Useful when debugging StateGraph, nodes, edges, and checkpointing logic.
Builds production-grade AI agents with LangGraph: graph construction, state management, persistence, human-in-the-loop, and the ReAct agent pattern.
Builds and debugs LangGraph applications with graph orchestration, state machines, checkpoints, and human-in-the-loop workflows.