langgraph-code-review
Catches common bugs in LangGraph state management, graph structure, and async patterns.
- Identifies 20+ critical issues including state mutations, missing reducers, invalid conditional edge returns, and checkpointer configuration errors
- Covers state schema problems like improper use of
add_messages, full-state returns, and Pydantic models without annotations - Detects graph structure issues: missing entry points, unreachable nodes, incomplete conditional paths, and undeclared Command destinations
- Flags async anti-patterns, tool integration mistakes (unpaired tool calls, parallel interrupts), and production checkpointing errors
- Includes a 10-item code review checklist for validating LangGraph implementations
LangGraph Code Review
When reviewing LangGraph code, check for these categories of issues.
Review gates (sequenced)
Complete in order. Each step has an objective pass condition before moving on.
-
Locate graph code — Search the review scope for
StateGraph,compile(,invoke,ainvoke,add_node,add_edge,add_conditional_edges. Pass: a short list of file paths (or explicit “none in scope” after searching). -
Map state schema — For each graph state type (
TypedDict,BaseModel, etc.), list fields that hold lists, dicts, or messages and whetherAnnotated+ reducers (add_messages,operator.add, …) are present. Pass: every such field is either covered by a reducer pattern below or explicitly flagged as intentional overwrite. -
Trace persistence — If interrupts,
thread_id, or checkpoint APIs appear, follow them tocompile(..., checkpointer=...)and invocationconfig. Pass: behavior matches the interrupt/checkpointer/thread_id guidance below—or you document a concrete mismatch with file:line. -
Report with evidence — For each finding you will deliver, record file path and line number(s) (or a minimal quoted snippet). Pass: no critical or high-severity issue is stated without that citation.
-
Run the checklist — Use the checklist at the end of this skill; each item is satisfied, not applicable (with reason), or open with evidence. Pass: no item left silently unchecked.
Critical Issues
More from existential-birds/beagle
react-flow
React Flow (@xyflow/react) for workflow visualization with custom nodes and edges. Use when building graph visualizations, creating custom workflow nodes, implementing edge labels, or controlling viewport. Triggers on ReactFlow, @xyflow/react, Handle, NodeProps, EdgeProps, useReactFlow, fitView.
773tailwind-v4
Tailwind CSS v4 with CSS-first configuration and design tokens. Use when setting up Tailwind v4, defining theme variables, using OKLCH colors, or configuring dark mode. Triggers on @theme, @tailwindcss/vite, oklch, CSS variables, --color-, tailwind v4.
598react-flow-advanced
Advanced React Flow patterns for complex use cases. Use when implementing sub-flows, custom connection lines, programmatic layouts, drag-and-drop, undo/redo, or complex state synchronization.
428python-code-review
Reviews Python code for type safety, async patterns, error handling, and common mistakes. Use when reviewing .py files, checking type hints, async/await usage, or exception handling.
426docling
Docling document parser for PDF, DOCX, PPTX, HTML, images, and 15+ formats. Use when parsing documents, extracting text, converting to Markdown/HTML/JSON, chunking for RAG pipelines, or batch processing files. Triggers on DocumentConverter, convert, convert_all, export_to_markdown, HierarchicalChunker, HybridChunker, ConversionResult.
378react-router-v7
React Router v7 best practices for data-driven routing. Use when implementing routes, loaders, actions, Form components, fetchers, navigation guards, protected routes, or URL search params. Triggers on createBrowserRouter, RouterProvider, useLoaderData, useActionData, useFetcher, NavLink, Outlet.
365