Skip to content

Instantly share code, notes, and snippets.

@hungthai1401
Forked from factory-ben/SKILL.md
Created November 27, 2025 09:17
Show Gist options
  • Select an option

  • Save hungthai1401/25d78ddc5c61ddc2ab39279b0762a9c9 to your computer and use it in GitHub Desktop.

Select an option

Save hungthai1401/25d78ddc5c61ddc2ab39279b0762a9c9 to your computer and use it in GitHub Desktop.
osgrep skill for Factory
name description
osgrep
Run lightweight semantic grep over the current repository using the osgrep CLI (natural-language search, JSON output, hot daemon).

Note: path should be ~/.factory/skills/osgrep/SKILL.md

Install osgrep

Install / Warm Up

npm install -g osgrep osgrep setup (downloads models once; optional but faster later)

osgrep Skill

Minimal semantic grep harness. Use when you need fast, local, natural-language search over the repo without spinning up MCP servers.

Core Search

osgrep "how do we validate auth?"
osgrep --json "pagination helper"    # machine-readable
osgrep "error handling" --per-file 3 # deeper per file
osgrep "feature flags" --compact     # file paths only
  • Run from the repo root so auto-store detection works.
  • Pipe long JSON to a file if needed: osgrep --json "query" > /tmp/osgrep.json.

Keep Index Fresh

osgrep --sync "recent changes"   # re-index modified files before search
osgrep index                     # manual full re-index

Hot Daemon (optional)

osgrep serve            # keeps embeddings warm (default port 4444)

The CLI auto-falls back to on-demand mode if the server isn’t running.

Diagnostics & Cleanup

osgrep list    # show indexed repos
osgrep doctor  # verify install + models

Delete a store anytime via rm -rf ~/.osgrep/data/<store> if you need a clean slate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment