Chroma Vector Database
Orchestra-Research/AI-Research-SKILLs
Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.
In-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway.
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install oaustegard/claude-skills semantic-grep --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/semantic-grep .claude/skills/semantic-grep && rm -rf skills-srcUse ~/.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/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .claude/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/oaustegard/claude-skills/tree/main/semantic-grepType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install oaustegard/claude-skills semantic-grep --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/semantic-grep .agents/skills/semantic-grep && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .agents/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install oaustegard/claude-skills semantic-grep --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/semantic-grep .cursor/skills/semantic-grep && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .cursor/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/oaustegard/claude-skills.git --path semantic-grep--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install oaustegard/claude-skills semantic-grep --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/semantic-grep .gemini/skills/semantic-grep && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .gemini/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install oaustegard/claude-skills semantic-grepInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/semantic-grep .github/skills/semantic-grep && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .github/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add oaustegard/claude-skills --skill semantic-grep -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install oaustegard/claude-skills semantic-grep --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/semantic-grep .opencode/skills/semantic-grep && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "semantic-grep" agent skill from https://github.com/oaustegard/claude-skills/tree/main/semantic-grep into .opencode/skills/semantic-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "semantic-grep", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
semantic-grepIn-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway.
Semantic Grep is an agent skill from oaustegard/claude-skills. In-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway. Use when user wants fuzzy/conceptual search where exact-keyword grep would miss — "sessions discussing regulatory constraints", "code about retry logic", "notes mentioning burnout even if the word isn't there". Complements searching-codebases (regex/AST) and extracting-keywords (YAKE). Do NOT use when an exact string/regex match is what's wanted — grep/rg wins on speed and precision there.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `CHANGELOG.md`, `README.md` and `scripts/semantic_grep.py`).
It sits in AI & LLM Engineering, covering Embeddings and Error handling. The repository describes itself as: My collection of Claude skills. The licence is MIT.
Read from SKILL.md and the folder at commit cf49d47. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Python), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
GOOGLE_API_KEYGEMINI_API_KEYCF_API_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Semantic Grep loads about 2.1k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 855 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from oaustegard/claude-skills at commit cf49d47, republished under its MIT licence (© oaustegard). 855 words, ~2,140 tokens.
.claude/skills/semantic-grep/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.jina-grep-style semantic search, done in-process via Python rather than as an external CLI. Embeds query + corpus chunks with gemini-embedding-2, ranks by cosine similarity, returns grep-format output.
The core trade-off (lifted from jina-grep-cli's own docs and validated in testing):
| Task | Tool |
|---|---|
| Known exact string, filename, or regex | grep / rg / searching-codebases |
| "What files discuss concept X" when X may not appear verbatim | semantic-grep |
| Hybrid: prefilter with grep, rerank by concept | grep → rerank_candidates() |
Regression test result (workshop session corpus, 135 docs):
Rule: when the user query reads like a named entity or keyword, try grep first. Only reach for semantic-grep when paraphrase/concept matching is actually needed.
Credentials via proxy.env (Cloudflare AI Gateway w/ BYOK — same pattern as invoking-gemini):
CF_ACCOUNT_ID=...
CF_GATEWAY_ID=...
CF_API_TOKEN=...Direct-API fallback: GOOGLE_API_KEY or GEMINI_API_KEY env var. No dependencies beyond requests + numpy.
import sys
sys.path.insert(0, '/mnt/skills/user/semantic-grep/scripts')
from semantic_grep import semantic_grep, format_grep
# Directory of .txt files
results = semantic_grep("error handling under load", "/path/to/notes",
top_k=5, granularity="paragraph")
print(format_grep(results))
# notes/incidents.txt:42: When the queue depth exceeds... [0.71]
# notes/postmortem.txt:8: Under sustained traffic we saw... [0.68]semantic_grep(query, corpus, *, top_k=10, threshold=None, ...)Main search function.
query (str) — the search query (embedded with RETRIEVAL_QUERY task type)corpus (str | Path | list[Chunk]) — a file, directory, or pre-chunked listtop_k (int | None) — max results; None = all above thresholdthreshold (float | None) — cosine similarity cutoff; None = no filter (top_k only)granularity ("paragraph" | "line") — how to chunk files (default paragraph)include (str) — filename-glob filter when corpus is a directory (default "*.txt"). Matches against Path.name only, not the full path — "*.md" works, "docs/*.md" does not.model (str) — default "gemini-embedding-2". gemini-embedding-001 is retired (text-only) and warns if passed explicitly.dim (int) — 128 / 768 / 1536 / 3072 (default 768; MRL-truncated + renormalized)task ("text" | "code") — selects text vs code task typesReturns list[Match] where Match has path, line, text, score.
load_corpus(path, *, include="*.txt", granularity="paragraph") -> list[Chunk]Load and chunk a file or directory without embedding. Useful for inspecting what gets embedded before paying for the API call.
embed_batch(texts, task_type, *, model, dim, group_size=100) -> np.ndarrayLower-level: embed a list of strings directly via :batchEmbedContents. Returns (N, dim) float32 array, rows normalized when dim < 3072.
format_grep(matches, *, max_text_chars=200, show_score=True) -> strFormat matches as grep output: path:line: snippet [score].
The highest-leverage use isn't naive full-corpus semantic search — it's hybrid retrieval: fast coarse filter → semantic rerank.
import subprocess
from semantic_grep import Chunk, semantic_grep, format_grep
# Stage 1: fast exact/regex prefilter with rg
result = subprocess.run(
["rg", "-n", "--no-heading", "error|fail|timeout", "logs/"],
capture_output=True, text=True,
)
# Parse `path:line:text` into Chunks
chunks = []
for raw in result.stdout.splitlines():
path, line, text = raw.split(":", 2)
chunks.append(Chunk(path=path, line=int(line), text=text))
# Stage 2: semantic rerank on the prefiltered subset
ranked = semantic_grep("intermittent queue saturation during peak traffic",
chunks, top_k=10)
print(format_grep(ranked))This is how you scale past the "embed the whole corpus every call" limit without needing a vector DB. The exact-match stage cheaply cuts millions of lines to thousands; semantic reranks those.
RETRIEVAL_QUERY, docs → RETRIEVAL_DOCUMENT. Asymmetric — documented to outperform symmetric encoding for retrieval.CODE_RETRIEVAL_QUERY, docs → RETRIEVAL_DOCUMENT. Use when searching code with natural-language queries.Use SEMANTIC_SIMILARITY (symmetric) only if you're doing pairwise sim, not retrieval. This module doesn't expose that path yet.
gemini-embedding-2 (GA since 2026-04-22) — general-purpose and multimodal.
Verified 2026-07-21 via the CF gateway: text, image and audio all embed to the
same space at the requested dim, L2-normalized. The retired gemini-embedding-001
was text-only and rejected non-text input with HTTP 400:
gemini-embedding-2-preview (March 2026) is multimodal and currently top of MTEB. Set model="gemini-embedding-2-preview" to opt in once the preview stabilizes.
semantic_grep pre-allocates (N, dim) float32; 1M chunks at dim=768 ≈ 3GB. Caller is responsible for sane chunk counts. load_corpus also follows symlinks via rglob — fine in a trusted single-user container, not for untrusted paths.group_size=100 per HTTP call; groups run serially. For >1K chunks, add asyncio — not needed yet.invoking-gemini. Should be factored up when invoking-gemini adds embedding support. Tracked as followup.invoking-gemini — sibling; handles Gemini text + image generation through the same CF gateway. Shares credential pattern.searching-codebases — regex/AST search. Use first when the query is a known pattern.extracting-keywords — YAKE keyword extraction; orthogonal, but pairs well for building query terms from a long prompt.exploring-codebases — for understanding repo structure. Semantic-grep doesn't replace AST-based navigation.Conceptually inspired by jina-grep-cli — we kept the retrieval shape (grep-compatible output, asymmetric query/doc embeddings, threshold + top-k) but swapped the MLX/Apple-Silicon backend for a portable Gemini API call. The original's pipe-mode rerank pattern is the most generalizable idea it contributes and is preserved here.
© oaustegard, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts) in semantic-grep of oaustegard/claude-skills.
Open the folder on GitHubat commit cf49d47
Semantic Grep 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Semantic Grep this skilloaustegard/claude-skills | 150 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs | 13k | 7 repos | ~2.3k | Automated safety check: Pass | MIT | |
| SageMaker Serving Image Selectionhuggingface/skills | 11k | 1 repos | ~4.6k | Automated safety check: Pass | Apache-2.0 | |
| Codebase Managementgiancarloerra/SocratiCode | 3.3k | 1 repos | ~1.8k | Automated safety check: Pass | AGPL-3.0 | |
| CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs | 13k | 7 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Sentence-Transformers Training Routerhuggingface/skills | 11k | 1 repos | ~2.6k | Automated safety check: Pass | Apache-2.0 |
Orchestra-Research/AI-Research-SKILLs
Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.
huggingface/skills
Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.
giancarloerra/SocratiCode
Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.
Orchestra-Research/AI-Research-SKILLs
Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.
huggingface/skills
Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.
rehan-remade/universal-modder
Build cross-game mashups and total conversions, the "Minecraft inside Elden Ring" or "skateboarding in MW2" kind.
oaustegard/claude-skills
Builds interactive Vega-Lite charts from uploaded data: analyzes the fields, picks five to ten fitting chart types, and produces a React artifact with the data embedded inline.
oaustegard/claude-skills
Builds self-contained single-file HTML pages such as reports, decks, postmortems, flowcharts and prototypes from a small spec using a bundled Python composer and templates.
oaustegard/claude-skills
Rewrites model-sounding prose into plain technical writing and checks that every claim survives, for PR text, docs, commit messages and similar drafts.
oaustegard/claude-skills
Guides building standards-based Preact apps with native-first choices, HTM syntax, import maps and vendored ESM, from single-file demos to larger builds.
oaustegard/claude-skills
Deprecated sampler that captures short windows of the Bluesky firehose, clusters trending terms and builds an HTML report; replaced by the browsing-bluesky skill.
oaustegard/claude-skills
Has a fresh-context adversary attack a blog post, recommendation, analysis brief or piece of code before you ship it, using a profile suited to that kind of artifact.
Categories
In-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway. Semantic Grep is an agent skill from oaustegard/claude-skills. In-process semantic search over text files or in-memory strings, using Gemini embeddings via the CF AI Gateway.
Semantic Grep fits situations like: user wants fuzzy/conceptual search where exact-keyword grep would miss — sessions discussing regulatory constraints; code about retry logic; notes mentioning burnout even if the word isnt there; an exact string/regex match is whats wanted — grep/rg wins on speed and precision there.
Run `npx skills add oaustegard/claude-skills --skill semantic-grep -a claude-code`. Or copy the skill folder (semantic-grep in oaustegard/claude-skills) into .claude/skills/semantic-grep in your project. Claude Code loads it when a task matches its description.
Run `npx skills add oaustegard/claude-skills --skill semantic-grep -a codex`. Or copy the skill folder (semantic-grep in oaustegard/claude-skills) into .agents/skills/semantic-grep in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oaustegard/claude-skills --skill semantic-grep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/semantic-grep, .gemini/skills/semantic-grep, .github/skills/semantic-grep and .opencode/skills/semantic-grep in your project.
Going by SKILL.md and its folder, Semantic Grep needs Python for the scripts in its folder and credentials named GOOGLE_API_KEY, GEMINI_API_KEY and CF_API_TOKEN. Our summary lists: Python 3; A credential in CF_API_TOKEN; A credential in GOOGLE_API_KEY.
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Semantic Grep is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Semantic Grep: Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), SageMaker Serving Image Selection (huggingface/skills, 11k stars), Codebase Management (giancarloerra/SocratiCode, 3.3k stars) and CLIP Image-Text Matching (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.
oaustegard (a GitHub user) maintains it in oaustegard/claude-skills, which has 150 GitHub stars. The repository holds 66 skills in this directory. The repository was last updated on October 8, 2026.
Source: oaustegard/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.