grepwrapper
通过 grepwrapper CLI 使用 grep.app 在公共 GitHub 存储库中搜索精确的代码匹配。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~riprsa-grepwrappercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~riprsa-grepwrapper/file -o riprsa-grepwrapper.md# grepwrapper Use this skill when the user asks to: - find exact code matches on GitHub - locate repo/file/path occurrences for a snippet - run grep.app code search from CLI ## Install ```bash npm i -g git+https://github.com/riprsa/grepwrapper.git ``` ## Standard usage ```bash grepwrapper search --q "PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)" ``` Options: - `--q <query>` required - `--case` case-sensitive - `--words` whole-word (mutually exclusive with `--regexp`) - `--regexp` regex mode (mutually exclusive with `--words`) - `--page <n>` page number Examples: ```bash grepwrapper search --q "QMD" --case --regexp grepwrapper search --q "QMD" --case --words --page 2 ``` ## Expected output CLI returns summary lines: - `time=<ms> total=<n> returned=<n>` - one line per hit: `- <repo>:<path> (matches=<count>)` ## Agent behavior - Return top matches with direct GitHub links when possible. - If many matches exist, summarize and ask whether user wants next page / narrower filters. - Prefer exact query first, then widen with `--regexp` only when needed. --- ## 中文说明 # grepwrapper 在用户要求执行以下操作时使用此技能: - 在 GitHub 上查找精确的代码匹配 - 定位某段代码片段出现的存储库/文件/路径 - 从命令行运行 grep.app 代码搜索 ## 安装 ```bash npm i -g git+https://github.com/riprsa/grepwrapper.git ``` ## 标准用法 ```bash grepwrapper search --q "PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)" ``` 选项: - `--q <query>` 必填 - `--case` 区分大小写 - `--words` 全词匹配(与 `--regexp` 互斥) - `--regexp` 正则模式(与 `--words` 互斥) - `--page <n>` 页码 示例: ```bash grepwrapper search --q "QMD" --case --regexp grepwrapper search --q "QMD" --case --words --page 2 ``` ## 预期输出 CLI 返回摘要行: - `time=<ms> total=<n> returned=<n>` - 每个命中一行:`- <repo>:<path> (matches=<count>)` ## 代理行为 - 尽可能返回靠前的匹配结果,并附带直达的 GitHub 链接。 - 如果存在大量匹配,进行汇总,并询问用户是否需要下一页/更精确的过滤条件。 - 优先使用精确查询,仅在需要时再用 `--regexp` 扩大范围。