Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

ripgrepripgrep 搜索

Agent Skill

ripgrep 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

636

周安装

26

GitHub Stars

13

下载量

204
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ripgrep(ripgrep 搜索)
来源仓库:https://github.com/jpcaparas/skills
仓库路径:skills/ripgrep
安装命令:
npx skills add https://github.com/jpcaparas/skills --skill ripgrep
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jpcaparas/skills --skill ripgrep

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • ripgrep 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

ripgrep

Prefer rg over grep for text search, and prefer rg --files over find | grep when the real task is path discovery.

Verified locally against ripgrep 15.1.0 on April 10, 2026. The skill is repo-agnostic, but the examples assume a Unix-like shell and an rg binary in PATH.

Decision Tree

What kind of search do you need?

  • Search file contents for text, symbols, regexes, or literals

- Start with rg - Read references/commands.md

  • Find filenames or paths without reading file contents

- Start with rg --files [path] - Then filter that list with a second rg if needed - Read references/patterns.md

  • Search only specific languages, globs, hidden files, ignored files, compressed data, or multiline blocks

- Read references/commands.md - If results seem wrong or missing, read references/gotchas.md

  • Make ripgrep behavior repeatable with config files, aliases, or custom file types

- Read references/configuration.md

  • Feed results into automation, scripts, editors, or other tools

- Prefer --json, -0, -l, --count-matches, or --sort path as appropriate - Read references/patterns.md

  • The user wants full-file reading, structured JSON queries, or filesystem metadata

- Do not force rg into a role it is bad at - Read the file directly, or use jq, find, or fd

Default Operating Rules

  1. Use rg first for text search. Only fall back to grep when rg is unavailable or exact POSIX grep behavior is the real requirement.
  2. Use -F for user-provided literals unless the user clearly asked for regex semantics.
  3. Narrow the search early with an explicit path plus -t or -g instead of searching the entire tree and cleaning up later.
  4. Use rg --files for path discovery, then pipe into another rg for filename filtering instead of composing find... | grep....
  5. Escalate ignore overrides gradually: normal search, then --hidden, then -u or --no-ignore, then -uu or -uuu only if the missing-result hypothesis justifies it.
  6. Use --debug when results are missing and you need to know what ripgrep skipped.
  7. Use --json or -n --color never --no-heading for machine consumption. Prefer --sort path when deterministic output matters more than maximum speed.

Quick Reference

NeedCommandNotes
Literal text searchrg -n -F 'needle' path/Best default for user-provided strings with punctuation
Regex searchrg -n 'foo\\s+bar' path/Use single quotes so the shell does not interfere
Filenames onlyrg --files path/Respects ignore files by default
Filter filenames`rg --filesrg '(^
Match specific languagesrg -n -t py 'pattern' src/-t includes, -T excludes
Match specific globsrg -n -g '*.tsx' 'pattern' src/Later globs override earlier ones
Search hidden or ignored contentrg --hidden 'pattern' then rg -u 'pattern'Escalate only as needed
Files with matchesrg -l 'pattern' path/Use before opening files
Count individual matchesrg --count-matches 'pattern' path/-c counts matching lines, not matches
Machine-readable outputrg --json 'pattern' path/Best for tools and scripts
Lookaround or backreferencesrg -P '...' path/Requires PCRE2 support in the build
Multiline blocksrg -U '(?s)start.*end' fileMultiline is slower and more memory-hungry
Diagnose skipped filesrg --debug 'pattern' path/Shows ignore and skip reasons

Reading Guide

TaskRead
Correct command, flag, or output modereferences/commands.md
Config files, aliases, custom types, and environment setupreferences/configuration.md
Agent search workflows, filename discovery, shell pipelines, and deterministic outputreferences/patterns.md
Missing results, quoting issues, multiline surprises, JSON limits, and other trapsreferences/gotchas.md

Verified Behaviors

  1. rg --files respects ignore rules by default and excluded an ignored logs/app.log in local probes.
  2. .rgignore overrode .ignore, and --no-ignore restored access to the same ignored file.
  3. --hidden surfaced hidden content without turning off ignore handling.
  4. The order of -g flags changed the result set exactly as upstream documents: later globs overrode earlier ones.
  5. RIPGREP_CONFIG_PATH successfully loaded --smart-case and a custom web type from a config file.
  6. --json emitted begin, match, end, and summary messages in JSON Lines format.
  7. -U '(?s)...' matched across lines, and -P lookaround worked on this machine because the local build includes PCRE2.

Gotchas

  1. rg is not a byte-for-byte drop-in replacement for POSIX grep; it is the default search tool when speed, recursion, ignore handling, or Unicode-aware regex matter.
  2. Missing results are usually an ignore, hidden-file, glob-order, or quoting problem before they are a ripgrep bug. Run --debug before switching tools.
  3. --replace changes printed output only. It never edits files.
  4. --json is for search results, not every output mode. It does not combine with --files, -l, or -c.
  5. -P and -U are powerful but costlier than the default engine and normal line-oriented search. Use them deliberately.

Helper Scripts

  • scripts/probe_ripgrep.py builds a temporary corpus and verifies real rg behavior such as ignore precedence, JSON output, multiline matching, and PCRE2 support.
  • scripts/validate.py checks structure, frontmatter, references, required files, and Python syntax.
  • scripts/test_skill.py runs validation, checks eval coverage, verifies cross-references, and executes the ripgrep probe suite.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.37%
按下载量换算68

Claude

33.36%
按下载量换算68

Cursor

18.22%
按下载量换算37

Gemini CLI

10.15%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/jpcaparas/skills --skill ripgrep 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills