技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 1 · 2.4k · 9 current installs · 9 all-time installs
⭐ 1
安装量(当前) 9
🛡 VirusTotal :良性 · OpenClaw :良性
Package:arnarsson/ripgrep
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill is an instruction-only ripgrep (rg) cheat-sheet and examples; its requirements and instructions are consistent with that purpose and do not request credentials or unusual system access.
目的
The name/description match the instructions (rg usage examples). One minor inconsistency: the registry-level metadata you provided lists no install spec or required binaries, but the included SKILL.md contains metadata declaring a dependency on the 'rg' binary and provides brew/apt install entries. That discrepancy is likely benign (the SKILL.md is supplying install hints), but it is worth noting.
说明范围
SKILL.md provides command-line examples and usage tips for ripgrep only. It does not instruct the agent to read unrelated system files or exfiltrate data. The only file/config reference is ~/.ripgreprc (user ripgrep config), which is reasonable. A replacement example uses piped xargs + sed -i which is potentially destructive if run without review, but that is a normal command-line pattern rather than covert behavior.
安装机制
SKILL.md contains install metadata that suggests installation via standard package managers (brew, apt), which are low-risk sources. However, the registry entry shows 'No install spec' at the top-level while SKILL.md includes install hints — confirm which install mechanism the platform will actually execute or present to the user.
证书
No environment variables, credentials, or config paths are requested beyond an optional user ripgrep config (~/.ripgreprc). Nothing disproportionate is requested for the stated purpose.
持久
Skill does not request always:true and is user-invocable only. It does not request or modify other skills' configs or persistent platform-wide privileges.
综合结论
This skill is an instruction-only reference for ripgrep and appears coherent with that purpose. Before using it: (1) Confirm whether your platform will actually install 'rg' automatically or merely show the brew/apt hints — the SKILL.md includes install suggestions but the registry entry at the top-level shows no install spec. (2) Be careful with the replacement examples that pipe to xargs sed -i; those will modify files in place — run preview…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Ripgrep」。简介:Blazingly fast text search tool - recursively searches directories for regex pa…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/arnarsson/ripgrep/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: ripgrep
description: Blazingly fast text search tool - recursively searches directories for regex patterns with respect to gitignore rules.
homepage: https://github.com/BurntSushi/ripgrep
metadata: {"clawdbot":{"emoji":"🔎","requires":{"bins":["rg"]},"install":[{"id":"brew","kind":"brew","formula":"ripgrep","bins":["rg"],"label":"Install ripgrep (brew)"},{"id":"apt","kind":"apt","package":"ripgrep","bins":["rg"],"label":"Install ripgrep (apt)"}]}}
---
# ripgrep (rg)
Fast, smart recursive search. Respects `.gitignore` by default.
## Quick Start
### Basic search
```bash
# Search for "TODO" in current directory
rg "TODO"
# Case-insensitive search
rg -i "fixme"
# Search specific file types
rg "error" -t py # Python files only
rg "function" -t js # JavaScript files
```
### Common patterns
```bash
# Whole word match
rg -w "test"
# Show only filenames
rg -l "pattern"
# Show with context (3 lines before/after)
rg -C 3 "function"
# Count matches
rg -c "import"
```
## Advanced Usage
### File type filtering
```bash
# Multiple file types
rg "error" -t py -t js
# Exclude file types
rg "TODO" -T md -T txt
# List available types
rg --type-list
```
### Search modifiers
```bash
# Regex search
rg "user_d+"
# Fixed string (no regex)
rg -F "function()"
# Multiline search
rg -U "start.*end"
# Only show matches, not lines
rg -o "https?://[^s]+"
```
### Path filtering
```bash
# Search specific directory
rg "pattern" src/
# Glob patterns
rg "error" -g "*.log"
rg "test" -g "!*.min.js"
# Include hidden files
rg "secret" --hidden
# Search all files (ignore .gitignore)
rg "pattern" --no-ignore
```
## Replacement Operations
```bash
# Preview replacements
rg "old_name" --replace "new_name"
# Actually replace (requires extra tool like sd)
rg "old_name" -l | xargs sed -i 's/old_name/new_name/g'
```
## Performance Tips
```bash
# Parallel search (auto by default)
rg "pattern" -j 8
# Skip large files
rg "pattern" --max-filesize 10M
# Memory map files
rg "pattern" --mmap
```
## Common Use Cases
**Find TODOs in code:**
```bash
rg "TODO|FIXME|HACK" --type-add 'code:*.{rs,go,py,js,ts}' -t code
```
**Search in specific branches:**
```bash
git show branch:file | rg "pattern"
```
**Find files containing multiple patterns:**
```bash
rg "pattern1" | rg "pattern2"
```
**Search with context and color:**
```bash
rg -C 2 --color always "error" | less -R
```
## Comparison to grep
- **Faster:** Typically 5-10x faster than grep
- **Smarter:** Respects `.gitignore`, skips binary files
- **Better defaults:** Recursive, colored output, line numbers
- **Easier:** Simpler syntax for common tasks
## Tips
- `rg` is often faster than `grep -r`
- Use `-t` for file type filtering instead of `--include`
- Combine with other tools: `rg pattern -l | xargs tool`
- Add custom types in `~/.ripgreprc`
- Use `--stats` to see search performance
## Documentation
GitHub: https://github.com/BurntSushi/ripgrep
User Guide: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md