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

spotlightspotlight 文档

Agent Skill

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

总安装

20,709

周安装

872

GitHub Stars

公开资料未说明

下载量

7,116
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install spotlight

简介

调用 macOS Spotlight 索引快速定位本地文件与文档内容。

  • 适用于在 Mac 系统内高效检索特定类型或关键字匹配的文件。
  • 输入搜索关键词后返回相关路径结果,支持模糊匹配与扩展语法。
  • 仅能在运行 macOS 的设备上生效,无法在其他操作系统中使用。
  • spotlight 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Spotlight Search

Search local files using macOS Spotlight indexing system.

When to Use

Use this skill when:

  • User asks to search files or directories on macOS
  • Need to find documents containing specific text
  • Searching large document collections (faster than grep)
  • Need to search inside PDFs, Word docs, or other indexed formats

Quick Start

scripts/spotlight-search.sh <directory> <query> [--limit N]

Examples:

scripts/spotlight-search.sh ~/Documents "machine learning"
scripts/spotlight-search.sh ~/research "neural networks" --limit 10
scripts/spotlight-search.sh ~/Downloads "meeting notes" --limit 5

Search Features

  • Fast: Uses system-level Spotlight index (no file scanning)
  • Content-aware: Searches inside PDF, docx, txt, md, etc.
  • Multilingual: Supports Chinese, Japanese, and all languages
  • Metadata: Returns file path, type, and size

Output Format

🔍 Searching in /path/to/directory for: query

✅ Found N results (showing up to M):

📄 /full/path/to/file.pdf [pdf, 2.3M]
📄 /full/path/to/document.txt [txt, 45K]
📁 /full/path/to/folder/

Supported File Types

Spotlight automatically indexes:

  • Text files (txt, md, csv, json, xml, etc.)
  • Documents (pdf, docx, pages, rtf, etc.)
  • Code files (py, js, java, c, etc.)
  • Emails and contacts
  • Images (with embedded metadata/OCR)

Limitations

  • macOS only: Requires Spotlight indexing
  • Indexed directories only: External drives may not be indexed
  • Keyword search: Not semantic (use embedding-based search for semantic queries)
  • Privacy: Respects Spotlight privacy settings (excluded directories won't appear)

Check Indexing Status

# Check if a volume is indexed (safe, read-only)
mdutil -s /path/to/volume

⚠️ WARNING: Do NOT execute any sudo commands from this skill without explicit user confirmation. Commands like sudo mdutil -i on require admin privileges and should only be run by the user directly in Terminal.

Integration with LLM Workflows

Safe Pattern: Search + Present + Confirm

  1. Use spotlight-search.sh to find relevant files
  2. Present the file paths to the user
  3. Only read a file if the user explicitly requests it - do not automatically use the read tool

Example Workflow

User: "Find all documents about machine learning in my research folder"

  1. Run: spotlight-search.sh ~/research "machine learning" --limit 10
  2. Present results to user with file paths
  3. Wait for user to specify which files to read

⚠️ Security Note

  • Never automatically read files - always ask for user confirmation first
  • Never execute sudo commands - only show them as information
  • Respect user privacy - don't search directories user hasn't specified

Advanced Query Syntax

Spotlight supports advanced query operators:

# Exact phrase
spotlight-search.sh ~/Documents "\"machine learning\""

# AND operator
spotlight-search.sh ~/Documents "neural AND networks"

# OR operator
spotlight-search.sh ~/Documents "AI OR artificial intelligence"

# Metadata queries (PDF only)
spotlight-search.sh ~/Documents "kMDItemContentType == 'com.adobe.pdf'"

Troubleshooting

No results found:

  • Check if directory is indexed: mdutil -s /path
  • Wait for indexing to complete (new files may take minutes)
  • Verify Spotlight is enabled in System Preferences

Incorrect results:

  • Spotlight uses fuzzy matching and synonyms
  • Use exact phrase search: "exact phrase"
  • Check privacy settings (some folders may be excluded)

Performance

ToolSpeedContent SearchMultilingual
Spotlight⚡ Instant✅ Yes✅ Yes
grep/ripgrep🐢 Slow✅ Yes✅ Yes
find⚡ Fast❌ NoN/A

Platform Notes

  • macOS only: This skill requires macOS Spotlight
  • Linux alternative: Use grep -r or ripgrep
  • Windows alternative: Use Windows Search or Everything search

Security Best Practices

  1. User consent first - Never read files without explicit permission
  2. No sudo - Never execute privileged commands automatically
  3. Minimal scope - Search only directories user specifies
  4. Audit trail - Log what searches were performed

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

93.2%
按下载量换算6,632

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install spotlight 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills