$22
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiongoogle-gemini-embeddingsExecute the skills CLI command in your project's root directory to begin installation:
Fetches google-gemini-embeddings from jezweb/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate google-gemini-embeddings. Access via /google-gemini-embeddings in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
337
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
337
stars
Complete production-ready guide for Google Gemini embeddings API
This skill provides comprehensive coverage of the gemini-embedding-001 model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering.
Install the Google Generative AI SDK:
npm install @google/genai@^1.37.0
For TypeScript projects:
npm install -D typescript@^5.0.0
Set your Gemini API key as an environment variable:
export GEMINI_API_KEY="your-api-key-here"
Get your API key from: https://aistudio.google.com/apikey
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const response = await ai.models.embedContent({
model: 'gemini-embedding-001',
content: 'What is the meaning of life?',
config: {
taskType: 'RETRIEVAL_QUERY',
outputDimensionality: 768
}
});
console.log(response.embedding.values); // [0.012, -0.034, ...]
console.log(response.embedding.values.length); // 768
Result: A 768-dimension embedding vector representing the semantic meaning of the text.
Current Model: gemini-embedding-001 (stable, production-ready)
gemini-embedding-exp-03-07 (deprecated October 2025, do not use)The model supports flexible output dimensionality using Matryoshka Representation Learning:
| Dimension | Use Case | Storage | Performance |
|---|---|---|---|
| 768 | Recommended for most use cases | Low | Fast |
| 1536 | Balance between accuracy and efficiency | Medium | Medium |
| 3072 | Maximum accuracy (default) | High | Slower |
| 128-3071 | Custom (any value in range) | Variable | Variable |
Default: 3072 dimensions Recommended: 768, 1536, or 3072 for optimal performance
| Tier | RPM | TPM | RPD | Requirements |
|---|---|---|---|---|
| Free | 100 | 30,000 | 1,000 | No billing account |
| Tier 1 | 3,000 | 1,000,000 | - | Billing account linked |
| Tier 2 | 5,000 | 5,000,000 | - | $250+ spending, 30-day wait |
| Tier 3 | 10,000 | 10,000,000 | - | $1,000+ spending, 30-day wait |
RPM = Requests Per Minute TPM = Tokens Per Minute RPD = Requests Per Day
{
embedding: {
values: number[] // Array of floating-point numbers
}
}
Single text embedding:
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const response = await ai.models.embedContent({
model: 'gemini-embedding-001',
content: 'The quick brown fox jumps over the lazy dog',
config: {
taskType: 'SEMANTIC_SIMILARITY',
outputDimensionality: 768
}
});
console.log(response.embedding.values);
// [0.00388, -0.00762, 0.01543, ...]
For Workers/edge environments without SDK support:
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const apiKey = env.GEMINI_API_KEY;
const text = "What is the meaning of life?";
const response = await fetch(
'https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent',
{
method: 'POST',
headers: {
'x-goog-api-key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: {
parts: [{ text }]
},
taskType: 'RETRIEVAL_QUERY',
outputDimensionality: 768
})
}
);
const data = await response.json();
// Response format:
// {
// embedding: {
// values: [0.012, -0.034, ...]
// }
// }
return new Response(JSON.stringify(data), {
headers: { 'Content-Type': 'application/json' }
});
}
};
interface EmbeddingResponse {
embedding: {
values: number[];
};
}
const response: EmbeddingResponse = await ai.models.embedContent({
model: 'gemini-embedding-001',
content: 'Sample text',
config: { taskType: 'SEMANTIC_SIMILARITY' }
});
const embedding: number[] = response.embedding.values;
const dimensions: number = embedding.length; // 3072 by default
⚠️ CRITICAL: When using dimensions other than 3072, you MUST normalize embeddings before computing similarity. Only 3072-dimensional embeddings are pre-normalized by the API.
Why This Matters: Non-normalized embeddings have varying magnitudes that distort cosine similarity calculations, leading to incorrect search results.
Normalization Helper Function:
/**
* Normalize embedding vector for accurate similarity calculations.
* REQUIRED for dimensions other than 3072.
*
* @param vector - Embedding values from API response
* @returns Normalized vector (unit length)
*/
function normalize(vector: number[]): number[] {
const magnitude = Math.sqrt(
vector.reduce((sum, val) => sum + val * val, 0)
);
return vector.map(val =>Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jezweb/claude-skills
jezweb/claude-skills
kostja94/marketing-skills
jwynia/agent-skills
mindrally/skills
github/awesome-copilot
google-gemini-embeddings has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for google-gemini-embeddings matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: google-gemini-embeddings is focused, and the summary matches what you get after install.
google-gemini-embeddings fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend google-gemini-embeddings for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
google-gemini-embeddings reduced setup friction for our internal harness; good balance of opinion and flexibility.
Useful defaults in google-gemini-embeddings — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for google-gemini-embeddings matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: google-gemini-embeddings is focused, and the summary matches what you get after install.
google-gemini-embeddings reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 63