跳到主要内容
知仓学习社ZHICANG

yao-workspace

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…

不碰外部(只输出文字)无严重或高危命中YaoApp/yao

它会碰到什么

扫了多少1 个文本文件,4 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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

  1. workspace_list — discover available workspaces
  2. workspace_get — get full details (node, labels)
  3. workspace_file_list — browse directory structure
  4. workspace_file_read — read specific files
  5. workspace_file_write — write output files

Guidelines

  • Use workspace_list for discovery, workspace_get for 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

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 7,962
本站分层T1
该仓技能数12
原文件路径tools/skills/yao-workspace/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 12 个技能