Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/DevOps & CI/CD
yoanbernabeu avatar

Grepai Watch Daemon

yoanbernabeu/grepai-skills

This handles the background daemon that keeps your code index fresh as you work. You run `grepai watch` once and it scans your entire codebase, chunks it into ~512 token segments, generates embeddings, then monitors for file changes in real time. The setup is straightforward with `--background` for daemon mode and `--status` to check on it. What I appreciate here is the OS-native file watching (FSEvents on macOS, inotify on Linux) and the debounce configuration that prevents your editor's multiple rapid writes from triggering constant reindexing. If you're using GrepAI for semantic code search, you'll want this running so your index doesn't go stale every time you save a file.

installs
693
GitHub stars
20
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add yoanbernabeu/grepai-skills --skill grepai-watch-daemon --agent claude-code

Installs into .claude/skills of the current project.

Files

GrepAI Watch Daemon

This skill covers the grepai watch command and daemon management for real-time code indexing.

When to Use This Skill

  • Starting initial code indexing
  • Setting up real-time file monitoring
  • Running the daemon in background
  • Troubleshooting indexing issues

What the Watch Daemon Does

The watch daemon:

  1. Scans all source files in your project
  2. Chunks code into segments (~512 tokens)
  3. Generates embeddings via your configured provider
  4. Stores vectors in your configured backend
  5. Monitors for file changes in real-time
  6. Updates the index when files change

Basic Usage

Start Watching (Foreground)

cd /your/project
grepai watch

Output:

🔍 GrepAI Watch
   Scanning files...
   Found 245 files
   Processing chunks...
   ████████████████████████████████ 100%
   Indexed 1,234 chunks
   Watching for changes...

Press Ctrl+C to stop.

Start in Background

grepai watch --background

Output:

🔍 GrepAI Watch (background)
   Daemon started with PID 12345
   Log file: ~/.grepai/daemon.log

Check Daemon Status

grepai watch --status

Output:

✅ GrepAI Daemon Running

   PID: 12345
   Started: 2025-01-28 10:30:00
   Project: /path/to/project

   Statistics:
   - Files indexed: 245
   - Chunks: 1,234
   - Last update: 2 minutes ago

Stop the Daemon

grepai watch --stop

Output:

✅ Daemon stopped (PID 12345)

Command Reference

CommandDescription
grepai watchStart daemon in foreground
grepai watch --backgroundStart daemon in background
grepai watch --statusCheck daemon status
grepai watch --stopStop running daemon

Configuration

Watch Settings

# .grepai/config.yaml
watch:
  # Debounce delay in milliseconds
  # Groups rapid file changes together
  debounce_ms: 500

Debounce Explained

When you save a file, editors often write multiple times quickly. Debouncing waits for changes to settle:

ValueBehavior
100More responsive, more reindexing
500Balanced (default)
1000Less responsive, fewer reindexing

Initial Indexing

What Gets Indexed

The daemon indexes files:

  • Matching supported extensions (.go, .js, .ts, .py, etc.)
  • Not in ignore patterns (node_modules, .git, etc.)
  • Respecting .gitignore

Indexing Progress

Large codebases show progress:

Scanning files...
Found 10,245 files
Processing chunks...
████████████████░░░░░░░░░░░░░░░░ 50% (5,122/10,245)

Indexing Time Estimates

CodebaseFilesTime (Ollama)Time (OpenAI)
Small100~30s~10s
Medium1,000~5min~1min
Large10,000~30min~5min

Real-Time Monitoring

After initial indexing, the daemon watches for:

  • File creation
  • File modification
  • File deletion
  • File renames

File Change Detection

Uses OS-native file watching:

  • macOS: FSEvents
  • Linux: inotify
  • Windows: ReadDirectoryChangesW

What Triggers Reindexing

ActionResult
Save existing fileRe-embed file chunks
Create new fileIndex new chunks
Delete fileRemove from index
Rename fileUpdate path, keep vectors

Background Daemon Management

Starting on System Boot

macOS (launchd)

Create ~/Library/LaunchAgents/com.grepai.watch.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.grepai.watch</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/grepai</string>
        <string>watch</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/path/to/your/project</string>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

Load:

launchctl load ~/Library/LaunchAgents/com.grepai.watch.plist
Linux (systemd)

Create ~/.config/systemd/user/grepai-watch.service:

[Unit]
Description=GrepAI Watch Daemon
After=network.target

[Service]
Type=simple
WorkingDirectory=/path/to/your/project
ExecStart=/usr/local/bin/grepai watch
Restart=always

[Install]
WantedBy=default.target

Enable:

systemctl --user enable grepai-watch
systemctl --user start grepai-watch

Checking Logs

Background daemons write their logs, PID files and PID locks to the log directory:

OSLog directory
macOS~/Library/Logs/grepai/
Linux$XDG_STATE_HOME/grepai/logs/ (default ~/.local/state/grepai/logs/)
Windows%LOCALAPPDATA%\grepai\logs\
# Background daemon logs (macOS)
tail -f ~/Library/Logs/grepai/*.log

# Or with systemd
journalctl --user -u grepai-watch -f

Multiple Projects

One Daemon Per Project

Only one watch daemon can run per project or git worktree: the daemon holds its PID lock for its whole lifetime, so a second grepai watch on the same project fails with watcher is already running (PID ...) (or another grepai watch process is starting (lock held) when two starts race). Search, trace and MCP processes are not affected and can run alongside the daemon.

After grepai watch --stop, an empty *.pid.lock file stays in the log directory. This is expected; it is reused by the next daemon.

Run separate daemons for each project:

# Terminal 1: Project A
cd /path/to/project-a
grepai watch --background

# Terminal 2: Project B
cd /path/to/project-b
grepai watch --background

Using Workspaces

For multi-project setups:

grepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project-a
grepai workspace add my-workspace /path/to/project-b
grepai watch --workspace my-workspace

Troubleshooting

Daemon Won't Start

❌ Problem: "Another daemon is already running" ✅ Solution:

grepai watch --stop
grepai watch --background

❌ Problem: "Config not found" ✅ Solution: Initialize first:

grepai init
grepai watch

❌ Problem: "Embedder connection failed" ✅ Solution: Start your embedding provider:

ollama serve  # For Ollama

Indexing Issues

❌ Problem: Files not being indexed ✅ Solution: Check ignore patterns in config, ensure file extension is supported

❌ Problem: Indexing very slow ✅ Solutions:

  • Use OpenAI for faster cloud embeddings
  • Add more ignore patterns
  • Increase chunking size

❌ Problem: Index seems outdated ✅ Solution: Clear and reindex:

rm .grepai/index.gob
grepai watch

File Watch Issues

❌ Problem: Changes not detected ✅ Solutions:

  • Reduce debounce_ms
  • Check inotify limits (Linux):
    echo 65536 | sudo tee /proc/sys/fs/inotify/max_user_watches
    

Best Practices

  1. Run in background: For continuous monitoring
  2. Use workspace for monorepos: Better organization
  3. Set up auto-start: launchd or systemd
  4. Check logs periodically: Monitor for errors
  5. Reindex after config changes: Especially after changing embedding model

Status Check

Regular health check:

grepai status

Output:

✅ GrepAI Status

   Project: /path/to/project
   Config: .grepai/config.yaml

   Embedder: Ollama (nomic-embed-text)
   Storage: GOB (.grepai/index.gob)

   Index:
   - Files: 245
   - Chunks: 1,234
   - Size: 12.5 MB
   - Last updated: 2025-01-28 10:30:00

   Daemon: Running (PID 12345)

Output Format

Watch daemon status:

✅ Watch Daemon Active

   Mode: Background
   PID: 12345
   Project: /path/to/project

   Initial Index:
   - Files scanned: 245
   - Chunks created: 1,234
   - Duration: 45s

   Real-time Monitor:
   - Debounce: 500ms
   - Events processed: 23
   - Last event: 5 minutes ago

   Next steps:
   - Run 'grepai search "query"' to search
   - Run 'grepai watch --status' to check status
   - Run 'grepai watch --stop' to stop daemon
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/yoanbernabeu/grepai-skills
Category
DevOps & CI/CD
First seen
Jun 3, 2026

More from yoanbernabeu/grepai-skills

All 27
  • Grepai Config Reference688
  • Grepai Troubleshooting688
  • Grepai Workspaces682
  • Grepai Ignore Patterns674
  • Grepai Storage Gob664
  • Grepai Mcp Claude612
  • Grepai Mcp Cursor595
  • Grepai Quickstart594
  • Grepai Installation591
  • Grepai Storage Qdrant562
  • Grepai Embeddings Lmstudio561
  • Grepai Embeddings Openai553
  • Grepai Storage Postgres553
  • Grepai Search Basics905
  • Grepai Search Advanced825
  • Grepai Trace Graph802
  • Grepai Ollama Setup799
  • Grepai Trace Callers784
  • Grepai Search Tips778
  • Grepai Trace Callees762
  • Grepai Search Boosting749
  • Grepai Embeddings Ollama741
  • Grepai Mcp Tools715
  • Grepai Languages704

Recommended

More DevOps & CI/CD
1mindrally avatarsalesforce-dxmindrally/skillsExpert guidance for Salesforce DX development with modern tooling, source-driven development, and CI/CD best practices692installs
2nowledge-co avatarsave-threadnowledge-co/communitySave the real Claude Code or Grok Build session messages only when the user explicitly requests it. Use nmem t save to import the recorded session, not a summar692installs
3joellewis avataranti-money-launderingjoellewis/finance_skillsGuide BSA/AML compliance program design, ongoing transaction monitoring, and FinCEN reporting for broker-dealers, banks, and investment advisers. Use when the u691installs
4aj-geddes avatare2e-testing-automationaj-geddes/useful-ai-promptsBuild end-to-end automated tests that simulate real user interactions across the full application stack. Use for E2E test, Selenium, Cypress, Playwright, browse689installs
5joellewis avatarportfolio-management-systemsjoellewis/finance_skillsSelect, configure, and operate portfolio management systems for advisory firms, covering model portfolios, UMA/sleeve management, drift monitoring, rebalancing,689installs
6joellewis avatartax-loss-harvestingjoellewis/finance_skillsExecute a complete tax-loss harvesting workflow from candidate identification through post-harvest monitoring. Use when the user asks about finding TLH candidat687installs