rag-faiss — Claude Code skill: vector search and installation
This skill covers FAISS indexing and nearest-vector search. Use it for RAG workflows that rely on similarity rather than metadata filters.
npx claude-code-templates@latest --skill ai-research/rag-faissWhat rag-faiss does
The skill walks through building a FAISS index, adding vectors, and searching for neighbors to a query. It covers exact Flat search, approximate IVF, HNSW, and PQ for compressed vectors, along with saving and reopening an index. For cosine similarity, its example uses normalized vectors with an inner-product index.
The material also shows CPU and GPU options, plus integrations with LangChain and LlamaIndex. Install either faiss-cpu or faiss-gpu with pip; the examples also use numpy. FAISS searches vector similarity, so metadata filtering needs a separate solution.
What it helps with
- Build an index for dense vectors
- Find vectors closest to a query
- Save an index and load it later
- Choose an index type for search and memory needs
Example prompts for the agent
- Show me how to build a FAISS index and search for the nearest vectors to this query.
- Compare Flat, IVF, and HNSW for my embedding dataset.
- Explain how to save a FAISS index and load it again.
How to install rag-faiss
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/rag-faiss2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill rag-faiss -a claude-code3Manually: put the files in place
~/.claude/skills/rag-faiss/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rag-faiss/
Manually: put the files in place
.agents/skills/rag-faiss/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/rag-faiss/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates rag-faiss2Manually: put the files in place
.github/skills/rag-faiss/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/rag-faissManually: put the files in place
.devin/skills/rag-faiss/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rag-faiss
How do I install rag-faiss in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/rag-faiss.
What does rag-faiss do?
The skill explains how to use FAISS for nearest-vector retrieval, index setup, and persistence. It also covers index options and integrations with LangChain and LlamaIndex.
Which libraries do the rag-faiss examples use?
They use either faiss-cpu or faiss-gpu, along with numpy. The GPU package is the option for GPU-backed FAISS operations.