Text Search

👤 jinwangmok 📦 v1.0.0 ⭐ 4.4 ⬇️ 610 下载
💻 开发编程 免费

📖 技能介绍


name: text-search version: 1.0.0 description: >- Search for a text pattern in files within a directory. Shows matching lines with filenames and line numbers. Use when the user wants to find where a word or phrase appears in their files. allowed-tools: Bash(grep:*) metadata: >- {"openclaw":{"emoji":"🔍","requires":{"bins":["grep"],"env":[]},"install":[]}}


Text Search

Find a word or phrase in files within a directory with a single command.

Usage

grep -rn <PATTERN> <DIR_PATH>

Arguments: | # | Name | Description | |---|------|-------------| | 1 | PATTERN | Text or pattern to search for | | 2 | DIR_PATH | Directory to search in |

Example

grep -rn "TODO" /home/user/project

Output:

/home/user/project/main.py:12:# TODO: fix this
/home/user/project/utils.py:5:# TODO: add tests

Format: FILENAME:LINE_NUMBER:MATCHING_LINE

Success / Failure

  • Success: Matching lines printed (exit code 0)

    7w4.net小葱技能。

  • No matches: No output (exit code 1 — this is normal, not an error)
  • Failure: Error message (exit code 2, e.g. directory not found)

🤖 AI 评测

这个文本搜索工具质量不错,能快速在目录中找到指定的文字内容,结果展示清晰(文件名和行号一目了然)。界面简单直观,中英双语说明让上手更容易。不足之处是功能比较基础,没有大小写不敏感、排除某些文件等灵活选项。如果只是简单的搜索需求用它很顺手,想要更高级的搜索能力可能需要功能更丰富的替代品。整体属于中上质量的小工具。

📊 多维度评分

适应性4.5
规范性4.3
有效性4.4
可靠性4.2
可信度4.8

📁 包含文件 (4 个)

📄 MANUAL.md 1.2 KB
📄 SKILL.md 1.1 KB
📄 _meta.json 130 B
📄 run.sh 627 B