PlugWiki

langchain-rag skill for Claude: build retrieval-augmented generation

Guides your agent to build a RAG pipeline with LangChain: load documents, split, embed, store and retrieve. For developers adding search over their own data.

Installs
17.9K
on skills.sh
Stars
1.3K
on GitHub
Updated
Oct 2026
last repo commit

langchain-rag makes your agent write a retrieval-augmented generation pipeline with LangChain. It follows the steps load, split, embed, store, retrieve and generate, with Python and TypeScript examples. It names four vector stores (InMemory, FAISS, Chroma, Pinecone) and lists common mistakes with fixes.

It loads when you ask for a RAG system. The examples use OpenAI embeddings and an OpenAI chat model, so the code it writes needs an OpenAI API key. Its text loaders can fetch web pages, and it warns never to load a FAISS index you did not create yourself.

Good for

  • Developers building question answering over their own documents
  • Teams choosing between Chroma, FAISS and Pinecone
  • Python and TypeScript LangChain users

Install langchain-rag

Claude Code

  1. 1

    Copy this prompt.

    Install the langchain-rag skill in Claude Code. Run this command:
    
    npx skills add https://github.com/langchain-ai/langchain-skills --skill langchain-rag
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).

Sections in SKILL.md

  1. Complete RAG Pipeline
  2. Document Loaders
  3. Text Splitting
  4. Vector Stores
  5. Retrieval
  6. What You CAN Configure
  7. What You CANNOT Configure

Key facts

License
MIT
Installs on skills.sh
17,936 (Nov 2, 2026)
Last commit
Oct 29, 2026

What it includes

  • Index, retrieve, generate

    Explains the three stages and the four parts: loaders, splitters, embeddings and vector stores.

    Pipeline overview

  • InMemory, FAISS, Chroma or Pinecone

    A table matching each store to use: testing, local speed, development or managed production.

    Vector store choice

  • Load, split, embed, store, retrieve, answer

    A full Python and TypeScript example using an in-memory store, OpenAI embeddings and a chat model.

    Network · End-to-end example

  • PDF, web page and folder of text files

    Loads a PDF page by page, fetches a web page with WebBaseLoader (Cheerio in TypeScript) and reads text files from a directory.

    Files · Document loaders

  • RecursiveCharacterTextSplitter with size and overlap

    Shows chunk size 1000 with overlap 200, and says 500 to 1500 characters is typically good.

    Text splitting

  • Chroma on disk, FAISS saved locally

    Creates a Chroma store in ./chroma_db or saves a FAISS index to ./faiss_index and reloads it.

    Write · Persistent stores

  • Similarity search, MMR and metadata filters

    Search with scores, balance relevance and variety with MMR, and filter results by document metadata.

    Retrieval options

  • Wrap the retriever in a search tool

    Creates an agent with create_agent that calls a search_docs tool backed by the retriever.

    Network · RAG as an agent tool

  • Chunk size, overlap, persistence, matching embeddings

    Wrong and correct code pairs, including using the same embedding model for indexing and querying and matching vector dimensions.

    Common fixes

  • Load only indexes you built yourself

    Python FAISS indexes use pickle-backed metadata, so the skill says never to load downloaded or shared indexes with dangerous deserialization on.

    Read · FAISS loading warning

From the official docs

Permissions

Low risk

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Loading a shared FAISS index can run code

    The skill says Python FAISS indexes use pickle, which can execute code when loaded. Only load indexes you built and kept under your control. github.com

  • Your document text goes to the embeddings provider

    The examples send chunks of your documents to OpenAI to create embeddings. Check that you are allowed to share the data before indexing it. github.com

Technical details
Talks toOpenAI embeddings and chat API in the examples. Any web page you load with WebBaseLoader
Sign-in and keysThe skill stores nothing. The README has you export keys in your shell.
Scopes
  • OPENAI_API_KEY or ANTHROPIC_API_KEY in your environment (for the code it writes)

Questions

What does the langchain-rag skill do?

It gives your agent LangChain patterns for building a RAG system: loading documents, splitting them, creating embeddings, storing them in a vector store and retrieving relevant chunks to answer questions.

How do I install it in Claude Code, the Claude app or Codex?

Use the install box above, which installs only this skill. The README documents the skills CLI for Claude Code and Codex, a Claude Code plugin, and an install.sh script; the plugin and the script add all 21 skills in the repo, and install.sh with --force deletes and replaces same-named skill folders. The README does not document a Claude app upload.

Does it need an API key?

The skill itself has none. The code it writes uses OpenAI embeddings and an OpenAI chat model, and the README says to export OPENAI_API_KEY or ANTHROPIC_API_KEY for the models you use.

Is it safe to install?

It bundles no scripts. The code it helps you write sends your document text to an embeddings provider and can fetch web pages. It also warns that loading a downloaded FAISS index can run arbitrary code, so only load indexes you created.

Does it work in TypeScript?

Yes. Most examples come in Python and TypeScript, though some, such as the directory loader and metadata filtering, are Python only.

Which vector store should I pick?

The skill suggests InMemory for testing, FAISS for local speed, Chroma for development and Pinecone for managed production. It also says to use a persistent store instead of in-memory so data survives a restart.

How is it different from langchain-fundamentals?

langchain-rag covers retrieval over your own documents. langchain-fundamentals covers building agents with create_agent, tools and middleware. Both come from the same repo.

Information

updated Nov 2, 2026

Folder
config/skills/langchain-rag

langchain-ai/langchain-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 2
  1. langchain-rag SKILL.md · github.com
  2. langchain-skills README · github.com

Updated Nov 2, 2026.