grepai-embeddings-openai

yoanbernabeu/grepai-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-embeddings-openai
0 commentsdiscussion
summary

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

skill.md

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

Aspect Details
Quality State-of-the-art embeddings
Speed Fast, no local compute needed
Scalability Handles any codebase size
⚠️ Privacy Code sent to OpenAI servers
⚠️ Cost Pay per token
⚠️ Internet Requires 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)

Property Value
Dimensions 1536
Price $0.00002 / 1K tokens
Quality Very high
Speed Fast

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

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

text-embedding-3-large

Property Value
Dimensions 3072
Price $0.00013 / 1K tokens
Quality Highest
Speed Fast

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

Model Dimensions Cost/1K tokens Quality
text-embedding-3-small 1536 $0.00002 ⭐⭐⭐⭐
text-embedding-3-large 3072 $0.00013 ⭐⭐⭐⭐⭐

Cost Estimation

Approximate costs per 1000 source files:

Codebase Size Chunks Small Model Large 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:

Tier RPM TPM
Free 3 150,000
Tier 1 500 1,000,000
Tier 2 5,000 5,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 UnauthorizedSolution: Check API key is correct and environment variable is set:

echo $OPENAI_API_KEY

Problem: 429 Rate limit exceededSolution: 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.
how to use grepai-embeddings-openai

How to use grepai-embeddings-openai on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add grepai-embeddings-openai
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches grepai-embeddings-openai from GitHub repository yoanbernabeu/grepai-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/grepai-embeddings-openai

Reload or restart Cursor to activate grepai-embeddings-openai. Access the skill through slash commands (e.g., /grepai-embeddings-openai) or your agent's skill management interface.

Security & Verification Notice

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 development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ 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.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.861 reviews
  • Anika Sanchez· Dec 24, 2024

    We added grepai-embeddings-openai from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Dhruvi Jain· Dec 20, 2024

    We added grepai-embeddings-openai from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Anika Taylor· Dec 20, 2024

    grepai-embeddings-openai has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Michael Torres· Dec 20, 2024

    Keeps context tight: grepai-embeddings-openai is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Michael Perez· Dec 20, 2024

    Useful defaults in grepai-embeddings-openai — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Soo Rao· Dec 16, 2024

    Useful defaults in grepai-embeddings-openai — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ren Taylor· Nov 15, 2024

    grepai-embeddings-openai reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Oshnikdeep· Nov 11, 2024

    grepai-embeddings-openai reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Diego Robinson· Nov 11, 2024

    Solid pick for teams standardizing on skills: grepai-embeddings-openai is focused, and the summary matches what you get after install.

  • Michael Gonzalez· Nov 11, 2024

    grepai-embeddings-openai is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 61

1 / 7