Open Anything
This skill helps the agent suggest the right command or action to open things:
- - Files and folders on disk
- URLs (web pages, docs, dashboards)
- Git repositories in a file explorer
- Logs, configs, or other local resources
It does not actually execute the commands itself; it tells the user what to run.
When to Use
Use this skill when the user says:
- - “打开某某文件 / 目录 / 日志”
- “帮我打开这个链接 / 页面”
- “想在资源管理器里打开这个项目 / 仓库”
- “how do I open this from the terminal”
and you need to translate that intent into a concrete open action.
OS-specific Conventions
Windows(PowerShell / CMD)
Prefer using start for most cases:
- - Open a folder in Explorer:
CODEBLOCK0
- - Open a specific file with its default app:
CODEBLOCK1
- - Open a URL in the default browser:
CODEBLOCK2
If the path might contain spaces, always wrap it in quotes.
macOS(for reference)
If the user is on macOS, suggest:
CODEBLOCK3
Linux(for reference)
If the user is on Linux with a desktop environment, suggest:
CODEBLOCK4
Common Patterns
Open the current project folder
From the project root:
CODEBLOCK5
CODEBLOCK6
CODEBLOCK7
Open a specific file mentioned by the user
If the user says “打开 logs/app.log”,assume it is relative to the project root:
CODEBLOCK8
(路径中有空格时同样加引号。)
Open a URL from text
When the user pastes or mentions a URL:
CODEBLOCK9
CODEBLOCK10
CODEBLOCK11
Open a Git repo in Explorer / Finder
If the user wants to “open the repo” visually:
- - Ensure you are in repo root, then:
- Windows:
CODEBLOCK12
- macOS:
CODEBLOCK13
- Linux:
CODEBLOCK14
Guidelines
- - Always respect the user’s OS:根据用户系统选择 Windows / macOS / Linux 命令。
- Prefer non-destructive commands:只负责“打开”,不要顺带修改、删除任何东西。
- Quote paths and URLs:凡是可能包含空格或特殊字符的路径与 URL,都加上引号。
- Clarify ambiguity briefly:如果用户说“打开它”但上下文里有多个可能的目标,先用一句话确认你指的是哪一个,再给命令。
打开任何内容
该技能帮助智能体建议打开事物的正确命令或操作:
- - 磁盘上的文件和文件夹
- URL(网页、文档、仪表盘)
- 文件资源管理器中的Git仓库
- 日志、配置文件或其他本地资源
它本身并不实际执行命令,而是告诉用户应该运行什么。
使用时机
当用户说出以下内容时使用该技能:
- - “打开某某文件 / 目录 / 日志”
- “帮我打开这个链接 / 页面”
- “想在资源管理器里打开这个项目 / 仓库”
- “how do I open this from the terminal”
并且你需要将该意图转化为具体的打开操作。
操作系统特定约定
Windows(PowerShell / CMD)
大多数情况下优先使用 start:
powershell
start .
start C:\path\to\folder
powershell
start C:\path\to\file.txt
powershell
start https://clawhub.ai
如果路径可能包含空格,始终用引号包裹。
macOS(供参考)
如果用户使用macOS,建议:
bash
open .
open /path/to/folder
open /path/to/file.txt
open https://clawhub.ai
Linux(供参考)
如果用户使用带桌面环境的Linux,建议:
bash
xdg-open .
xdg-open /path/to/folder
xdg-open /path/to/file.txt
xdg-open https://clawhub.ai
常见模式
打开当前项目文件夹
从项目根目录:
powershell
start .
bash
open .
bash
xdg-open .
打开用户提到的特定文件
如果用户说“打开 logs/app.log”,假设该路径相对于项目根目录:
powershell
start .\logs\app.log
(路径中有空格时同样加引号。)
从文本中打开URL
当用户粘贴或提到URL时:
powershell
start https://example.com
bash
open https://example.com
bash
xdg-open https://example.com
在资源管理器/Finder中打开Git仓库
如果用户想要以可视化方式“打开仓库”:
- Windows:
powershell
start .
- macOS:
bash
open .
- Linux:
bash
xdg-open .
指南
- - 始终尊重用户的操作系统:根据用户系统选择 Windows / macOS / Linux 命令。
- 优先使用非破坏性命令:只负责“打开”,不要顺带修改、删除任何东西。
- 引用路径和URL:凡是可能包含空格或特殊字符的路径与 URL,都加上引号。
- 简要澄清歧义:如果用户说“打开它”但上下文里有多个可能的目标,先用一句话确认你指的是哪一个,再给命令。