windows-safe-grep

Search Windows code paths with spaces using a find and grep fallback.

141|20|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/julianromli/opencode-template --skill windows-safe-grep-julianromli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: windows-safe-grep
Source: https://github.com/julianromli/opencode-template/tree/main/skill/windows-safe-grep
Command: npx skills add https://github.com/julianromli/opencode-template --skill windows-safe-grep-julianromli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Windows path handling in ripgrep can fail when a path contains backslash-space sequences, causing false results or missed matches.

Core Features & Use Cases

  • Safe Windows path handling for code search when using ripgrep.
  • Fallback search using find + grep that respects spaces and special characters in paths.
  • Real-world use: quickly locate references in a Windows project with spaces in folder names.

Quick Start

Run the wrapper to search for a term across your Windows project with spaces in paths.

Frequently Asked Questions about windows-safe-grep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does ripgrep fail to search Windows paths with spaces?

The Windows-safe grep workaround normalizes Windows paths and uses a find + grep workflow to handle backslash-space sequences. It properly respects spaces and special characters in paths, excluding .next and node_modules directories to reliably locate matches.

How do I search code in a Windows project with spaces in folder names?

The Windows-safe grep wrapper applies path normalization to handle backslash-space sequences before searching. It excludes .next and node_modules directories to ensure reliable match location in Windows projects containing spaces in folder names.

Does ripgrep misbehave with reserved names like nul on Windows?

Ripgrep misbehaves on Windows when paths contain spaces and reserved names like nul, causing false results or missed matches. The Windows-safe grep workaround addresses this by using a find + grep workflow with Windows path normalization to reliably locate matches.

What is the best way to grep on Windows paths with spaces?

Using a find + grep workflow with Windows path normalization is the best way to grep on Windows paths with spaces. This approach handles backslash-space sequences that break ripgrep and excludes .next and node_modules directories to reliably locate matches.

Can I search for references in a Windows project with spaces in paths using ripgrep?

Searching for references in a Windows project with spaces in paths is unreliable with ripgrep directly. A find + grep workflow with Windows path normalization handles the backslash-space sequences, excluding .next and node_modules to reliably locate matches.