Agent skill
langgraph
LangGraph state-machine design and debugging for `StateGraph`, node/edge routing, checkpoints, `interrupt`, and HITL flows. Use when building or troubleshooting graph-based agents with conditional edges and thread state.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/langgraph-outlinedriven-odin-codex-plugin
SKILL.md
LangGraph
Use this skill to design, implement, and debug LangGraph workflows with explicit state contracts, deterministic routing, and robust interrupt handling.
Quick Triage
- Use this skill when the task involves graph nodes/edges, conditional routing, checkpointing, thread state, or HITL interrupts.
- Switch to
$langchainwhen the task is mostly prompt/tool chain composition without graph-level orchestration. - Switch to
$ag-uiwhen the task is protocol-level event synchronization with a frontend client. - Switch to
$copilotkitwhen the task is CopilotKit provider/hooks/shared-state UI integration.
Workflow
- Define state schema first. Include only fields required for routing, retries, and outputs.
- Define node contracts. Each node should have one clear responsibility and explicit input/output assumptions.
- Define edges and routers. Map all normal, retry, and terminal paths before implementing node internals.
- Add persistence strategy. Choose checkpointer configuration and thread identity contract early.
- Add interrupt strategy. Define where human approvals occur and how resume payloads are parsed.
- Compile and visualize. Validate graph shape before running large test scenarios.
- Verify with scenario tests. Cover pass, retry, skip, and max-retry termination paths.
Default Patterns
- Keep routing predicates pure and side-effect free.
- Keep node outputs explicit and minimal.
- Use separate nodes for validation vs generation to reduce coupling.
- Route by failure class (recoverable vs terminal) rather than generic “error”.
Failure Modes
- Implicit state mutations causing routing drift.
- Retry loops without cap or fallback exit.
- Interrupt payload mismatch between backend and UI.
- Missing thread/checkpoint identity causing non-reproducible flows.
Reference Map
Load only what is needed for the current subtask.
- Graph design patterns:
references/graph-design-patterns.md - State and checkpoints:
references/state-and-checkpointing.md - HITL interrupts:
references/hitl-interrupts.md - Debugging playbook:
references/debugging-playbook.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?