langchain
LangChain
Use this skill to build or refactor LangChain application logic with predictable tool use, structured outputs, and clean runtime boundaries.
Quick Triage
- Use this skill when the task is primarily chain/agent composition, tool calling, middleware, output schemas, or prompt wiring.
- Switch to
$langgraphwhen the core problem is graph topology, node routing, checkpoints, interrupts, or multi-step state machines. - Switch to
$ag-uiwhen the core problem is event protocol compliance between backend and UI. - Switch to
$copilotkitwhen the core problem is frontend coagent UX, hooks, and runtime provider wiring.
Workflow
- Confirm language/runtime surface first. Choose Python or TypeScript and identify existing package boundaries before code edits.
- Define the contract before implementation. Lock input shape, output shape, tool schema, and failure behavior.
- Choose abstraction level deliberately.
Use simple LCEL chains when tools are not required; use
create_agentwhen iterative tool use is needed. - Add tools and middleware in a deterministic order. Validate schema compatibility and tool side effects before adding retries or guardrails.
- Enforce structured output and state rules. Use explicit schema validation and avoid ad-hoc parsing.
- Add observability and limits. Set timeouts, retries, and tracing hooks before rollout.
- Verify with focused tests. Run unit tests for tool bindings and integration tests for end-to-end agent loops.
Default Patterns
- Prefer explicit tool schemas over implicit argument parsing.
- Keep tool side effects isolated from prompt logic.
- Keep prompt templates and business logic separate.
- Validate all structured outputs at boundaries.
- Keep retries bounded and idempotent.
Failure Modes
- Tool schema drift between prompt and implementation.
- Unbounded agent loops due to missing stop conditions.
- Silent parsing failures from weak output contracts.
- Middleware order causing policy bypass.
- State growth without trimming/summarization rules.
Reference Map
Load only what is needed for the current subtask.
- Core workflow patterns:
references/core-workflows.md - Tooling and middleware:
references/tooling-and-middleware.md - Structured output and state:
references/structured-output-and-state.md - Debugging and recovery:
references/troubleshooting.md
More from outlinedriven/odin-codex-plugin
copilotkit
CopilotKit integration patterns for providers, runtime wiring, `useCoAgent`, `useCopilotAction`, `useLangGraphInterrupt`, shared state, and HITL with LangGraph. Use when building agent-native product UX.
65ag-ui
AG-UI protocol implementation guidance for event ordering (`RUN_STARTED`, `TOOL_CALL_*`, `STATE_SNAPSHOT`/`STATE_DELTA`), streaming semantics, and middleware patterns. Use when integrating agent backends with AG-UI clients.
29mesop
Build Python-native web apps with Mesop. Triggers when users want to build, debug, or deploy Mesop applications, including AI chat interfaces, internal tools, and ML demos.
22plan
Generate a plan for how an agent should accomplish a complex coding task. Use when a user asks for a plan, and optionally when they want to save, find, read, update, or delete plan files in $CODEX_HOME/plans (default ~/.codex/plans).
22langgraph
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.
22code-simplifier
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
22