← Back to Skills Marketplace
1402
Downloads
2
Stars
16
Active Installs
1
Versions
Install in OpenClaw
/install langchain
Description
Avoid common LangChain mistakes — LCEL gotchas, memory persistence, RAG chunking, and output parser traps.
README (SKILL.md)
LCEL Basics
|pipes output to next —prompt | llm | parserRunnablePassthrough()forwards input unchanged — use in parallel branchesRunnableParallelruns branches concurrently —{"a": chain1, "b": chain2}.invoke()for single,.batch()for multiple,.stream()for tokens- Input must match expected keys —
{"question": x}not justxif prompt expects{question}
Memory Gotchas
- Memory doesn't auto-persist between sessions — save/load explicitly
ConversationBufferMemorygrows unbounded — useConversationSummaryMemoryfor long chats- Memory key must match prompt variable —
memory_key="chat_history"needs{chat_history}in prompt return_messages=Truefor chat models —Falsereturns string for completion models
RAG Chunking
- Chunk size affects retrieval quality — too small loses context, too large dilutes relevance
- Chunk overlap prevents cutting mid-sentence — 10-20% overlap typical
RecursiveCharacterTextSplitterpreserves structure — splits on paragraphs, then sentences- Embedding dimension must match vector store — mixing models causes silent failures
Output Parsers
PydanticOutputParserneeds format instructions in prompt — call.get_format_instructions()- Parser failures aren't always loud — malformed JSON may partially parse
OutputFixingParserretries with LLM — wraps another parser, fixes errorswith_structured_output()on chat models — cleaner than manual parsing for supported models
Retrieval
similarity_searchreturns documents —.page_contentfor textkparameter controls results count — more isn't always better, noise increases- Metadata filtering before similarity —
filter={"source": "docs"}in most vector stores max_marginal_relevance_searchfor diversity — avoids redundant similar chunks
Agents
- Agents decide tool order dynamically — chains are fixed sequence
- Tool descriptions matter — agent uses them to decide when to call
handle_parsing_errors=True— prevents crash on malformed agent output- Max iterations prevents infinite loops —
max_iterations=10default may be too low
Common Mistakes
- Prompt template variables case-sensitive —
{Question}≠{question} - Chat models need message format —
ChatPromptTemplate, notPromptTemplate - Callbacks not propagating — pass
config={"callbacks": [...]}through chain - Rate limits crash silently sometimes — wrap in retry logic
- Token count exceeds context — use
trim_messagesor summarization for long histories
Usage Guidance
This skill is a read-only guide for LangChain best practices and appears coherent and low-risk: it asks for nothing sensitive and contains only advisory text. Before installing, confirm you trust the skill source (source/homepage are unknown). Because it's instruction-only, there is no code to execute now, but if the skill is later updated to include install steps or code files, re-check those for downloads, required credentials, or instructions that run arbitrary commands. If you plan to have an agent execute LangChain code using these tips, ensure the agent's execution environment (python3, installed packages) and access to data/credentials are controlled and limited to what you expect.
Capability Analysis
Type: OpenClaw Skill
Name: langchain
Version: 1.0.0
The skill bundle contains only metadata and a markdown file providing educational content about LangChain best practices and common mistakes. There is no executable code, no instructions for the OpenClaw agent to perform any actions, no attempts at prompt injection, data exfiltration, or any other malicious or suspicious behavior. The `SKILL.md` content is purely informational.
Capability Assessment
Purpose & Capability
Name/description (LangChain gotchas and best practices) matches the content of SKILL.md. The only declared runtime requirement is python3, which is reasonable for LangChain-related advice; no unexpected credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md contains high-level usage guidance and warnings only — it does not instruct the agent to read files, call external endpoints, or access credentials. Note: instructions are advisory; they could be used to guide actions if an agent is later asked to execute code, but the skill itself does not command execution or data collection.
Install Mechanism
No install spec and no code files are present, so nothing is written to disk or downloaded. This is the lowest-risk install profile (instruction-only).
Credentials
The skill declares no required environment variables, credentials, or config paths. There is no disproportionate request for secrets or unrelated service tokens.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request permanent presence or elevated platform privileges. Autonomous model invocation remains enabled by platform default but is not a special property of this skill.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install langchain - After installation, invoke the skill by name or use
/langchain - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Frequently Asked Questions
What is LangChain?
Avoid common LangChain mistakes — LCEL gotchas, memory persistence, RAG chunking, and output parser traps. It is an AI Agent Skill for Claude Code / OpenClaw, with 1402 downloads so far.
How do I install LangChain?
Run "/install langchain" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is LangChain free?
Yes, LangChain is completely free (open-source). You can download, install and use it at no cost.
Which platforms does LangChain support?
LangChain is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).
Who created LangChain?
It is built and maintained by Iván (@ivangdavila); the current version is v1.0.0.
More Skills