Windows-Safe Grep Skill
SkillDev toolsUse when grep/ripgrep fails on Windows due to paths with backslash-space sequences creating malformed paths like 'nul' from \n+ul
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Windows-Safe Grep Skill skill
What this skill tells your AI
The instructions your AI receives, as published by julianromli/opencode-template in skill/windows-safe-grep/SKILL.md and read by ahel’s review.
Problem
On Windows, paths containing backslash-space sequences (e.g., D:\Projects\Vibe Code\isometricid) can cause ripgrep to fail because:
- The
\ninisometricidis interpreted as a newline character - Combined with the following
ul, this creates a reference to the reserved Windows device namenul - Error:
rg: D:\Projects\Vibe Code\isometricid\nul: Incorrect function. (os error 1)
Solution
Use bash commands with proper path quoting to work around this Windows-specific issue:
Safe Grep Command Pattern
rg --fixed-strings "SEARCH_TERM" "/d/Projects/Vibe Code/isometricid"
Or use forward slashes and proper quoting:
rg --fixed-strings "SEARCH_TERM" "$(cygpath -u "D:\Projects\Vibe Code\isometricid")"
Alternative: Use find + grep
find "/d/Projects/Vibe Code/isometricid" -type f \( -name "*.ts" -o -name "*.js" -o -name "*.tsx" -o -name "*.jsx" \) -exec grep -H --line-number "SEARCH_TERM" {} \;
Usage
When grep fails with "Incorrect function (os error 1)" on Windows:
- Use this skill
- Replace the path with forward slashes:
D:\Projects\Vibe Code\isometricid→/d/Projects/Vibe Code/isometricid - Or use the bash command pattern with proper quoting
Example
rg --fixed-strings "polar_product_id" "/d/Projects/Vibe Code/isometricid/src"
Signals
- GitHub stars
- 142
- Forks
- 21
- Last commit
- Feb 2026
Advanced
- Catalog kind
- skill
- Gateway key
windows-safe-grep- Source
- github.com/julianromli/opencode-template