INVOKE FIRST for any LangChain / LangGraph / Deep Agents agent building project before consulting other skills or writing any agent code. Required starting point for up to date info on framework selection (LangChain vs LangGraph vs Deep Agents vs hybrid composition), agent patterns, install, environment setup, and which skill to load next.
npx skills add https://github.com/langchain-ai/langchain-skills --skill ecosystem-primer
<overview>
LangChain Inc. maintains three layered open-source tools for building agents, plus LangSmith for observability. The stack, top-down:
Higher layers depend on lower ones, but you don't need to use lower layers directly. Deep Agents gives you LangGraph's durable execution without writing graph code. LangChain gives you models and tools without managing graph edges.
</overview>
<decision-table>
Evaluate these conditions in order and stop at the first match:
create_agent function)This is your layer. BUT you are not done: later in Step 4, you MUST load the layer-specific skill before writing any agent code.
</decision-table>
<langchain-profile>
Best for:
Not ideal when:
All LangChain agents use create_agent(model, tools=[...]).
</langchain-profile>
<langgraph-profile>
Best for:
Not ideal when:
All LangGraph graphs use StateGraph(State) with explicit nodes, edges, and conditional edges.
</langgraph-profile>
<deep-agents-profile>
Best for:
Not ideal when:
All Deep Agents use create_deep_agent(model, tools=[...]).
</deep-agents-profile>
<mixing-layers>
The tools are layered, so they can be combined in the same project. Common patterns:
A compiled LangGraph graph can be registered as a named subagent inside Deep Agents — the orchestrator delegates to it via the task tool without knowing its internal structure. LangChain tools and retrievers work freely inside both LangGraph nodes and Deep Agents tools.
</mixing-layers>
Always set these for observability. These are the current LangSmith env var names. Copy them as-is. OLDER NAMES NO LONGER WORK.
<environment-variables>
LANGSMITH_API_KEY=<your-key>
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=<project-name>
</environment-variables>
Model-provider and tool-specific keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, TAVILY_API_KEY, etc.) depend on your stack — set them as needed.
<docs>
All documentation lives at docs.langchain.com, organized into two top-level sections:
/oss/python/) and TypeScript (/oss/javascript/) trees in parallel.Each product has its own page tree: overview → quickstart → how-to guides → reference.
Start here rather than tree-searching from root (swap python → javascript for TypeScript):
/oss/python/langchain/overview/oss/python/langgraph/overview/oss/python/deepagents/overview/langsmith/home (no language split)If the LangChain Docs MCP server is connected (mcp__docs-langchain__* tools are available), query it directly:
tree /oss/python -L 2 # explore Python structure
tree /oss/javascript -L 2 # parallel TypeScript structure
cat /oss/python/langchain/quickstart.mdx # read a specific page
rg -il "checkpointer" /oss/python/langgraph/ # search by keyword
If the MCP server is not available, use the llms.txt index:
https://docs.langchain.com/llms.txt — structured list of all pages with descriptions> Always prefer fetching live docs over relying on training-data knowledge — these libraries evolve fast and APIs change often.
</docs>
If the user only wants a minimal local working agent (new project, stub tool, provider key), load the matching quickstart first:
langchain-python-quickstart or langchain-typescript-quickstartlanggraph-python-quickstart or langgraph-typescript-quickstartdeepagents-python-quickstart or deepagents-typescript-quickstartOtherwise load the skill below that matches your layer from Step 1. This is required — the layer-specific skill carries the current API; the primer alone does not.
<next-skills>
langchain-fundamentals — building any LangChain agentlangchain-rag — adding RAG / vector store retrievallangchain-middleware — structured output with Pydanticlangchain-dependencies — package versions, installs, or dependency management questionslanggraph-fundamentals — any LangGraph graphlanggraph-human-in-the-loop — human-in-the-loop or approval workflowslanggraph-persistence — state that must survive restarts, or cross-thread memoryAlways load deep-agents-core first. Then, as needed:
deep-agents-orchestration — subagent delegation or orchestrationdeep-agents-memory — cross-session persistent memory</next-skills>
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.
Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.
Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits
Prompt for generating an AGENTS.md file for a repository
Take langchain-ai/ecosystem-primer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.