file-search by 0xdarkmatter/claude-mods
npx skills add https://github.com/0xdarkmatter/claude-mods --skill file-search现代化的文件与内容搜索工具。
# 按名称查找
fd config # 包含 "config" 的文件
fd -e py # Python 文件
# 按类型查找
fd -t f config # 仅文件
fd -t d src # 仅目录
# 排除
fd -E node_modules # 排除目录
fd -E "*.min.js" # 排除模式
# 执行命令
fd -e py -x wc -l # 每个文件的行数
# 简单搜索
rg "TODO" # 查找 TODO
rg -i "error" # 不区分大小写
# 按文件类型
rg -t py "import" # 仅 Python 文件
rg -t js -t ts "async" # JS 和 TS 文件
# 上下文
rg -C 3 "function" # 前后 3 行
# 输出模式
rg -l "TODO" # 仅文件名
rg -c "TODO" # 每个文件的匹配数
# 查找并选择
fd | fzf
# 带预览
fd | fzf --preview 'bat --color=always {}'
# 多选
fd -e ts | fzf -m | xargs code
# 查找文件,搜索内容
fd -e py -x rg "async def" {}
# 搜索,选择,打开
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vim
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 任务 | 命令 |
|---|---|
| 查找 TS 文件 | fd -e ts |
| 在 src 中查找 | fd -e ts src/ |
| 搜索模式 | rg "pattern" |
| 在特定类型中搜索 | rg -t py "import" |
| 包含匹配的文件 | rg -l "pattern" |
| 统计匹配数 | rg -c "pattern" |
| 交互式 | `fd |
| 带预览 | `fd |
| 提示 | 原因 |
|---|---|
两者都遵循 .gitignore | 自动跳过 node_modules, dist |
使用 -t 而非 -g | 类型标志更快 |
| 缩小路径范围 | rg pattern src/ 更快 |
对字面量使用 -F | 避免正则表达式开销 |
如需详细模式,请加载:
./references/advanced-workflows.md - Git 集成、Shell 函数、高级工作流每周安装数
74
代码仓库
GitHub 星标数
8
首次出现
2026 年 1 月 24 日
安全审计
安装于
codex67
opencode67
gemini-cli65
cursor61
github-copilot58
amp54
Modern file and content search.
# Find by name
fd config # Files containing "config"
fd -e py # Python files
# By type
fd -t f config # Files only
fd -t d src # Directories only
# Exclude
fd -E node_modules # Exclude directory
fd -E "*.min.js" # Exclude pattern
# Execute command
fd -e py -x wc -l # Line count per file
# Simple search
rg "TODO" # Find TODO
rg -i "error" # Case-insensitive
# By file type
rg -t py "import" # Python files only
rg -t js -t ts "async" # JS and TS
# Context
rg -C 3 "function" # 3 lines before/after
# Output modes
rg -l "TODO" # File names only
rg -c "TODO" # Count per file
# Find and select
fd | fzf
# With preview
fd | fzf --preview 'bat --color=always {}'
# Multi-select
fd -e ts | fzf -m | xargs code
# Find files, search content
fd -e py -x rg "async def" {}
# Search, select, open
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vim
| Task | Command |
|---|---|
| Find TS files | fd -e ts |
| Find in src | fd -e ts src/ |
| Search pattern | rg "pattern" |
| Search in type | rg -t py "import" |
| Files with match | rg -l "pattern" |
| Count matches | rg -c "pattern" |
| Tip | Why |
|---|---|
Both respect .gitignore | Auto-skip node_modules, dist |
Use -t over -g | Type flags are faster |
| Narrow the path | rg pattern src/ faster |
Use -F for literals | Avoids regex overhead |
For detailed patterns, load:
./references/advanced-workflows.md - Git integration, shell functions, power workflowsWeekly Installs
74
Repository
GitHub Stars
8
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex67
opencode67
gemini-cli65
cursor61
github-copilot58
amp54
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
118,000 周安装
Airflow任务血缘关系标注指南:使用Inlets和Outlets实现数据血缘追踪
445 周安装
Twilio通信开发指南:短信发送与验证码API集成实战教程
455 周安装
语音AI开发指南:实时语音应用架构与延迟优化实战
452 周安装
Turso数据库调试指南:SQLite兼容性、字节码对比与Rust日志记录
453 周安装
CI/CD流水线专家指南:GitHub Actions、GitLab CI、Jenkins安全高效部署
451 周安装
macOS开发专家指南:SwiftUI、SwiftData、AppKit与macOS 26(Tahoe)开发实践
453 周安装
| Interactive |
| `fd |
| With preview | `fd |