Agent skill · Workflow & Productivity

langgraph-state

LangGraph state management patterns. Use when designing workflow state schemas, using TypedDict vs Pydantic, implementing accumulating state with Annotated operators, or managing shared state across nodes.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill langgraph-state --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Version: 1.0.0
Declared author: SkillForge
Path: skills/ai-llm/langgraph-state/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# LangGraph State Management Design and manage state schemas for LangGraph workflows. ## When to Use - Designing workflow state schemas - Choosing TypedDict vs Pydantic - Multi-agent state accumulation - State validation and typing ## TypedDict Approach (Simple) ```python from typing import TypedDict, Annotated from operator import add class WorkflowState(TypedDict): input: str output: str agent_responses: Annotated[list[dict], add] # Accumulates metadata: dict ``` ## MessagesState Pattern (2026 Best Practice) ```python from langgraph.graph import MessagesState from langgraph.graph.message import add_messages from typing import Annotated # Option 1: Use built-in MessagesState (recommended) class AgentState(MessagesState): """Extends MessagesState with custom fields.""" user_id: str context: dict # Option 2: Define messages manually with add_messages reducer class CustomState(TypedDict): messages: Annotated[list, add_messages] # Smart append/update by ID metadata: dict ``` **Why `add_messages` matters:** - Appends new messages (doesn't overwrite) - Updates existing messages by ID - Handles message deduplication automatically > **Note**: `MessageGraph` is deprecated in LangGraph v1.0

What's inside
Steps it walks through
  1. When to Use
  2. TypedDict Approach (Simple)
  3. MessagesState Pattern (2026 Best Practice)
  4. Pydantic Approach (Validation)
  5. Accumulating State Pattern
  6. Custom Reducers
  7. State Immutability
  8. Key Decisions
  9. Common Mistakes
  10. Related Skills
  11. Capability Details
  12. state-definition
  13. state-channels
  14. state-reducers
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the langgraph-state skill do?

LangGraph state management patterns. Use when designing workflow state schemas, using TypedDict vs Pydantic, implementing accumulating state with Annotated operators, or managing shared state across nodes.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill langgraph-state --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going