Agent skill

Faiss

by AlexAI-MCP in AlexAI-MCP/hermes-CCC

Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server.

MITAuto-check passedDatabases

Install Faiss

skills CLI
$ npx skills add AlexAI-MCP/hermes-CCC --skill faiss -a claude-code

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

GitHub CLI
$ gh skill install AlexAI-MCP/hermes-CCC faiss --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/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/faiss .claude/skills/faiss && 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
faiss
GitHub stars
135
Token cost
~1.1k tokens
SKILL.md length
128 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server.

  • Tasks that involve Vector databases
  • SKILL.md covers When to Use FAISS, Setup, Basic Flat Index (Exact Search) and Cosine Similarity (Normalize…, plus 6 more sections
  • Calls pip

What it does

Faiss is an agent skill from AlexAI-MCP/hermes-CCC. Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Vector databases. The repository describes itself as: Hermes Agent ported to Claude Code Channel — 46 native skills, no OAuth, no external process. The licence is MIT.

When your agent uses it

  • Tasks that involve Vector databases

Example prompts

  • “/faiss”

Requirements

  • Python 3
  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 8107e89. 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

    Shell commands in SKILL.md call:

    • pip

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

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    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

Faiss loads about 1.1k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 128 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from AlexAI-MCP/hermes-CCC at commit 8107e89, republished under its MIT licence (© AlexAI-MCP). 128 words, ~1,052 tokens.

Download SKILL.mdSave it as .claude/skills/faiss/SKILL.md (or your agent's skills folder).
name
faiss
description
Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server.
version
1.0.0
author
hermes-CCC (ported from Hermes Agent by NousResearch)
license
MIT

FAISS (Facebook AI Similarity Search) is a library for efficient similarity search over large collections of vectors. No server required — runs entirely in-process.

When to Use FAISS

  • Millions of vectors, need maximum speed
  • Can't run a server (embedded use case)
  • Research / prototyping at scale
  • Custom index types (HNSW, IVF, PQ)

Setup

bash
pip install faiss-cpu        # CPU only
pip install faiss-gpu        # GPU (requires CUDA)
pip install sentence-transformers numpy

python
import faiss
import numpy as np
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("all-MiniLM-L6-v2")  # dim=384
DIM = 384

# Build index
documents = [
    "Python async programming",
    "Machine learning with PyTorch",
    "Docker container management",
    "GraphQL API design",
]

embeddings = model.encode(documents).astype(np.float32)

# Flat L2 index (exact, brute force)
index = faiss.IndexFlatL2(DIM)
index.add(embeddings)
print(f"Index size: {index.ntotal}")

# Search
query = "how to do async in Python?"
q_vec = model.encode([query]).astype(np.float32)

distances, indices = index.search(q_vec, k=3)
for i, idx in enumerate(indices[0]):
    print(f"[{distances[0][i]:.3f}] {documents[idx]}")

Cosine Similarity (Normalize first)

python
# For cosine similarity: normalize vectors, use IndexFlatIP (inner product)
def normalize(vecs):
    norms = np.linalg.norm(vecs, axis=1, keepdims=True)
    return vecs / np.maximum(norms, 1e-8)

embeddings_norm = normalize(embeddings.astype(np.float32))
index_cos = faiss.IndexFlatIP(DIM)
index_cos.add(embeddings_norm)

q_norm = normalize(model.encode([query]).astype(np.float32))
scores, indices = index_cos.search(q_norm, k=3)

python
# For large datasets (>100k vectors)
N_CLUSTERS = 100  # sqrt(N) is a good heuristic

quantizer = faiss.IndexFlatL2(DIM)
index_ivf = faiss.IndexIVFFlat(quantizer, DIM, N_CLUSTERS)

# Must train before adding
index_ivf.train(embeddings)
index_ivf.add(embeddings)
index_ivf.nprobe = 10  # search 10 clusters (higher = more accurate, slower)

distances, indices = index_ivf.search(q_vec, k=5)

HNSW Index (Best Speed/Accuracy Tradeoff)

python
index_hnsw = faiss.IndexHNSWFlat(DIM, 32)  # 32 = M parameter
index_hnsw.add(embeddings)

distances, indices = index_hnsw.search(q_vec, k=5)

Save and Load Index

python
# Save
faiss.write_index(index, "my_index.faiss")

# Load
index = faiss.read_index("my_index.faiss")

With Metadata (store separately)

python
import pickle

# FAISS only stores vectors — store metadata separately
metadata = [{"id": i, "text": doc} for i, doc in enumerate(documents)]

# Save both
faiss.write_index(index, "vectors.faiss")
with open("metadata.pkl", "wb") as f:
    pickle.dump(metadata, f)

# Load and query
index = faiss.read_index("vectors.faiss")
with open("metadata.pkl", "rb") as f:
    metadata = pickle.load(f)

distances, indices = index.search(q_vec, k=3)
for idx in indices[0]:
    print(metadata[idx]["text"])

GPU Acceleration

python
res = faiss.StandardGpuResources()
index_gpu = faiss.index_cpu_to_gpu(res, 0, index)  # GPU 0
distances, indices = index_gpu.search(q_vec, k=5)

Index Selection Guide

IndexSizeSpeedAccuracyUse Case
IndexFlatL2AnySlow100%<100k vectors, exact needed
IndexFlatIPAnySlow100%Cosine similarity
IndexIVFFlatLargeFast~95%100k–10M vectors
IndexHNSWFlatMediumVery fast~99%Best general choice
IndexIVFPQHugeFastest~90%Billions, memory-constrained

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

Files

Just SKILL.md in skills/faiss of AlexAI-MCP/hermes-CCC.

Open the folder on GitHubat commit 8107e89

Compare with similar skills

Faiss 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.

Faiss compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Faiss this skillAlexAI-MCP/hermes-CCC135—~1.1kAutomated safety check: PassMIT
Codebase Explorationgiancarloerra/SocratiCode3.3k1 repos~1.5kAutomated safety check: PassAGPL-3.0
FAISS Similarity SearchOrchestra-Research/AI-Research-SKILLs13k6 repos~1.3kAutomated safety check: PassMIT
Weaviateweaviate/agent-skills104—~1.8kAutomated safety check: PassBSD-3-Clause
Pinecone Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k5 repos~2kAutomated safety check: PassMIT
Qdrant Vector SearchOrchestra-Research/AI-Research-SKILLs13k4 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Codebase Exploration

    giancarloerra/SocratiCode

    Explore and understand codebases using SocratiCode semantic search, dependency graphs, and context artifacts.

    3.3k GitHub starsUsed in 1 repo~1.5k tokens
    DatabasesAuto-check passed
  • FAISS Similarity Search

    Orchestra-Research/AI-Research-SKILLs

    Sets up FAISS for fast nearest-neighbor search over large collections of dense vectors, choosing between Flat, IVF, HNSW and product quantization indexes.

    13k GitHub starsUsed in 6 repos~1.3k tokens
    DatabasesAuto-check passed
  • Weaviate

    weaviate/agent-skills

    Official

    Search, query, and manage Weaviate vector database collections.

    104 GitHub stars~1.8k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Pinecone Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to use Pinecone, a managed vector database, for production RAG, semantic search and recommendations: indexes, upserts, queries, filters and namespaces.

    13k GitHub starsUsed in 5 repos~2k tokens
    DatabasesAuto-check passed
  • Qdrant Vector Search

    Orchestra-Research/AI-Research-SKILLs

    Explains how to run Qdrant, a Rust vector database, for RAG and semantic search, covering collections, points, distance metrics and filtered or batched queries.

    13k GitHub starsUsed in 4 repos~3.4k tokens
    DatabasesAuto-check passed
  • Hyperspacedb Core

    YARlabs/hyperspace-db

    Core operations for HyperspaceDB — a multi-geometry vector database.

    162 GitHub stars~1.5k tokensUpdated today
    DatabasesAuto-check passed

More from AlexAI-MCP/hermes-CCC

All 44 skills in this repo
  • GitHub Code Review

    AlexAI-MCP/hermes-CCC

    Review GitHub pull requests with a findings-first engineering mindset.

    135 GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • GitHub PR Workflow

    AlexAI-MCP/hermes-CCC

    Run a disciplined GitHub pull request workflow from branch creation through merge.

    135 GitHub stars~1.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Memory

    AlexAI-MCP/hermes-CCC

    Manage durable project memory for Claude Code. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Route

    AlexAI-MCP/hermes-CCC

    Route Claude Code work by complexity, risk, and tool needs. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Skill

    AlexAI-MCP/hermes-CCC

    Create, improve, inventory, and audit Claude Code skills. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Traj

    AlexAI-MCP/hermes-CCC

    Capture Claude Code interaction trajectories in training-friendly formats.

    135 GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Questions about Faiss

What does Faiss do?

Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server. Faiss is an agent skill from AlexAI-MCP/hermes-CCC. Facebook AI Similarity Search — ultra-fast vector similarity search for large-scale local embedding retrieval without a database server.

When should I use Faiss?

Faiss fits situations like: tasks that involve Vector databases.

How do I install Faiss in Claude Code?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill faiss -a claude-code`. Or copy the skill folder (skills/faiss in AlexAI-MCP/hermes-CCC) into .claude/skills/faiss in your project. Claude Code loads it when a task matches its description.

How do I install Faiss in Codex?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill faiss -a codex`. Or copy the skill folder (skills/faiss in AlexAI-MCP/hermes-CCC) into .agents/skills/faiss in your project. Codex loads it when a task matches its description.

Can I use Faiss 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 AlexAI-MCP/hermes-CCC --skill faiss -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/faiss, .gemini/skills/faiss, .github/skills/faiss and .opencode/skills/faiss in your project.

What does Faiss need to run?

Going by SKILL.md and its folder, Faiss needs the command-line tools its instructions call (pip). Our summary lists: Python 3; Docker.

Does Faiss access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Faiss 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. Review the folder before installing.

What licence does Faiss use?

Faiss 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 Faiss use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Faiss?

Skills that share tags, products or a category with Faiss: Codebase Exploration (giancarloerra/SocratiCode, 3.3k stars), FAISS Similarity Search (Orchestra-Research/AI-Research-SKILLs, 13k stars), Weaviate (weaviate/agent-skills, 104 stars) and Pinecone Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Faiss?

AlexAI-MCP (a GitHub user) maintains it in AlexAI-MCP/hermes-CCC, which has 135 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on April 8, 2026.

Source: AlexAI-MCP/hermes-CCC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.