gemini-embed

gemini-embed is a skill for Claude Code, Codex from legacybridge-tech/claude-plugins. It costs 44 tokens per session (1,677 once invoked), scanned A, original, MIT.

A tool that turns text into numerical vectors using Google's Gemini embedding API. These vectors represent meaning so text can be compared or grouped by similarity.

In plain words
What is it for?
Use it to create single or batch embeddings for document search, query matching, similarity checks, classification, and clustering.
Why use it?
It provides the text representation needed for meaning-based search and analysis, rather than relying only on exact words.

Skill for Claude CodeCodex

Part of the gemini-api plugin — 2 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/legacybridge-tech/claude-plugins/gemini-embed
Any agent
npx skills add legacybridge-tech/claude-plugins --skill gemini-embed
Clone the repo
git clone --depth 1 https://github.com/legacybridge-tech/claude-plugins

Made for: Claude Code, Codex.

Or install gemini-api, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-embed

README.md
[![agentmods](https://agentmods.dev/badge/skills/legacybridge-tech/claude-plugins/gemini-embed.svg)](https://agentmods.dev/skills/legacybridge-tech/claude-plugins/gemini-embed)
Your own site
<a href="https://agentmods.dev/skills/legacybridge-tech/claude-plugins/gemini-embed"><img src="https://agentmods.dev/badge/skills/legacybridge-tech/claude-plugins/gemini-embed.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,677 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01677
Opus 5 $0.00022 $0.00839
Sonnet 5 $0.00009 $0.00335
Haiku 4.5 $0.00004 $0.00168

Measured 3d ago against content hash 2b47db47d89f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini-embed scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent?key=$GOOGLE_API_KEY" \
gemini-api/skills/gemini-embed/SKILL.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gemini Embeddings API

Generate text embeddings using Google Gemini API via REST.

Prerequisites

  • Environment variable GOOGLE_API_KEY must be set
  • API endpoint: https://generativelanguage.googleapis.com/v1beta
  • Model: gemini-embedding-001

Workflow

Phase 1: Determine Embedding Type

  • Single Embedding: For one text input
  • Batch Embedding: For multiple texts (more efficient)

Phase 2: Configure Task Type (Optional)

Choose based on use case:

  • RETRIEVAL_QUERY: For search queries
  • RETRIEVAL_DOCUMENT: For documents to be searched
  • SEMANTIC_SIMILARITY: For comparing text similarity
  • CLASSIFICATION: For text classification
  • CLUSTERING: For grouping similar texts

Phase 3: Execute API Call


1. Single Text Embedding

Basic Embedding

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent?key=$GOOGLE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
      "model": "models/gemini-embedding-001",
      "content": {
        "parts": [{"text": "Hello world"}]
      }
    }'

With Task Type

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent?key=$GOOGLE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
      "model": "models/gemini-embedding-001",
      "content": {
        "parts": [{"text": "What is machine learning?"}]
      },
      "task_type": "RETRIEVAL_QUERY"
    }'

With Output Dimensionality Control

Truncate embeddings to a smaller size for efficiency:

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent?key=$GOOGLE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
      "model": "models/gemini-embedding-001",
      "content": {
        "parts": [{"text": "Hello world"}]
      },
      "output_dimensionality": 256
    }'

2. Batch Embedding

Process multiple texts in a single API call:

Read the full file on GitHub · 241 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 241 lines · 44 tokens per session scan A 2b47db47d89f

Subscribe to this mod's changes

gemini-embed is a skill published in the GitHub repository legacybridge-tech/claude-plugins (6 stars, last pushed 3mo ago), licensed MIT. It adds 44 tokens to every session and 1,677 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

mem0-tour

Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

mem0ai/mem0 · 47 tokens

peek

Searches memories and displays compact one-liner results, or looks up a specific memory by ID. Use for quick memory lookups, checking if a decision was recorded, resolving [mem0:id] citations, or browsing memories without full category detail.

mem0ai/mem0 · 52 tokens

pause

Pause Mem0 memory capture on this machine. Use when the user wants to stop memories being recorded, for example for private work or experiments.

mem0ai/mem0 · 30 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens