grepai-storage-gob — Claude Code skill: what it does, how to install
Sets up local GOB binary storage for GrepAI without running external database services. Designed for solo developers and codebases under 10,000 files.
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a claude-codeWhat grepai-storage-gob does
GrepAI relies on Go binary serialization (GOB) as its default single-file backend. This skill guides the configuration of .grepai/config.yaml and prepares index generation via grepai watch. Vector embeddings, chunks, and metadata are written directly into .grepai/index.gob and .grepai/symbols.gob.
During search routines, GrepAI loads the entire index file into RAM. A 50 MB index file consumes around 100 MB of system memory. Once a project grows past 50,000 files or exceeds 1 GB in index size, GOB becomes a bottleneck, signaling a need to move to PostgreSQL or Qdrant. Because index entries store absolute local paths and model-specific vectors, .grepai/ must remain in .gitignore rather than shared across machines.
What it helps with
- configure local GOB backend in .grepai/config.yaml
- estimate RAM consumption for in-memory vector search
- back up or rebuild a corrupted index.gob file
- prepare GrepAI migration to PostgreSQL or Qdrant
Example prompts for the agent
- Configure grepai to use the local gob storage backend in this repo.
- Check grepai index status and calculate how much RAM it needs.
- Show the configuration needed to migrate grepai from gob to qdrant.
How to install grepai-storage-gob
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a claude-code2Manually: put the files in place
~/.claude/skills/grepai-storage-gob/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/grepai-storage-gob/
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a codex2Manually: put the files in place
.agents/skills/grepai-storage-gob/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a cursor2Manually: put the files in place
.cursor/skills/grepai-storage-gob/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yoanbernabeu/grepai-skills grepai-storage-gob2Manually: put the files in place
.github/skills/grepai-storage-gob/SKILL.md1Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a gemini-cli2Platform CLI
gemini skills install https://github.com/yoanbernabeu/grepai-skills --path skills/storage/grepai-storage-gobManually: put the files in place
.devin/skills/grepai-storage-gob/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about grepai-storage-gob
How to install grepai-storage-gob in Claude Code?
Run npx skills add yoanbernabeu/grepai-skills --skill grepai-storage-gob -a claude-code. Alternatively, add the skill file directly at ~/.claude/skills/grepai-storage-gob/SKILL.md.
What does grepai-storage-gob do?
It gives your coding agent instructions for setting up GrepAI's native GOB storage backend. The skill explains config parameters, RAM limits, and file maintenance commands.
Why should .grepai stay in .gitignore?
The index.gob binary relies on absolute machine paths and the specific local embedding model. Indexes cannot be shared reliably across different developer environments, so each machine runs its own grepai watch.
Source text
SKILL.md · MIT
---
name: grepai-storage-gob
description: Configure GOB local file storage for GrepAI. Use this skill for simple, single-machine setups.
---
# GrepAI Storage with GOB
This skill covers using GOB (Go Binary) as the storage backend for GrepAI, the default and simplest option.
## When to Use This Skill
- Single developer projects
- Small to medium codebases
- Simple setup without external dependencies
- Local development environments
## What is GOB Storage?
GOB is Go's native binary serialization format. GrepAI uses it to store:
- Vector embeddings
- File metadata
- Chunk information
Everything is stored in a single local file.
## Advantages
| Benefit | Description |
|---------|-------------|
| 🚀 **Simple** | No external services needed |
| ⚡ **Fast setup** | Works immediately |
| 📁 **Portable** | Single file, easy to backup |
| 💰 **Free** | No infrastructure costs |
| 🔒 **Private** | Data stays local |
## Limitations
| Limitation | Description |
|------------|-------------|
| 📏 **Scalability** | Not ideal for very large codebases |
| 👤 **Single user** | No concurrent access |
| 🔄 **No sharing** | Can't share index across machines |
| 💾 **Memory** | Loads into RAM for searches |
## Configuration
### Default Configuration
GOB is the default backend. Minimal config:
```yaml
# .grepai/config.yaml
store:
backend: gob
```
### Explicit Configuration
```yaml
store:
backend: gob
# Index stored in .grepai/index.gob (automatic)
```
## Storage Location
GOB storage creates files in your project's `.grepai/` directory:
```
.grepai/
├── config.yaml # Configuration
├── index.gob # Vector embeddings
└── symbols.gob # Symbol index for trace
```
## File Sizes
Approximate `.grepai/index.gob` sizes:
| Codebase | Files | Chunks | Index Size |
|----------|-------|--------|------------|
| Small | 100 | 500 | ~5 MB |
| Medium | 1,000 | 5,000 | ~50 MB |
| Large | 10,000 | 50,000 | ~500 MB |
## Operations
### Creating the Index
```bash
# Initialize project
grepai init
# Start indexing (creates index.gob)
grepai watch
```
### Checking Index Status
```bash
grepai status
# Output:
# Index: .grepai/index.gob
# Files: 245
# Chunks: 1,234
# Size: 12.5 MB
# Last updated: 2025-01-28 10:30:00
```
### Backing Up the Index
```bash
# Simple file copy
cp .grepai/index.gob .grepai/index.gob.backup
```
### Clearing the Index
```bash
# Delete and re-index
rm .grepai/index.gob
grepai watch
```
### Moving to a New Machine
```bash
# Copy entire .grepai directory
cp -r .grepai /path/to/new/location/
# Note: Only works if using same embedding model
```
## Performance Considerations
### Memory Usage
GOB loads the entire index into RAM for searches:
| Index Size | RAM Usage |
|------------|-----------|
| 10 MB | ~20 MB |
| 50 MB | ~100 MB |
| 500 MB | ~1 GB |
### Search Speed
GOB provides fast searches for typical codebases:
| Codebase Size | Search Time |
|---------------|-------------|
| Small (100 files) | <50ms |
| Medium (1K files) | <200ms |
| Large (10K files) | <1s |
### When to Upgrade
Consider PostgreSQL or Qdrant when:
- Index exceeds 1 GB
- Need concurrent access
- Want to share index across team
- Codebase has 50K+ files
## .gitignore Configuration
Add `.grepai/` to your `.gitignore`:
```gitignore
# GrepAI (machine-specific index)
.grepai/
```
**Why:** The index is machine-specific because:
- Contains binary embeddings
- Tied to the embedding model used
- Each machine should generate its own
## Sharing Index (Not Recommended)
While you can copy the index file, it's not recommended because:
1. Must use identical embedding model
2. File paths are absolute
3. Different machines may have different code versions
**Better approach:** Each developer runs their own `grepai watch`.
## Migrating to Other Backends
### To PostgreSQL
1. Update config:
```yaml
store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepai
```
2. Re-index:
```bash
rm .grepai/index.gob
grepai watch
```
### To Qdrant
1. Update config:
```yaml
store:
backend: qdrant
qdrant:
endpoint: localhost
port: 6334
```
2. Re-index:
```bash
rm .grepai/index.gob
grepai watch
```
## Common Issues
❌ **Problem:** Index file too large
✅ **Solution:** Add more ignore patterns or migrate to PostgreSQL/Qdrant
❌ **Problem:** Slow searches on large codebase
✅ **Solution:** Migrate to Qdrant for better performance
❌ **Problem:** Corrupted index
✅ **Solution:** Delete and re-index:
```bash
rm .grepai/index.gob .grepai/symbols.gob
grepai watch
```
❌ **Problem:** "Index not found" error
✅ **Solution:** Run `grepai watch` to create the index
## Best Practices
1. **Use for small/medium projects:** Up to ~10K files
2. **Add to .gitignore:** Don't commit the index
3. **Backup before major changes:** Copy index.gob before experiments
4. **Re-index after model changes:** If you change embedding models
5. **Monitor file size:** Migrate if index exceeds 1GB
## Output Format
GOB storage status:
```
✅ GOB Storage Configured
Backend: GOB (local file)
Index: .grepai/index.gob
Size: 12.5 MB
Contents:
- Files: 245
- Chunks: 1,234
- Vectors: 1,234 × 768 dimensions
Performance:
- Search latency: <100ms
- Memory usage: ~25 MB
```
© yoanbernabeu · MIT · yoanbernabeu/grepai-skills