跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

search-miss-binary

ripgrep/search_files silently skips binary-detected files — verify empty search results with grep -a / file / xxd before concluding 'not found'.

ashutoshsinghpr7 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ashutoshsinghpr7/wikiskill --skill search-miss-binary

技能说明


name: search-miss-binary description: "ripgrep/search_files silently skips binary-detected files — verify empty search results with grep -a / file / xxd before concluding 'not found'." version: 1.0.0 license: MIT platforms: [linux, macos, windows] metadata: hermes: tags: [search, debugging, ripgrep, binary, verification] homepage: https://github.com/ashutoshsinghpr7/wikiskill

Search Can Silently Miss Binary-Detected Files

Problem

search_files (ripgrep) returned 0 matches for SECRET- even though data.log contains SECRET-1722. Trusting the empty result would fail the task ("which file contains the secret?").

Root cause

Ripgrep skips files it heuristically classifies as binary. The empty result means "no match in text-classified files", not "string absent".

Fix

  • When a content search returns nothing but files exist, do NOT trust the empty result blindly.
  • Force text mode: grep -a -l PATTERN <files> and/or file + xxd/hexdump to confirm where the string lives.
  • Confirm the actual match content before writing the answer.

Evidence

  • Hit in a real graded task: SECRET-1722 lived in a binary-detected file; the agent correctly suspected "encoding or binary detection issues" and verified directly instead of concluding "not found".