files

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Drive Files

Google Drive Files

Use this managed skill when the user wants to browse Google Drive files, inspect file metadata, create folders, share a file, or upload file/content into Drive.
This skill uses Shift's local Skill Router. Do not ask the user to paste Google credentials into chat.
当用户想要浏览Google Drive文件、查看文件元数据、创建文件夹、共享文件或向Drive上传文件/内容时,可使用此托管Skill。
该Skill使用Shift的本地Skill Router。请勿要求用户在聊天中粘贴Google凭证。

Invocation

调用

Base URL:
SHIFT_LOCAL_GATEWAY
Endpoint:
POST /skill-router/invoke
Request body to list files:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "list",
  "input": {
    "query": "mimeType = 'application/vnd.google-apps.folder'",
    "pageSize": 10,
    "orderBy": "modifiedTime desc"
  }
}
Request body to get file details:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "get",
  "input": {
    "fileId": "1AbCdEfGhIjKlMnOp"
  }
}
Request body to create a folder:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "create-folder",
  "input": {
    "name": "Launch assets",
    "parentIds": ["1AbCdEfGhIjKlMnOp"]
  }
}
Request body to upload a local file:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "upload",
  "input": {
    "filePath": "/tmp/launch.html",
    "name": "launch.html",
    "mimeType": "text/html",
    "parentIds": ["1AbCdEfGhIjKlMnOp"],
    "description": "Launch page draft"
  }
}
Precompiled code-skill helper for uploading raw content:
bash
node dist/index.js '{
  "operation": "upload-content",
  "name": "launch.html",
  "mimeType": "text/html",
  "content": "<html><body><h1>Launch</h1></body></html>",
  "parentIds": ["1AbCdEfGhIjKlMnOp"]
}'
Precompiled code-skill helper for converting uploaded content into a Google Doc:
bash
node dist/index.js '{
  "operation": "upload-content",
  "name": "launch.html",
  "mimeType": "text/html",
  "targetMimeType": "application/vnd.google-apps.document",
  "content": "<html><body><h1>Launch</h1></body></html>",
  "parentIds": ["1AbCdEfGhIjKlMnOp"]
}'
Request body to share a file:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "share",
  "input": {
    "fileId": "1AbCdEfGhIjKlMnOp",
    "type": "user",
    "role": "writer",
    "emailAddress": "teammate@example.com"
  }
}
基础URL:
SHIFT_LOCAL_GATEWAY
端点:
POST /skill-router/invoke
列出文件的请求体:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "list",
  "input": {
    "query": "mimeType = 'application/vnd.google-apps.folder'",
    "pageSize": 10,
    "orderBy": "modifiedTime desc"
  }
}
获取文件详情的请求体:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "get",
  "input": {
    "fileId": "1AbCdEfGhIjKlMnOp"
  }
}
创建文件夹的请求体:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "create-folder",
  "input": {
    "name": "Launch assets",
    "parentIds": ["1AbCdEfGhIjKlMnOp"]
  }
}
上传本地文件的请求体:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "upload",
  "input": {
    "filePath": "/tmp/launch.html",
    "name": "launch.html",
    "mimeType": "text/html",
    "parentIds": ["1AbCdEfGhIjKlMnOp"],
    "description": "Launch page draft"
  }
}
用于上传原始内容的预编译代码-Skill助手:
bash
node dist/index.js '{
  "operation": "upload-content",
  "name": "launch.html",
  "mimeType": "text/html",
  "content": "<html><body><h1>Launch</h1></body></html>",
  "parentIds": ["1AbCdEfGhIjKlMnOp"]
}'
用于将上传内容转换为Google Doc的预编译代码-Skill助手:
bash
node dist/index.js '{
  "operation": "upload-content",
  "name": "launch.html",
  "mimeType": "text/html",
  "targetMimeType": "application/vnd.google-apps.document",
  "content": "<html><body><h1>Launch</h1></body></html>",
  "parentIds": ["1AbCdEfGhIjKlMnOp"]
}'
共享文件的请求体:
json
{
  "skillProvider": "google-drive",
  "skill": "files",
  "action": "share",
  "input": {
    "fileId": "1AbCdEfGhIjKlMnOp",
    "type": "user",
    "role": "writer",
    "emailAddress": "teammate@example.com"
  }
}

Authentication

身份验证

This skill requires a Google Drive connection configured in Shift.
该Skill需要在Shift中配置好Google Drive连接。

Agent behavior

Agent行为

  1. Use
    list
    before
    get
    when the user has not provided a file id.
  2. Use
    upload
    when the user already has a local file path available on the runtime machine.
  3. Use
    node dist/index.js '<json payload>'
    for direct content uploads or Google Doc conversion.
  4. Prefer folders and metadata operations before attempting more complex file editing flows.
  5. Use
    share
    only when the user clearly names the recipient and required role.
  1. 当用户未提供文件ID时,先使用
    list
    再使用
    get
  2. 当用户在运行时机器上已有可用的本地文件路径时,使用
    upload
  3. 对于直接内容上传或Google Doc转换,使用
    node dist/index.js '<json payload>'
  4. 在尝试更复杂的文件编辑流程之前,优先处理文件夹和元数据操作。
  5. 仅当用户明确指定接收者和所需角色时,才使用
    share