← 返回 Skills 市场
otman-ai

Google Drive

作者 Otman Heddouch · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
105
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install googledrive-maton
功能描述
Access and manage Google Drive files, folders, metadata, uploads, downloads, and sharing via the Google Drive API with OAuth authentication.
使用说明 (SKILL.md)

Google Drive (Maton Gateway) – cURL Guide\r

\r Access the Google Drive API with managed OAuth authentication using cURL.\r \r ---\r \r

🔹 Base URL\r

\r https://gateway.maton.ai/google-drive/{native-api-path}\r \r \r ---\r \r

🔹 Authentication\r

\r All requests require your API key:\r \r

export MATON_API_KEY="YOUR_API_KEY"\r
Header:\r
\r
Authorization: Bearer $MATON_API_KEY\r
🚀 Quick Start\r
List Files\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files?pageSize=10" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
🔗 Connection Management\r
List Connections\r
curl -X GET "https://ctrl.maton.ai/connections?app=google-drive&status=ACTIVE" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Create Connection\r
curl -X POST "https://ctrl.maton.ai/connections" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{"app": "google-drive"}'\r
Get Connection\r
curl -X GET "https://ctrl.maton.ai/connections/{connection_id}" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Delete Connection\r
curl -X DELETE "https://ctrl.maton.ai/connections/{connection_id}" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Specify Connection\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files?pageSize=10" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Maton-Connection: CONNECTION_ID"\r
📁 File Operations\r
List Files\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files?pageSize=10" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Search Files\r
curl -G "https://gateway.maton.ai/google-drive/drive/v3/files" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  --data-urlencode "q=name contains 'report'" \\r
  --data-urlencode "pageSize=10"\r
Only Folders\r
curl -G "https://gateway.maton.ai/google-drive/drive/v3/files" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  --data-urlencode "q=mimeType='application/vnd.google-apps.folder'"\r
Files in Folder\r
curl -G "https://gateway.maton.ai/google-drive/drive/v3/files" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  --data-urlencode "q='FOLDER_ID' in parents"\r
Select Fields\r
curl -g "https://gateway.maton.ai/google-drive/drive/v3/files?fields=files(id,name,mimeType,createdTime,modifiedTime,size)" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Get File Metadata\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}?fields=id,name,mimeType,size,createdTime" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Download File\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}?alt=media" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -o file.bin\r
Export Google Docs (PDF)\r
curl -X GET "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}/export?mimeType=application/pdf" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -o file.pdf\r
✏️ Create & Update\r
Create File\r
curl -X POST "https://gateway.maton.ai/google-drive/drive/v3/files" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "name": "New Document",\r
    "mimeType": "application/vnd.google-apps.document"\r
  }'\r
Create Folder\r
curl -X POST "https://gateway.maton.ai/google-drive/drive/v3/files" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "name": "New Folder",\r
    "mimeType": "application/vnd.google-apps.folder"\r
  }'\r
Update Metadata\r
curl -X PATCH "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{"name": "Renamed File"}'\r
Move File\r
curl -X PATCH "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}?addParents=NEW_FOLDER_ID&removeParents=OLD_FOLDER_ID" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Delete File\r
curl -X DELETE "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
Copy File\r
curl -X POST "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}/copy" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{"name": "Copy of File"}'\r
⬆️ Uploads\r
Simple Upload (≤5MB)\r
curl -X POST "https://gateway.maton.ai/google-drive/upload/drive/v3/files?uploadType=media" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: text/plain" \\r
  --data-binary @file.txt\r
Multipart Upload\r
curl -X POST "https://gateway.maton.ai/google-drive/upload/drive/v3/files?uploadType=multipart" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: multipart/related; boundary=boundary" \\r
  --data-binary $'--boundary\r\r
Content-Type: application/json; charset=UTF-8\r\r
\r\r
{"name": "myfile.txt", "description": "My file"}\r\r
--boundary\r\r
Content-Type: text/plain\r\r
\r\r
Hello file content\r\r
--boundary--'\r
Resumable Upload\r
Step 1: Start Session\r
curl -i -X POST "https://gateway.maton.ai/google-drive/upload/drive/v3/files?uploadType=resumable" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json; charset=UTF-8" \\r
  -H "X-Upload-Content-Type: application/octet-stream" \\r
  -H "X-Upload-Content-Length: \x3CFILE_SIZE>" \\r
  -d '{"name": "large_file.bin"}'\r
Step 2: Upload File\r
curl -X PUT "\x3CUPLOAD_URL>" \\r
  -H "Content-Length: \x3CFILE_SIZE>" \\r
  -H "Content-Type: application/octet-stream" \\r
  --data-binary @large_file.bin\r
Update File Content\r
curl -X PATCH "https://gateway.maton.ai/google-drive/upload/drive/v3/files/{fileId}?uploadType=media" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: text/plain" \\r
  --data-binary @file.txt\r
🔐 Sharing\r
curl -X POST "https://gateway.maton.ai/google-drive/drive/v3/files/{fileId}/permissions" \\r
  -H "Authorization: Bearer $MATON_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "role": "reader",\r
    "type": "user",\r
    "emailAddress": "[email protected]"\r
  }'\r
🧠 Query Examples\r
name contains 'report'\r
mimeType = 'application/pdf'\r
'folderId' in parents\r
trashed = false\r
modifiedTime > '2024-01-01T00:00:00'\r
⚠️ Notes\r
Use -G for query parameters\r
\r
Use --data-binary for file uploads\r
\r
Use -o to save files\r
\r
Use curl -g when URL contains brackets\r
\r
Pagination uses nextPageToken\r
\r
❗ Error Codes\r
Status	Meaning\r
400	Missing Google Drive connection\r
401	Invalid API key\r
429	Rate limited\r
4xx/5xx	Google API error\r
🔧 Troubleshooting\r
Check API Key\r
echo $MATON_API_KEY\r
Test Connection\r
curl -X GET "https://ctrl.maton.ai/connections" \\r
  -H "Authorization: Bearer $MATON_API_KEY"\r
📌 Important\r
✔ Correct:\r
\r
https://gateway.maton.ai/google-drive/drive/v3/files\r
❌ Incorrect:\r
\r
https://gateway.maton.ai/drive/v3/files
安全使用建议
Key points before installing: (1) The SKILL.md requires a MATON_API_KEY and uses maton.ai gateways to access Google Drive and to create/manage OAuth 'connections' — you must trust maton.ai to handle your Drive data and connection tokens. (2) The skill metadata does not declare any required credentials or link to source/homepage; this mismatch is a red flag — ask the publisher for a source repo, privacy/security documentation, and an explanation for the missing declared env var. (3) Prefer official Google Drive integrations or skills from known publishers; if you do use this skill, restrict the MATON_API_KEY to minimal scopes, store it securely, and avoid enabling autonomous invocation unless you fully trust the provider. (4) If you need help vetting the Maton service, request its homepage, documentation, and terms of service and verify that it is an appropriate intermediary for your data.
功能分析
Type: OpenClaw Skill Name: googledrive-maton Version: 1.0.0 The skill bundle consists of documentation (Skill.md) providing instructions and cURL examples for accessing Google Drive via the Maton API gateway (gateway.maton.ai). It contains no executable code, obfuscation, or malicious instructions; all provided commands are standard API interactions for file management, search, and uploads consistent with the stated purpose.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
The described capability (manage Google Drive) aligns with the cURL examples that call a Maton-managed Google Drive gateway (gateway.maton.ai). However the skill metadata declares no required credentials or primary credential even though the runtime instructions explicitly require MATON_API_KEY and Maton connection management — this is an inconsistency.
Instruction Scope
SKILL.md instructs the agent to: set and send MATON_API_KEY; call gateway.maton.ai for Drive API operations; call ctrl.maton.ai to create/list/delete 'connections' (which likely manage OAuth links to user Google accounts); and optionally include a Maton-Connection header. These instructions send potentially sensitive Drive data and connection management to a third party (maton.ai). The instructions do not reference other local files or environment variables, but they do require a secret that is not declared in the skill manifest.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing will be written to disk by an installer. That lowers some risk, but it does not eliminate the risk of network calls described in SKILL.md.
Credentials
The runtime examples require MATON_API_KEY (an API key/token) but the skill's metadata lists no required env vars or primary credential. Requesting an API key that grants access to a third‑party gateway which can access your Google Drive is a high‑sensitivity operation and should be explicitly declared. The skill also encourages creating/using 'connections' that likely grant OAuth access to Google accounts — this is powerful access and should be justified and visible in the metadata.
Persistence & Privilege
always is false and the skill is user-invocable; model invocation is allowed (normal). Note: because the skill will use a sensitive API key and can be invoked autonomously, there is an increased blast radius if you grant a key — verify trust in the Maton gateway before enabling autonomous use.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install googledrive-maton
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /googledrive-maton 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release. - Added comprehensive cURL guide for Google Drive API via Maton Gateway. - Included sections for authentication, connection management, file operations, uploads, sharing permissions, and troubleshooting. - Provided ready-to-use cURL examples for all major operations (listing, searching, managing files, uploads, exports, permissions). - Listed important notes, query examples, error codes, and correct/incorrect endpoint usage.
元数据
Slug googledrive-maton
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Google Drive 是什么?

Access and manage Google Drive files, folders, metadata, uploads, downloads, and sharing via the Google Drive API with OAuth authentication. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 105 次。

如何安装 Google Drive?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install googledrive-maton」即可一键安装,无需额外配置。

Google Drive 是免费的吗?

是的,Google Drive 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Google Drive 支持哪些平台?

Google Drive 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Google Drive?

由 Otman Heddouch(@otman-ai)开发并维护,当前版本 v1.0.0。

💬 留言讨论