MCPInstall

grepai-embeddings-openai

Configure OpenAI as embedding provider for GrepAI. Use this skill for high-quality cloud embeddings.

Installs
553
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-embeddings-openai
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads grepai-embeddings-openai automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

GrepAI Embeddings with OpenAI

This skill covers using OpenAI's embedding API with GrepAI for high-quality, cloud-based embeddings.

When to Use This Skill

  • Need highest quality embeddings
  • Team environment with shared infrastructure
  • Don't want to manage local embedding server
  • Willing to trade privacy for quality/convenience

Considerations

AspectDetails
✅ QualityState-of-the-art embeddings
✅ SpeedFast, no local compute needed
✅ ScalabilityHandles any codebase size
⚠️ PrivacyCode sent to OpenAI servers
⚠️ CostPay per token
⚠️ InternetRequires connection

Prerequisites

  1. OpenAI API key
  2. Billing enabled on OpenAI account

Get your API key at: https://platform.openai.com/api-keys

Configuration

Basic Configuration

# .grepai/config.yaml
embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}

Set the environment variable:

export OPENAI_API_KEY="sk-..."

With Parallel Processing

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}
  parallelism: 8  # Concurrent requests for speed

Direct API Key (Not Recommended)

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: sk-your-api-key-here  # Avoid committing secrets!

Warning: Never commit API keys to version control.

Available Models

text-embedding-3-small (Recommended)

PropertyValue
Dimensions1536
Price$0.00002 / 1K tokens
QualityVery high
SpeedFast

Best for: Most use cases, good balance of cost/quality.

embedder:
  provider: openai
  model: text-embedding-3-small

text-embedding-3-large

PropertyValue
Dimensions3072
Price$0.00013 / 1K tokens
QualityHighest
SpeedFast

Best for: Maximum accuracy, cost not a concern.

embedder:
  provider: openai
  model: text-embedding-3-large
  dimensions: 3072

Dimension Reduction

You can reduce dimensions to save storage:

embedder:
  provider: openai
  model: text-embedding-3-large
  dimensions: 1024  # Reduced from 3072

Model Comparison

ModelDimensionsCost/1K tokensQuality
text-embedding-3-small1536$0.00002⭐⭐⭐⭐
text-embedding-3-large3072$0.00013⭐⭐⭐⭐⭐

Cost Estimation

Approximate costs per 1000 source files:

Codebase SizeChunksSmall ModelLarge Model
Small (100 files)~500$0.01$0.06
Medium (1000 files)~5,000$0.10$0.65
Large (10000 files)~50,000$1.00$6.50

Note: Costs are one-time for initial indexing. Updates only re-embed changed files.

Optimizing for Speed

Parallel Requests

GrepAI v0.24.0+ supports adaptive rate limiting and parallel requests:

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}
  parallelism: 8  # Adjust based on your rate limit tier

Parallelism recommendations:

  • Tier 1 (Free): 1-2
  • Tier 2: 4-8
  • Tier 3+: 8-16

Batching

GrepAI automatically batches chunks for efficient API usage.

Rate Limits

OpenAI has rate limits based on your account tier:

TierRPMTPM
Free3150,000
Tier 15001,000,000
Tier 25,0005,000,000

GrepAI handles rate limiting automatically with adaptive backoff.

Environment Variables

Setting the API Key

macOS/Linux:

# In ~/.bashrc, ~/.zshrc, or ~/.profile
export OPENAI_API_KEY="sk-..."

Windows (PowerShell):

$env:OPENAI_API_KEY = "sk-..."
# Or permanently
[System.Environment]::SetEnvironmentVariable('OPENAI_API_KEY', 'sk-...', 'User')

Using .env Files

Create .env in your project root:

OPENAI_API_KEY=sk-...

Add to .gitignore:

.env

Azure OpenAI

For Azure-hosted OpenAI:

embedder:
  provider: openai
  model: your-deployment-name
  api_key: ${AZURE_OPENAI_API_KEY}
  endpoint: https://your-resource.openai.azure.com

Security Best Practices

  1. Use environment variables: Never hardcode API keys
  2. Add to .gitignore: Exclude .env files
  3. Rotate keys: Regularly rotate API keys
  4. Monitor usage: Check OpenAI dashboard for unexpected usage
  5. Review code: Ensure sensitive code isn't being indexed

Common Issues

❌ Problem: 401 Unauthorized ✅ Solution: Check API key is correct and environment variable is set:

echo $OPENAI_API_KEY

❌ Problem: 429 Rate limit exceeded ✅ Solution: Reduce parallelism or upgrade OpenAI tier:

embedder:
  parallelism: 2  # Lower value

❌ Problem: High costs ✅ Solutions:

  • Use text-embedding-3-small instead of large
  • Reduce dimension size
  • Add more ignore patterns to reduce indexed files

❌ Problem: Slow indexing ✅ Solution: Increase parallelism:

embedder:
  parallelism: 8

❌ Problem: Privacy concerns ✅ Solution: Use Ollama for local embeddings instead

Migrating from Ollama to OpenAI

  1. Update configuration:
embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}
  1. Delete existing index:
rm .grepai/index.gob
  1. Re-index:
grepai watch

Important: You cannot mix embeddings from different models/providers.

Output Format

Successful OpenAI configuration:

✅ OpenAI Embedding Provider Configured

   Provider: OpenAI
   Model: text-embedding-3-small
   Dimensions: 1536
   Parallelism: 4
   API Key: sk-...xxxx (from environment)

   Estimated cost for this codebase:
   - Files: 245
   - Chunks: ~1,200
   - Cost: ~$0.02

   Note: Code will be sent to OpenAI servers.

FAQ

What does the grepai-embeddings-openai skill do?

Configure OpenAI as embedding provider for GrepAI. Use this skill for high-quality cloud embeddings.

How do I install grepai-embeddings-openai?

Run npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-embeddings-openai in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/grepai-embeddings-openai/ (personal) or .claude/skills/grepai-embeddings-openai/ (project).

Which AI agents can use grepai-embeddings-openai?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is grepai-embeddings-openai safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains grepai-embeddings-openai?

It is published by yoanbernabeu in yoanbernabeu/grepai-skills. It has 553 recorded installs.

More from yoanbernabeu/grepai-skills

View all →

grepai-search-basics

yoanbernabeu/grepai-skills

Basic semantic code search with GrepAI. Use this skill to learn fundamental search commands and concepts.

grepai-search-advanced

yoanbernabeu/grepai-skills

Advanced search options in GrepAI. Use this skill for JSON output, compact mode, and AI agent integration.

AI & Agents828 installs

grepai-trace-graph

yoanbernabeu/grepai-skills

Build complete call graphs with GrepAI trace. Use this skill for recursive dependency analysis.

805 installs

grepai-ollama-setup

yoanbernabeu/grepai-skills

Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.

AI & Agents799 installs

grepai-trace-callers

yoanbernabeu/grepai-skills

Find function callers with GrepAI trace. Use this skill to discover what code calls a specific function.

787 installs

grepai-search-tips

yoanbernabeu/grepai-skills

Tips and best practices for effective GrepAI searches. Use this skill to improve search result quality.

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs