一键导入
ripgrep
Use ripgrep (rg) for fast codebase search, symbol lookup, reference discovery, and project analysis.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use ripgrep (rg) for fast codebase search, symbol lookup, reference discovery, and project analysis.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ripgrep |
| description | Use ripgrep (rg) for fast codebase search, symbol lookup, reference discovery, and project analysis. |
Use rg as the default search tool for source code.
Use rg whenever you need to:
Prefer rg over grep, find | grep, or other recursive search tools.
Search for the exact identifier whenever possible.
Preferred:
rg -n "UserService"
Avoid unnecessarily broad patterns:
rg ".*UserService.*"
When the target location is known, search only the relevant directory.
Example:
rg -n "UserService" src/
Restrict the search to relevant source files whenever possible.
Examples:
rg -n "UserService" -t ts
rg -n "UserService" -t js
rg -n "UserService" -t py
Avoid scanning unrelated files.
By default, respect:
.gitignore.ignore.rgignoreDo not use:
rg -uuu
unless hidden, generated, or ignored files are explicitly required.
Find files:
rg --files
Find definitions:
rg -n "class User"
rg -n "function login"
Find references:
rg -n "UserService"
Find configuration:
rg -n "API_URL"
rg -n "TOKEN"
Find TODOs:
rg -n "TODO|FIXME"
Use PCRE (-P) only when advanced regular expressions are required.
Use multiline mode (-U) only for true multiline searches.
Avoid enabling either option by default.
When investigating existing code:
ALWAYS:
rg -n to include line numbers.NEVER:
When searching a codebase:
rg.grep -r when rg is available.Use the Conventional Commits specification to write Git Commit Messages, automatically applying it when creating, modifying, or optimizing commit messages.
Use this skill whenever modifying an existing codebase. Ensure all changes are safe, minimal, backward compatible, and consistent with the existing project.
Use this skill whenever generating, modifying, refactoring, or reviewing code involving internationalization (i18n). Ensure all translation calls follow a consistent set of i18n rules.
Use this skill whenever working with Node.js, npm, npx, or Node.js version management. Always use nodapt to execute Node.js-related commands.