Skip to main content

google-drive

Manage Google Drive files and folders. Upload, download, share, and organize files via Drive API.

跳到安装

来源信息

仓库
Kernel8901/ai-agent-skills-classification
最近来源活动
2026年4月4日 15:26
检测到的 SKILL.md 语言
英语
星标
4
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
google-drive
description
Manage Google Drive files and folders. Upload, download, share, and organize files via Drive API.
metadata
{"clawdbot":{"emoji":"📁","requires":{"env":"[Truncated]"}}}
# Google Drive Cloud file storage and sharing. ## Environment ```bash export GOOGLE_ACCESS_TOKEN="ya29.xxxxxxxxxx" ``` ## List Files ```bash curl "https://www.googleapis.com/drive/v3/files?pageSize=20" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" ``` ## Search Files ```bash curl "https://www.googleapis.com/drive/v3/files?q=name%20contains%20'report'" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" ``` ## Get File Metadata ```bash curl "https://www.googleapis.com/drive/v3/files/{fileId}?fields=*" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" ``` ## Download File ```bash curl "https://www.googleapis.com/drive/v3/files/{fileId}?alt=media" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \ -o downloaded_file.pdf ``` ## Upload File ```bash curl -X POST "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \ -F "metadata={\"name\": \"myfile.txt\"};type=application/json" \ -F "file=@localfile.txt" ``` ## Create Folder ```bash curl -X POST "https://www.googleapis.com/drive/v3/files" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "New Folder", "mimeType": "application/vnd.google-apps.folder"}' ``` ## Share File ```bash curl -X POST "https://www.googleapis.com/drive/v3/files/{fileId}/permissions" \ -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"role": "reader", "type": "user", "emailAddress": "user@example.com"}' ``` ## Links - Console: https://console.cloud.google.com/apis/library/drive.googleapis.com - Docs: https://developers.google.com/drive/api/v3/reference
在 GitHub 查看