yao-workspace
它能做什么
这项技能让智能体浏览并编辑 Yao 工作区中的文件,包括其他机器上的工作区。适合需要管理多台电脑上项目文件的人。
适用场景
- ✓当你想查看有哪些工作区以及它们在哪里运行时。
- ✓当你需要读取或写入另一台电脑上工作区中的文件时。
- ✓当你想浏览工作区中的文件夹时。
技能链接
https://github.com/YaoApp/yao/blob/main/tools/skills/yao-workspace/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请列出我的工作区,然后显示主项目工作区 src 文件夹中的文件。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会列出工作区,然后通过路径查看你选择的那个工作区内部。它可以读取文件的文本或 base64 内容,也可以写入文件。对于同一台电脑上的文件,智能体会改用其常规文件工具。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Workspace Tools
Five tools for managing workspaces and file I/O, called via bash.
workspace_list
List workspaces with summary info. Use workspace_get for full details.
tai tool workspace_list '{}'
tai tool workspace_list '{"node": "tai-node-1"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
node |
string | no | Filter by Tai node ID |
workspace_get
Get full workspace details: name, owner, node, labels, timestamps.
tai tool workspace_get '{"id": "ws-abc123"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Workspace ID |
workspace_file_list
List files and directories in a workspace path.
tai tool workspace_file_list '{"id": "ws-abc123"}'
tai tool workspace_file_list '{"id": "ws-abc123", "path": "src/components"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Workspace ID |
path |
string | no | Directory path (default ".") |
workspace_file_read
Read file content from workspace. Returns text (UTF-8) or base64 encoded.
tai tool workspace_file_read '{"id": "ws-abc123", "path": "README.md"}'
tai tool workspace_file_read '{"id": "ws-abc123", "path": "image.png", "encoding": "base64"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Workspace ID |
path |
string | yes | File path relative to workspace root |
encoding |
string | no | "text" (default) or "base64" |
workspace_file_write
Write content to a file in workspace. For binary files, use base64 encoding.
tai tool workspace_file_write '{"id": "ws-abc123", "path": "output.txt", "content": "Hello World"}'
tai tool workspace_file_write '{"id": "ws-abc123", "path": "data.bin", "content": "base64data...", "encoding": "base64"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | yes | Workspace ID |
path |
string | yes | File path relative to workspace root |
content |
string | yes | File content (text or base64 encoded) |
encoding |
string | no | "text" (default) or "base64" |
Typical Workflow
workspace_list— discover available workspacesworkspace_get— get full details (node, labels)workspace_file_list— browse directory structureworkspace_file_read— read specific filesworkspace_file_write— write output files
Guidelines
- Use
workspace_listfor discovery,workspace_getfor details (list returns summaries only) - For large files (>1MB), prefer local filesystem operations if the workspace is mounted in the sandbox
- Use
encoding: "base64"for binary files (images, archives, etc.) - File paths are relative to the workspace root — do not use absolute paths
- The current sandbox workspace ID is available via
$CTX_WORKSPACE_ID - All output is JSON
常见问题
这是用于本地文件的工具吗?
不是。对于同一台电脑上的文件,智能体使用其常规文件工具。
它能看到其他节点上的工作区吗?
可以。工作区可以按其运行的节点进行筛选。
读取文件返回什么格式?
UTF-8 格式的文本,二进制内容则为 base64。
详情
作者的原始描述
Workspace file I/O expert. ALWAYS invoke this skill when you need to list workspaces, read or write files in a workspace on a remote node, or browse workspace directories. Use this for cross-node file operations — for local sandbox files, use standard filesystem tools instead.
repo: YaoApp/yao
热度
- GitHub 星标
- 8.3k
- 排名
- #12482
- 许可证
- —
- 更新时间
- 2026/10/19
评论
- …