/vibe:skill-image-text-retrieverfrom vibe
Builds a searchable image embedding index using any CLIP checkpoint from HuggingFace. Supports query-by-text and query-by-image with FAISS (flat, IVF, or HNSW). Useful for zero-shot image search, deduplication, or find-similar tasks.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn a folder of images into a searchable index using CLIP embeddings.
image_folder: directory of image files.clip_model: HuggingFace id like openai/clip-vit-base-patch32 or google/siglip-base-patch16-224.index_type: flat | IVF | HNSW.embedding_dim: inferred from the model.search_by_text(text, k) — embed the text, search.search_by_image(image_path, k) — embed the image, search.import os
import glob
import numpy as np
import torch
from PIL import Image
from transformers import CLIPModel, CLIPProcessor
import faiss
class ImageTextRetriever:
def __init__(self, model_name="openai/clip-vit-base-patch32"):
self.model = CLIPModel.from_pretrained(model_name).eval()
self.processor = CLIPProcessor.from_pretrained(model_name)
self.dim = self.model.config.projection_dim
self.index = None
self.filenames = []
@torch.no_grad()
def _encode_images(self, paths, batch=16):
embs = []
for i in range(0, len(paths), batch):
imgs = [Image.open(p).convert("RGB") for p in paths[i:i + batch]]
inputs = self.processor(images=imgs, return_tensors="pt")
out = self.model.get_image_features(**inputs)
out = out / out.norm(dim=-1, keepdim=True)
embs.append(out.cpu().numpy())
return np.concatenate(embs).astype(np.float32)
@torch.no_grad()
def _encode_text(self, texts):
inputs = self.processor(text=texts, return_tensors="pt", padding=True)
out = self.model.get_text_features(**inputs)
out = out / out.norm(dim=-1, keepdim=True)
return out.cpu().numpy().astype(np.float32)
def build_index(self, folder, index_type="flat"):
exts = ("*.jpg", "*.jpeg", "*.png", "*.webp", "*.bmp")
files = []
for ext in exts:
files.extend(glob.glob(os.path.join(folder, ext)))
self.filenames = sorted(files)
embs = self._encode_images(self.filenames)
if index_type == "IVF":
quantizer = faiss.IndexFlatIP(self.dim)
nlist = min(256, max(4, len(embs) // 32))
self.index = faiss.IndexIVFFlat(quantizer, self.dim, nlist)
self.index.train(embs)
elif index_type == "HNSW":
self.index = faiss.IndexHNSWFlat(self.dim, 32, faiss.METRIC_INNER_PRODUCT)
else:
self.index = faiss.IndexFlatIP(self.dim)
self.index.add(embs)
def search_by_text(self, text, k=5):
q = self._encode_text([text])
dist, idx = self.index.search(q, k)
return [(self.filenames[i], float(d)) for d, i in zip(dist[0], idx[0])]
def search_by_image(self, image_path, k=5):
q = self._encode_images([image_path])
dist, idx = self.index.search(q, k)
return [(self.filenames[i], float(d)) for d, i in zip(dist[0], idx[0])]
[retriever]
model: <name>
num_images: <int>
dim: <int>
index_type: flat | IVF | HNSW
index_size_mb: <float>
IndexFlatIP (exact) is simplest and fastest.IndexIVFFlat is the standard trade-off.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job