← Back to Skills Marketplace
schonhoffer

clawgrep

by Andrew Schonhoffer · GitHub ↗ · v0.1.4 · MIT-0
cross-platform ✓ Security Clean
156
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install clawgrep
Description
Grep-like CLI with hybrid semantic and keyword search. Combines semantic embedding search with keyword matching for high-quality code and document retrieval....
README (SKILL.md)

\r \r

clawgrep\r

\r Semantic + keyword file search. Output is grep-compatible. Runs fully locally. On first run, automatically downloads a small ONNX embedding model (~30 MB) from Hugging Face and caches it in the local cache directory. After that, all searches are offline.\r \r

Check availability\r

\r

clawgrep --version\r
```\r
\r
If not found, install from the [open-source repository](https://github.com/Schonhoffer/clawgrep) using any of these methods (only one needed):\r
\r
```bash\r
cargo install clawgrep        # Rust (recommended)\r
npm install -g clawgrep        # Node.js\r
pip install clawgrep           # Python\r
```\r
\r
## Basic usage\r
\r
```bash\r
clawgrep --no-color "query" \x3Cpath>\r
```\r
\r
Always pass `--no-color` when parsing output programmatically.\r
\r
### Search a workspace\r
\r
```bash\r
clawgrep --no-color "previous discussion about auth flow" ./memory\r
```\r
\r
### Output format\r
\r
Grep-compatible, one result per line, ranked by relevance (best first):\r
\r
```\r
$ clawgrep --no-color "previous discussion about auth flow" ./memory\r
memory/2025-06-12-auth-design.md:8:Decided to use OAuth2 with PKCE for all client auth.\r
memory/2025-06-12-auth-design.md:14:Token refresh should be transparent to the user.\r
memory/2025-06-10-planning.md:3:Auth flow is the top priority for the sprint.\r
memory/archive/2025-05-session-notes.md:42:Discussed moving auth to a separate service.\r
memory/archive/2025-05-session-notes.md:87:Need to revisit token expiry policy.\r
```\r
\r
Each line is `file:line:text`. Context lines (from `-C`) use `-` as the\r
separator instead: `file-line-text`.\r
\r
### Exit codes\r
\r
| Code | Meaning |\r
|------|---------|\r
| `0`  | Match found |\r
| `1`  | No match |\r
| `2`  | Error |\r
\r
Same as grep. Use `-q` for existence checks without output.\r
\r
## Choosing search mode\r
\r
Default weights: 70% semantic, 30% keyword.\r
\r
**Concept search** (don't know exact wording):\r
\r
```bash\r
clawgrep --no-color "decision about migration strategy" ./memory\r
```\r
\r
**Exact identifier search** (note IDs, tags, serial numbers):\r
\r
```bash\r
clawgrep --no-color --keyword-weight 0.8 --semantic-weight 0.2 "PROJ-1042" ./memory\r
```\r
\r
## Key flags\r
\r
| Flag | Purpose |\r
|------|---------|\r
| `-k N` | Number of results (default: 5) |\r
| `-C N` | Context lines before and after |\r
| `-l` | Print only matching filenames |\r
| `-q` | Quiet; just set exit code |\r
| `--show-score` | Append relevance score |\r
| `--path-boost N` | Boost filename matches (>1.0 = higher) |\r
| `--min-score N` | Filter low-relevance results (0.0–1.0) |\r
\r
See [CLI reference](references/cli-reference.md) for all flags.\r
\r
## Best practices\r
\r
1. Use `--no-color` always when parsing output.\r
2. Keep `-k` small (3–5) to reduce output. Increase only when needed.\r
3. Check exit codes instead of parsing stdout when possible.\r
4. Let the cache persist — don't use `--no-cache` unless searching throwaway\r
   content. First run indexes; subsequent runs are fast.\r
5. Search the narrowest relevant directory, not the whole filesystem.\r
\r
## References (advanced, usually not needed)\r
\r
The information above should be sufficient for normal use. Only load these if\r
you run into problems or need flags not listed above:\r
\r
- [CLI reference](references/cli-reference.md) — all flags, config file format, grep compatibility\r
- [Examples](references/examples.md) — more input/output examples for edge cases\r
Usage Guidance
This skill is a documentation/instruction wrapper for the external clawgrep CLI rather than executable code. Before installing/using clawgrep: (1) install the clawgrep binary from the repository linked in the SKILL.md or build it locally (cargo/npm/pip as appropriate) and verify that source is trustworthy; (2) be aware that the first run will download a ~30 MB ONNX model from Hugging Face (network activity) and cache it locally in ~/.cache/clawgrep or the platform-specific cache — if you need offline-only behavior, pre-download or audit that step; (3) the skill itself does not request credentials or perform exfiltration, but the binary will read whatever paths you ask it to search, so avoid running it over the entire filesystem if you are concerned about sensitive data; (4) if you need higher assurance, inspect the upstream GitHub project and/or build the binary from source before use.
Capability Analysis
Type: OpenClaw Skill Name: clawgrep Version: 0.1.4 The clawgrep skill provides a semantic and keyword search utility for AI agents, functioning as an enhanced version of the standard grep command. The documentation (SKILL.md and references/) describes legitimate behavior, including a one-time download of an embedding model from Hugging Face and local caching of search indexes. There is no evidence of data exfiltration, malicious execution, or prompt injection; the instructions actually encourage safe practices such as limiting search scope to specific directories.
Capability Assessment
Purpose & Capability
Name/description match the instructions: the SKILL.md documents how to use a local clawgrep CLI and how it behaves. All required functionality (embedding model download, local cache, grep-compatible output) is consistent with a semantic+keyword search tool.
Instruction Scope
The instructions only tell the agent/user to run the clawgrep binary, install it via cargo/npm/pip if missing, and to search user-specified paths. They do not instruct reading unrelated system files, exfiltrating data, or accessing unrelated credentials. The SKILL.md explicitly recommends not searching the whole filesystem.
Install Mechanism
There is no install spec in the registry (instruction-only). SKILL.md states the clawgrep binary will — on first run — download a ~30 MB ONNX model from Hugging Face and cache it locally. That network activity is expected for embedding-based tools but is the primary vector to be aware of (initial download only).
Credentials
The registry lists no required environment variables or credentials. SKILL.md documents optional env vars (CLAWGREP_CACHE_DIR, CLAWGREP_CONFIG, CLAWGREP_VERBOSE, NO_COLOR, RUST_LOG) that are reasonable for a CLI and are not required secrets.
Persistence & Privilege
The skill is not always-enabled and does not request any persistent platform privileges. It does reference a local cache directory (standard for this use case) but does not modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clawgrep
  3. After installation, invoke the skill by name or use /clawgrep
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.4
- Added details on first-run model download (~30 MB ONNX from Hugging Face), and clarified that subsequent runs are fully offline. - Updated compatibility notes, explicitly stating no API keys are needed and clarifying installation options. - Added author, repository, and homepage metadata. - Linked to the open-source repository for installation instructions. - Clarified and streamlined the description of model caching behavior.
v0.1.3
- Initial release of clawgrep: a CLI tool combining semantic embedding search and keyword matching for code and document retrieval. - Search large collections of files with both semantic and keyword relevance; grep-compatible output for easy parsing. - Runs entirely locally after model download, with no API keys or network access required. - Available via cargo, npm, or pip on Linux, macOS, and Windows. - Supports core grep-like flags, with additional hybrid search tuning and context output features. - MIT OR Apache-2.0 licensed.
Metadata
Slug clawgrep
Version 0.1.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is clawgrep?

Grep-like CLI with hybrid semantic and keyword search. Combines semantic embedding search with keyword matching for high-quality code and document retrieval.... It is an AI Agent Skill for Claude Code / OpenClaw, with 156 downloads so far.

How do I install clawgrep?

Run "/install clawgrep" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is clawgrep free?

Yes, clawgrep is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does clawgrep support?

clawgrep is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created clawgrep?

It is built and maintained by Andrew Schonhoffer (@schonhoffer); the current version is v0.1.4.

💬 Comments