Agent skill

Langchain

by magnus919 in magnus919/agent-skills

Build LLM applications with LangChain. An agent skill from magnus919/agent-skills.

MITAuto-check passedAI & LLM Engineering

Install Langchain

skills CLI
$ npx skills add magnus919/agent-skills --skill langchain -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install magnus919/agent-skills langchain --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/magnus919/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/langchain .claude/skills/langchain && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
langchain
GitHub stars
115
Token cost
~2.3k tokens
SKILL.md length
938 words
Files
17 (incl. scripts, references)
Skills in repo
131
Repo updated
First seen
Licence
MIT

At a glance

Build LLM applications with LangChain. An agent skill from magnus919/agent-skills.

  • Works in 5 steps: LCEL is the composition primitive. The… → Agents run on LangGraph. Since v1.0,… → RAG is a chain, not a framework.… → …
  • Working with LangChain
  • SKILL.md covers Core Principles, Where to Start, Pipeline Mode and Quick Reference, plus 7 more sections
  • Runs Python scripts from its folder

What it does

Langchain is an agent skill from magnus919/agent-skills. Build LLM applications with LangChain. Use when working with LangChain or comparing LLM application frameworks. Do not use this skill for unrelated requests; route to the nearest named specialist.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including scripts and reference files (for example `README.md`, `evals/evals.json` and `references/agent-patterns.md`).

It sits in AI & LLM Engineering, covering Building AI agents. It works with LangChain and LangGraph. The repository describes itself as: Curated collection of AI agent skills for Hermes and other agent frameworks. The licence is MIT.

When your agent uses it

  • Working with LangChain
  • Comparing LLM application frameworks
  • Unrelated requests
  • Route to the nearest named specialist

Example prompts

  • “/langchain”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. LCEL is the composition primitive. The pipe operator (|) chains Runnables. Every component — prompt, model, parser, retriever — implements…
  2. Agents run on LangGraph. Since v1.0, create_agent generates a LangGraph state machine underneath. You get streaming, persistence, and…
  3. RAG is a chain, not a framework. retriever | prompt | model | parser is the canonical RAG pattern. Document loaders, splitters, and vector…
  4. LangSmith is production observability. Enable tracing at startup. 89% of production teams use observability — without it, debugging agent…
  5. The ecosystem is the moat. 1000+ integrations mean model providers, vector stores, and tools are swappable with one line. Build against…

What it can do on your machine

Read from SKILL.md and the folder at commit 22b4723. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Langchain loads about 2.3k tokens when it runs, and up to ~9.4k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 938 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from magnus919/agent-skills at commit 22b4723, republished under its MIT licence (© magnus919). 938 words, ~2,277 tokens.

Download SKILL.mdSave it as .claude/skills/langchain/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
langchain
description
Build LLM applications with LangChain. Use when working with LangChain or comparing LLM application frameworks. Do not use this skill for unrelated requests; route to the nearest named specialist.
license
MIT
metadata.author
Magnus Hedemark
metadata.version
1.1.0
metadata.source
https://github.com/langchain-ai/langchain

LangChain Expert Skill

LangChain is an MIT-licensed Python framework for building LLM-powered applications. Since v1.0 (October 2025), it provides a layered architecture: high-level chain composition via LCEL (LangChain Expression Language), agent creation via create_agent (running on the LangGraph runtime underneath), and production observability via LangSmith. With 1000+ integrations and 100K+ GitHub stars, it is the most widely adopted LLM orchestration framework.

Key v1.0 change: All new LangChain agents run on the LangGraph runtime. AgentExecutor is in maintenance mode until December 2026. Use create_agent for new agents. Drop to LangGraph directly when you need full state-machine control.

⚠️ CRITICAL: Do NOT use AgentExecutor for new code. It is in maintenance mode until December 2026. Use create_agent(model, tools, prompt) instead — it generates a LangGraph state machine with streaming, persistence, and observability out of the box.

Core Principles

These principles govern every decision when building with LangChain. Read them before proceeding to the reference guides.

  1. LCEL is the composition primitive. The pipe operator (|) chains Runnables. Every component — prompt, model, parser, retriever — implements the Runnable interface. Build everything in LCEL.
  2. Agents run on LangGraph. Since v1.0, create_agent generates a LangGraph state machine underneath. You get streaming, persistence, and observability without writing graph code. Drop to LangGraph when you need branching, cycles, or human-in-the-loop.
  3. RAG is a chain, not a framework. retriever | prompt | model | parser is the canonical RAG pattern. Document loaders, splitters, and vector stores are all interchangeable components.
  4. LangSmith is production observability. Enable tracing at startup. 89% of production teams use observability — without it, debugging agent behavior is guesswork.
  5. The ecosystem is the moat. 1000+ integrations mean model providers, vector stores, and tools are swappable with one line. Build against the interface, not the implementation.

Where to Start

You already have...Start here
Nothing — blank projectInstall LangChain, build a basic LCEL chain
Documents to queryBuild a RAG chain (load, split, embed, retrieve, generate)
A need for agentic behaviorUse create_agent with tools
Existing AgentExecutor codeMigrate to create_agent — see references/agent-patterns.md
A production deploymentAdd LangSmith tracing + LangServe deployment
Comparing frameworksSee the Framework Routing Guide

Pipeline Mode

ModeWhenPhases to runSkip
QuickSingle chain, explorationprompt → model → parserRetrieval, agents, production hardening
RAGDocument Q&Aload → split → embed → retrieve → generateAgent orchestration, deployment
AgentTool-using agentscreate_agent + tools + LangGraph runtimeIf simple chain suffices
ProductionShipping to usersRAG/Agent + LangSmith + LangServeNothing

Quick Reference

TaskApproachReference
Basic chainprompt | model | parserreferences/lcel-reference.md
RAG pipelineretriever | prompt | model | parserreferences/rag-strategies.md
Create agentcreate_agent(model, tools, prompt)references/agent-patterns.md
Tool definition@tool decoratorreferences/agent-patterns.md
Multi-agentLangGraph supervisor patternreferences/agent-patterns.md
ObservabilitySet LANGCHAIN_TRACING_V2=truereferences/production-deployment.md
DeploymentLangServe or LangSmith Deploymentreferences/production-deployment.md
Vector storeOne-line swap (Chroma, Pinecone, pgvector)references/integration-ecosystem.md

When to Use This Skill

Load this skill any time you are:

  • Building LCEL chains for LLM-powered applications
  • Implementing RAG pipelines over enterprise or personal data
  • Creating agents with tool-calling and multi-step reasoning
  • Deploying LLM applications to production with observability
  • Comparing LangChain with LlamaIndex, Haystack, or raw API calls
Show full SKILL.md (440 more words)Show less

Framework Routing Guide

This skill is part of a portfolio of framework skills. When deciding which fits:

ScenarioReach forWhy
I have chains to composeLangChainLCEL is the cleanest pipe-based composition model
I have documents to queryLlamaIndexData ingestion and retrieval are first-class primitives
I have agents to orchestrateLangGraphState-machine semantics, subgraphs, human-in-the-loop
I have a tool to wrap as an agentPydanticAIType-safe agent definitions with dependency injection
I have search pipelinesHaystackPipeline model is more mature for search workloads
Fast prototype of any kindLangChainFastest path from zero to working chain
A typed, bounded decision inside an agent workflowSystem OneSystem One owns question/model behavior and calibration; use LangChain middleware or outer conditional orchestration as the implementation seam, and harness-engineering for placement and whole-task outcomes

Reference Files

ReferenceLoad whenFile
LCEL ReferenceBuilding chains with the pipe operatorreferences/lcel-reference.md
ArchitectureUnderstanding package structure, Runnable, v1.0references/architecture.md
RAG StrategiesBuilding RAG pipelinesreferences/rag-strategies.md
Agent PatternsCreating agents with tools and multi-agentreferences/agent-patterns.md
Typed System One decision in an agentRoute the adapter seam, unknown lane, and handoff between model semantics and harness outcomesreferences/agent-patterns.md — see “Keep typed decisions outside the chat model”; continue to harness-engineering for placement and whole-task evidence
Production & DeploymentLangServe, LangSmith, deploymentreferences/production-deployment.md
Integration EcosystemModel providers, vector stores, toolsreferences/integration-ecosystem.md
FAQ & TroubleshootingCommon errors and fixesreferences/faq-and-troubleshooting.md
Callbacks SystemCustom logging, monitoring, agent auditingreferences/callbacks.md
Validation AuditResearch validation of all API claimsreferences/validation-audit.md

Template Files

TemplateWhen to useFile
Basic ChainSingle prompt→model→parser chaintemplates/basic-chain.py
RAG PipelineDocument Q&A with retrievaltemplates/rag-pipeline.py
Agent with ToolsTool-using agent with LangGraph runtimetemplates/agent-with-tools.py
Production DeployLangServe deployment with LangSmithtemplates/production-deploy.py

Scripts

ScriptPurposeFile
check-setupVerify LangChain installationscripts/check-setup.py

Troubleshooting Guide

SymptomLikely causeFixReference
Chain returns nothingOutput parser not connectedAdd .pipe(StrOutputParser()) or equivalentreferences/lcel-reference.md
Agent not calling toolsTool schema mismatchCheck tool has docstring and type hintsreferences/agent-patterns.md
LangSmith traces missingLANGCHAIN_TRACING_V2 not setSet env var before any chain executionreferences/production-deployment.md
Deprecation warningUsing AgentExecutorMigrate to create_agent (LangGraph runtime)references/agent-patterns.md
Model not foundIntegration package missingInstall langchain-openai, langchain-anthropic, etc.references/integration-ecosystem.md
Streaming not workingLCEL chain not streaming-nativeEnsure all components implement stream()references/lcel-reference.md
Vector store connection failsWrong credentials or missing packageInstall langchain-community + provider packagereferences/integration-ecosystem.md

When NOT to Use LangChain

  • Single-model, single-prompt application — raw API calls are simpler and more debuggable
  • Maximum transparency needed — LangGraph (which LangChain uses underneath) provides more visibility
  • Pure multi-agent state machines — LangGraph directly is the correct tool, not the high-level API
  • Stateless microservice with no LLM orchestration — LangChain adds overhead without benefit

© magnus919, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (scripts, references) in langchain of magnus919/agent-skills.

  • SKILL.md
  • README.md
  • evals/evals.json
  • references/agent-patterns.md
  • references/architecture.md
  • references/callbacks.md
  • references/faq-and-troubleshooting.md
  • references/integration-ecosystem.md
  • references/lcel-reference.md
  • references/production-deployment.md
  • references/rag-strategies.md
  • references/validation-audit.md
  • scripts/check-setup.py
  • templates/agent-with-tools.py
  • templates/basic-chain.py
  • templates/production-deploy.py
  • templates/rag-pipeline.py

Open the folder on GitHubat commit 22b4723

Compare with similar skills

Langchain next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Langchain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langchain this skillmagnus919/agent-skills115—~2.3kAutomated safety check: PassMIT
Mem0 Platform SDKmem0ai/mem067k1 repos~2.2kAutomated safety check: PassApache-2.0
LangSmith Trace DebuggingComposioHQ/awesome-claude-skills77k8 repos~2.7kAutomated safety check: PassNone
Add Example AgentGetBindu/Bindu10k—~1.1kAutomated safety check: NotesCustom licence
Failproof AI SDK IntegrationFailproofAI/failproofai5.3k—~6kAutomated safety check: PassCustom licence
Edgeone Makers MigrationTencentEdgeOne/edgeone-makers-tools1.9k1 repos~4.1kAutomated safety check: PassMIT

Similar skills

  • Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.

    67k GitHub starsUsed in 1 repo~2.2k tokens
    AI & LLM EngineeringAuto-check passed
  • LangSmith Trace Debugging

    ComposioHQ/awesome-claude-skills

    Debugs LangChain and LangGraph agents by pulling recent execution traces with the langsmith-fetch CLI and reporting errors, tool calls, timings and token use.

    77k GitHub starsUsed in 8 repos~2.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Example Agent

    GetBindu/Bindu

    Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.

    10k GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Failproof AI SDK Integration

    FailproofAI/failproofai

    Helps instrument a custom Python or TypeScript agent to record events for Failproof AI, verify what gets written, and run an evaluator worker that scores the runs.

    5.3k GitHub stars~6k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Edgeone Makers Migration

    TencentEdgeOne/edgeone-makers-tools

    Migrate existing AI agent projects (LangChain, LangGraph, OpenAI Agents SDK, Claude Agent SDK, CrewAI) to EdgeOne Makers platform conventions.

    1.9k GitHub starsUsed in 1 repo~4.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Omnigent Framework Detection

    omnigent-ai/omnigent

    Scans Python agent code for framework imports and recommends the matching Omnigent executor type, or says when the framework is not natively supported yet.

    11k GitHub stars~610 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from magnus919/agent-skills

All 131 skills in this repo
  • Artifact Pyramids

    magnus919/agent-skills

    Organize durable agent research outputs as summaries, analysis, and evidence dossiers.

    119 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Ascii City Engine

    magnus919/agent-skills

    Build portable, first-person colored ASCII city engines and small GIS-derived city packs.

    119 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Color Management

    magnus919/agent-skills

    Manage color workflows with ICC profiles, working spaces, gamut mapping, and color science.

    119 GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Data Scientist

    magnus919/agent-skills

    A skill your agent uses for PhD-level expertise in data science, statistics, and machine learning: rigorous statistical analysis, experimental design, causal inference, advanced modeling, research…

    119 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Docker Compose

    magnus919/agent-skills

    Use Docker Compose to define, run, debug, and harden multi-container applications.

    119 GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Fpga Development

    magnus919/agent-skills

    Design, review, simulate, and verify FPGA logic using explicit RTL contracts, clock and reset models, CDC analysis, timing constraints, and reproducible implementation evidence.

    119 GitHub stars~2.7k tokensUpdated today
    Auto-check passed

Questions about Langchain

What does Langchain do?

Build LLM applications with LangChain. An agent skill from magnus919/agent-skills. Langchain is an agent skill from magnus919/agent-skills. Build LLM applications with LangChain.

When should I use Langchain?

Langchain fits situations like: working with LangChain; comparing LLM application frameworks; unrelated requests; route to the nearest named specialist.

How do I install Langchain in Claude Code?

Run `npx skills add magnus919/agent-skills --skill langchain -a claude-code`. Or copy the skill folder (langchain in magnus919/agent-skills) into .claude/skills/langchain in your project. Claude Code loads it when a task matches its description.

How do I install Langchain in Codex?

Run `npx skills add magnus919/agent-skills --skill langchain -a codex`. Or copy the skill folder (langchain in magnus919/agent-skills) into .agents/skills/langchain in your project. Codex loads it when a task matches its description.

Can I use Langchain in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add magnus919/agent-skills --skill langchain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langchain, .gemini/skills/langchain, .github/skills/langchain and .opencode/skills/langchain in your project.

What does Langchain need to run?

Going by SKILL.md and its folder, Langchain needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Langchain access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Langchain safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Langchain use?

Langchain is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langchain use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.1k tokens, read only when the agent opens those files.

What are the alternatives to Langchain?

Skills that share tags, products or a category with Langchain: Mem0 Platform SDK (mem0ai/mem0, 67k stars), LangSmith Trace Debugging (ComposioHQ/awesome-claude-skills, 77k stars), Add Example Agent (GetBindu/Bindu, 10k stars) and Failproof AI SDK Integration (FailproofAI/failproofai, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langchain?

magnus919 (a GitHub user) maintains it in magnus919/agent-skills, which has 115 GitHub stars. The repository holds 131 skills in this directory. The repository was last updated on October 10, 2026.

Source: magnus919/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.