claude_code_public_skills / documents_ripgrep
CLAUDE.md9 starsChanged 4 months agoMITView on GitHub
本项目包含 3 个核心文档,各自有不同的功能定位: 这是一个基于 ripgrep 和 textract 的文档内容搜索工具,用于在大量文档中搜索特定内容。核心特点是通过结合 ripgrep 的高效文本搜索和 textract 的 Office 文件提取能力,实现全面的文档内容检索。 文本文件搜索: 1. 构建 ripgrep 命令参数 2. 执行 ripgrep 搜索 3. 解析 JSON 输出 4. 收集匹配结果 Office 文件搜索: 1. 遍历目录收集 Office 文件 2. 使用 textract 提取文本内容 3. 在提取的文本中搜索关键词 4. 收集匹配结果
- Installs packages
In this repository64 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cmo-weather-query/CLAUDE.mdCLAUDE.md
- db_client/CLAUDE.mdCLAUDE.md
- deepseek-search/CLAUDE.mdCLAUDE.md
- excel-alasql/CLAUDE.mdCLAUDE.md
- game_mahjong_agent/CLAUDE.mdCLAUDE.md
- gaode_map/CLAUDE.mdCLAUDE.md
- magpie-image-gen/CLAUDE.mdCLAUDE.md
- ms_office_x_editer/CLAUDE.mdCLAUDE.md
- ssh2-node/CLAUDE.mdCLAUDE.md
- use_http_mcp/CLAUDE.mdCLAUDE.md
- where-am-i/CLAUDE.mdCLAUDE.md
- 88chaSkill
- agent-browserSkill
- baidu-search-nodejsSkill
- brz-repair-manual-querySkill
- cmo-weather-querySkill
- db-clientSkill
- deepseek-searchSkill
- dianping-searchSkill
- doc-readerSkill
- documents-ripgrepSkill
- drawio-nodejsSkill
- excel-alasqlSkill
- figma-code-connectSkill
- figma-create-design-system-rulesSkill
- figma-create-new-fileSkill
- figma-generate-designSkill
- figma-generate-librarySkill
- figma-implement-designSkill
- figma-useSkill
- file-code-boxSkill
- financialSkill
- game-mahjong-agentSkill
- gaode-mapSkill
- gitea-apiSkill
- happy-agent-easySkill
- hindsightSkill
- jina-readerSkill
- kavita-liteSkill
- magpie-image-genSkill
- magpie-toolsSkill
- makepad-evolutionSkill
- markitdown-pdfSkill
- memos-nodeSkill
- mind-map-skillSkill
- ms-office-x-editerSkill
- nexus3-skillSkill
- obsidian-basesSkill
- obsidian-cliSkill
- json-canvasSkill
- ocr-toolSkill
- opencode-go-usageSkill
- sendmailSkill
- siyuan-apiSkill
- smb-clientSkill
- ssh2-nodeSkill
- use-http-mcpSkill
- website-security-scanSkill
- where-am-iSkill
- The first 60 shown.
The file
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
文档说明
本项目包含 3 个核心文档,各自有不同的功能定位:
| 文件 | 功能定位 | 目标读者 |
| SKILL.md | 告诉 LLM 如何使用这个 skill | Claude AI (LLM) |
| CLAUDE.md | AI 开发工具的指引,包含项目架构和开发规范 | Claude Code (开发助手) |
| README.md | skill 的完整使用说明文档 | 用户 |
项目概述
这是一个基于 ripgrep 和 textract 的文档内容搜索工具,用于在大量文档中搜索特定内容。核心特点是通过结合 ripgrep 的高效文本搜索和 textract 的 Office 文件提取能力,实现全面的文档内容检索。
核心功能
- 文本文件搜索(使用 ripgrep)
- Office 文件搜索(.docx, .xlsx, .pptx)
- 支持正则表达式、大小写敏感、全词匹配等选项
- JSON 格式输出(ripgrep 原生支持)
常用命令
安装依赖
pnpm install运行主工具
# 基本搜索
node run.js <目录路径> <搜索关键词>
# 正则表达式
node run.js <目录路径> <正则表达式> -e
# 打包
pnpm build核心架构
主入口文件
run.js- 主脚本,包含搜索逻辑和结果输出
搜索流程
文本文件搜索:
- 构建 ripgrep 命令参数
- 执行 ripgrep 搜索
- 解析 JSON 输出
- 收集匹配结果
Office 文件搜索:
- 遍历目录收集 Office 文件
- 使用 textract 提取文本内容
- 在提取的文本中搜索关键词
- 收集匹配结果
依赖加载方式
项目支持两种依赖加载方式:
- npx 模式(推荐用于 textract):
npx -y textract "文件路径" - 本地安装模式:
npm install后使用打包版本
开发规范
代码风格
- 使用同步 API 简化代码(execSync)
- 使用 JSON 格式解析 ripgrep 输出
- 支持 Windows/macOS/Linux 跨平台
版本号规则
打包文件版本号格式:YYMMDD.HHmmSS
- 由
build.js自动生成并注入到打包文件 - 同时更新 SKILL.md 中的
version字段
重要限制
- Office 格式:仅支持新版格式(.docx, .xlsx, .pptx)
- 大文件:超大 Office 文件可能需要较长处理时间
- 内存:使用 execSync 的 maxBuffer 限制输出大小
- 超时:textract 提取设置 30 秒超时
工具文件说明
| 文件 | 说明 |
| skill.js | 主工具,包含所有依赖,无需安装 |
| run.js | 开发版本,需要本地安装依赖 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

