Token导航 LogoToken导航

Agent Skill · 研究检索

google-drive(Google Drive 文件管理)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

google-drive 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,596。

总安装 194周安装 8GitHub Stars 4下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:google-drive(Google Drive 文件管理)
来源仓库:https://github.com/arlenagreer/claude_configuration_docs
仓库路径:skills/google-drive
安装命令:
npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill google-drive
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill google-drive

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于 Google Drive 文件的上传、下载、搜索与权限管理。支持文件夹组织、内容预览与批量操作,提升云端资源管理效率。基于 Ruby 脚本实现,共享认证体系,便于与其他 Google 服务协同使用。安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加。

操作前应评估存储配额与网络稳定性,防止大文件传输中断。

来源仓库内路径:skills/google-drive

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

google-drive 怎么安装?

在终端执行 npx skills add https://github.com/arlenagreer/claude_configuration_docs --skill google-dri…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

google-drive 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

google-drive 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

google-drive 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

google-drive 用的人多吗?

公开数据是累计安装 194 次,近一周安装 8 次,下载 63 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

google-drive 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
google-drive

Google Drive 文件管理 · 本页

1944接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Google Drive Management Skill

Overview

Provide comprehensive Google Drive file and folder management capabilities through Ruby-based scripts with shared authentication. Enable full CRUD operations (Create, Read, Update, Delete) on Google Drive files and folders.

When to Use This Skill

Use this skill for ANY Google Drive operations:

  • File Management: Upload, download, read, update, delete files
  • Folder Management: Create, list, organize folders
  • Search: Find files and folders by name, type, or content
  • Sharing: Manage file and folder permissions
  • Content Reading: Read text file contents directly
  • Metadata: View and update file properties

Authentication

This skill shares authentication with the calendar and contacts skills via ~/.claude/.google/token.json. All skills use the same OAuth token with scopes:

  • https://www.googleapis.com/auth/calendar (Calendar access)
  • https://www.googleapis.com/auth/contacts (Contacts read/write)
  • https://www.googleapis.com/auth/drive (Google Drive full access)

When any skill refreshes the token, all skills benefit from the updated authentication.

First-Time Setup

If Google Drive scope not already configured:

  1. Ensure ~/.claude/.google/client_secret.json exists with OAuth credentials
  2. Run any Google Drive operation - the script will prompt for authorization
  3. The token will be stored and shared with calendar and contacts skills

Re-authorization for New Scope

Since the Drive scope is new, you'll need to re-authorize once:

# Delete the existing token to force re-authorization
rm ~/.claude/.google/token.json

# Run any Drive operation to trigger OAuth flow
~/.claude/skills/google-drive/scripts/drive_manager.rb --list

Follow the authorization URL and enter the code when prompted.

Core Script: drive_manager.rb

Location: scripts/drive_manager.rb

Comprehensive Ruby script providing all Google Drive operations through the Drive API v3.

List Files and Folders

Browse your Google Drive:

# List all files (default: 100 items)
drive_manager.rb --list

# List with custom page size
drive_manager.rb --list --page-size 50

# List only folders
drive_manager.rb --list --type folder

# List only specific file types
drive_manager.rb --list --type "application/pdf"

# Get next page using token from previous response
drive_manager.rb --list --page-token "NEXT_PAGE_TOKEN"

Returns JSON array of files with metadata (id, name, mimeType, createdTime, modifiedTime, size, webViewLink).

Search Files

Find files by name or query:

# Search by name (partial match)
drive_manager.rb --search "project report"

# Search by exact name
drive_manager.rb --search "Budget 2024.xlsx" --exact

# Search in specific folder
drive_manager.rb --search "invoice" --folder "FOLDER_ID"

# Advanced query (full Drive API query syntax)
drive_manager.rb --query "mimeType='application/pdf' and modifiedTime > '2024-01-01'"

Get File Details

Retrieve complete information about a specific file:

# Get by file ID
drive_manager.rb --get "FILE_ID"

# Get with download URL
drive_manager.rb --get "FILE_ID" --include-download-url

Returns full file metadata including sharing permissions and download links.

Read File Content

Read text-based file contents directly:

# Read text file content
drive_manager.rb --read "FILE_ID"

# Read with specific export format (for Google Docs)
drive_manager.rb --read "FILE_ID" --export-format "text/plain"

Supported File Types:

  • Plain text files (.txt)
  • Google Docs (exports as text/plain, text/html, or application/pdf)
  • Google Sheets (exports as CSV, XLSX, or PDF)
  • CSV files
  • JSON files
  • Markdown files (.md)

Upload Files

Upload files to Google Drive:

# Upload file to root
drive_manager.rb --upload "/path/to/file.pdf"

# Upload to specific folder
drive_manager.rb --upload "/path/to/file.pdf" --folder "FOLDER_ID"

# Upload with custom name
drive_manager.rb --upload "/path/to/file.pdf" --name "Custom Name.pdf"

# Upload with description
drive_manager.rb --upload "/path/to/file.pdf" --description "Q4 Financial Report"

Download Files

Download files from Google Drive:

# Download to current directory
drive_manager.rb --download "FILE_ID"

# Download to specific location
drive_manager.rb --download "FILE_ID" --output "/path/to/save/file.pdf"

# Download Google Docs as PDF
drive_manager.rb --download "FILE_ID" --export-format "application/pdf"

# Download Google Sheets as Excel
drive_manager.rb --download "FILE_ID" --export-format "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Create Folders

Organize files with folders:

# Create folder in root
drive_manager.rb --create-folder "Project Files"

# Create folder in specific parent
drive_manager.rb --create-folder "Invoices" --folder "PARENT_FOLDER_ID"

# Create nested folder structure
drive_manager.rb --create-folder "2024/Q4/Reports" --create-path

Update Files

Modify file metadata:

# Rename file
drive_manager.rb --update "FILE_ID" --name "New Name.pdf"

# Update description
drive_manager.rb --update "FILE_ID" --description "Updated description"

# Move file to different folder
drive_manager.rb --update "FILE_ID" --move-to "NEW_FOLDER_ID"

# Update multiple properties
drive_manager.rb --update "FILE_ID" \
  --name "Report.pdf" \
  --description "Final version" \
  --move-to "FOLDER_ID"

Share Files

Manage file and folder permissions:

# Share with specific user (reader)
drive_manager.rb --share "FILE_ID" --email "user@example.com" --role reader

# Share with specific user (writer)
drive_manager.rb --share "FILE_ID" --email "user@example.com" --role writer

# Share with anyone with link (reader)
drive_manager.rb --share "FILE_ID" --role reader --anyone

# Make file public
drive_manager.rb --share "FILE_ID" --role reader --anyone

# Share entire folder
drive_manager.rb --share "FOLDER_ID" --email "team@example.com" --role writer

Permission Roles:

  • reader - Can view and download
  • commenter - Can view and comment
  • writer - Can edit and organize
  • owner - Full control (transfer ownership)

Delete Files

Remove files and folders:

# Move to trash (recoverable)
drive_manager.rb --delete "FILE_ID"

# Permanent delete (non-recoverable)
drive_manager.rb --delete "FILE_ID" --permanent

Warning: Permanent deletion cannot be undone.

Copy Files

Duplicate files:

# Copy file in same location
drive_manager.rb --copy "FILE_ID"

# Copy with new name
drive_manager.rb --copy "FILE_ID" --name "Copy of Document"

# Copy to different folder
drive_manager.rb --copy "FILE_ID" --folder "TARGET_FOLDER_ID"

File Type Reference

See references/file_types.md for comprehensive MIME type documentation.

Common MIME Types

Documents:

  • Google Docs: application/vnd.google-apps.document
  • Microsoft Word: application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • PDF: application/pdf
  • Plain text: text/plain

Spreadsheets:

  • Google Sheets: application/vnd.google-apps.spreadsheet
  • Microsoft Excel: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • CSV: text/csv

Folders:

  • Folder: application/vnd.google-apps.folder

Workflow Patterns

Finding and Reading a File

# 1. Search for file
SEARCH_RESULT=$(drive_manager.rb --search "report")

# 2. Extract file ID from results
FILE_ID=$(echo $SEARCH_RESULT | jq -r '.files[0].id')

# 3. Read file content
drive_manager.rb --read "$FILE_ID"

Uploading and Sharing

# 1. Upload file
UPLOAD_RESULT=$(drive_manager.rb --upload "/path/to/file.pdf" --name "Shared Report.pdf")

# 2. Extract file ID
FILE_ID=$(echo $UPLOAD_RESULT | jq -r '.file.id')

# 3. Share with team
drive_manager.rb --share "$FILE_ID" --email "team@example.com" --role writer

# 4. Get shareable link
drive_manager.rb --get "$FILE_ID" --include-download-url

Organizing Files into Folders

# 1. Create folder structure
FOLDER_RESULT=$(drive_manager.rb --create-folder "2024/Projects" --create-path)
FOLDER_ID=$(echo $FOLDER_RESULT | jq -r '.folder.id')

# 2. Move existing files
drive_manager.rb --update "FILE_ID_1" --move-to "$FOLDER_ID"
drive_manager.rb --update "FILE_ID_2" --move-to "$FOLDER_ID"

# 3. Upload new files directly to folder
drive_manager.rb --upload "/path/to/new-file.pdf" --folder "$FOLDER_ID"

Bulk Operations

# Find all PDFs
drive_manager.rb --query "mimeType='application/pdf'" > pdfs.json

# Process each PDF
cat pdfs.json | jq -r '.files[].id' | while read file_id; do
  # Download each
  drive_manager.rb --download "$file_id" --output "/backup/$file_id.pdf"
done

Integration with Other Skills

Calendar Skill Integration

Share calendar-related documents:

# Upload meeting notes
drive_manager.rb --upload "meeting-notes.pdf" --name "Team Standup Notes"

# Share with meeting attendees
drive_manager.rb --share "$FILE_ID" --email "attendee@example.com" --role reader

Contacts Skill Integration

Store contact-related documents:

# Create contacts folder
FOLDER_ID=$(drive_manager.rb --create-folder "Contact Documents" | jq -r '.folder.id')

# Upload contract for specific contact
drive_manager.rb --upload "contract.pdf" \
  --folder "$FOLDER_ID" \
  --name "John Doe - Service Agreement"

Email Skill Integration

Attach Drive files to emails or save email attachments:

# Get shareable link for email
LINK=$(drive_manager.rb --get "$FILE_ID" --include-download-url | jq -r '.file.webViewLink')

# Include link in email message
~/.claude/skills/email/send_email.sh "recipient@example.com" \
  "Check out this document: $LINK"

Error Handling

The script returns JSON with status and error details:

{
  "status": "error",
  "code": "AUTH_ERROR|API_ERROR|FILE_NOT_FOUND|INVALID_ARGS",
  "message": "Detailed error message"
}

Exit Codes:

  • 0 - Success
  • 1 - Operation failed
  • 2 - Authentication error
  • 3 - API error
  • 4 - Invalid arguments
  • 5 - File not found

Common Use Cases

Document Management

# Upload and organize quarterly reports
drive_manager.rb --create-folder "2024/Q4" --create-path
drive_manager.rb --upload "Q4-report.pdf" --folder "$FOLDER_ID"
drive_manager.rb --share "$FILE_ID" --email "executive@company.com" --role reader

Backup Strategy

# Download all important files for backup
drive_manager.rb --query "starred=true" > starred.json
cat starred.json | jq -r '.files[].id' | while read id; do
  drive_manager.rb --download "$id" --output "/backup/"
done

Collaborative Workspace

# Create shared project folder
FOLDER_ID=$(drive_manager.rb --create-folder "Team Project" | jq -r '.folder.id')

# Share with team
drive_manager.rb --share "$FOLDER_ID" --email "team@company.com" --role writer

# Upload project files
drive_manager.rb --upload "specs.pdf" --folder "$FOLDER_ID"
drive_manager.rb --upload "design.fig" --folder "$FOLDER_ID"

Content Retrieval

# Read configuration file from Drive
CONFIG=$(drive_manager.rb --search "config.json" | jq -r '.files[0].id')
drive_manager.rb --read "$CONFIG" > local-config.json

Best Practices

  1. Search Before Upload: Avoid duplicates by searching first
  2. Use Folders: Organize files hierarchically for better management
  3. Descriptive Names: Use clear, searchable file names
  4. Minimal Permissions: Share with least privilege necessary
  5. Regular Cleanup: Periodically review and delete unused files
  6. Backup Important Files: Download critical files to local storage
  7. Check File IDs: Always verify file IDs before destructive operations

Troubleshooting

Authentication Issues

# Re-authorize if token invalid
rm ~/.claude/.google/token.json
drive_manager.rb --list

Scope Errors

If you see Drive scope-related errors, ensure the token has the Drive scope:

# Check current scopes
cat ~/.claude/.google/token.json | jq -r '.default.scope'

# Should include: https://www.googleapis.com/auth/drive

File Not Found

# Verify file exists and you have access
drive_manager.rb --get "FILE_ID"

# Search for file by name
drive_manager.rb --search "filename"

API Quota Limits

Google Drive API has rate limits. If you hit quota:

  • Wait a few minutes before retrying
  • Reduce batch operation sizes
  • Implement exponential backoff for bulk operations

Advanced Features

Query Syntax

The --query flag supports full Drive API query syntax:

# Files modified in last 7 days
drive_manager.rb --query "modifiedTime > '2024-10-24'"

# Files larger than 10MB
drive_manager.rb --query "size > 10485760"

# Files shared with me
drive_manager.rb --query "sharedWithMe=true"

# Combine conditions
drive_manager.rb --query "mimeType='application/pdf' and starred=true and trashed=false"

Export Formats

Google Workspace files can be exported in various formats:

Google Docs:

  • text/plain - Plain text
  • text/html - HTML
  • application/pdf - PDF
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document - DOCX

Google Sheets:

  • text/csv - CSV
  • application/pdf - PDF
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - XLSX

Google Slides:

  • application/pdf - PDF
  • application/vnd.openxmlformats-officedocument.presentationml.presentation - PPTX

Script Version

Current version: 1.0.0

Run drive_manager.rb --version to check installed version.

Dependencies

  • Ruby 3.3.7 (same as contacts and calendar skills)
  • google-apis-drive_v3 gem
  • googleauth gem
  • Shared OAuth credentials with calendar and contacts skills

平台分布

Codex

32.06%
按下载量换算20

Claude

32.27%
按下载量换算20

Cursor

19.83%
按下载量换算12

Gemini CLI

10.07%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills