Agent Skillssanjay3290/ai-skills › google-drive

google-drive

GitHub

提供Google Drive的轻量级读写集成,支持文件搜索、上传下载、文件夹管理及内容组织。需Workspace账号,通过OAuth认证,无需MCP服务器即可实现完整权限控制。

skills/google-drive/SKILL.md sanjay3290/ai-skills

Trigger Scenarios

用户请求在Google Drive中搜索文件或文件夹 用户需要上传或下载文件到Google Drive 用户要求创建、移动、复制、重命名或删除Drive中的文件

Install

npx skills add sanjay3290/ai-skills --skill google-drive -g -y
More Options

Use without installing

npx skills use sanjay3290/ai-skills@google-drive

指定 Agent (Claude Code)

npx skills add sanjay3290/ai-skills --skill google-drive -a claude-code -g -y

安装 repo 全部 skill

npx skills add sanjay3290/ai-skills --all -g -y

预览 repo 内 skill

npx skills add sanjay3290/ai-skills --list

SKILL.md

Frontmatter
{
    "name": "google-drive",
    "license": "Apache-2.0",
    "metadata": {
        "author": "sanjay3290",
        "version": "1.0"
    },
    "description": "Interact with Google Drive - search files, find folders, list contents, download files, upload files,\ncreate folders, move, copy, rename, and trash files. Use when user asks to: search Google Drive,\nfind a file\/folder, list Drive contents, download or upload files, create folders, move files,\nor organize Drive content. Lightweight integration with standalone OAuth authentication supporting\nfull read\/write access.\n"
}

Google Drive

Lightweight Google Drive integration with standalone OAuth authentication. No MCP server required. Full read/write access.

Requires Google Workspace account. Personal Gmail accounts are not supported.

First-Time Setup

Authenticate with Google (opens browser):

python scripts/auth.py login

Check authentication status:

python scripts/auth.py status

Logout when needed:

python scripts/auth.py logout

Read Commands

All operations via scripts/drive.py. Auto-authenticates on first use if not logged in.

# Search for files (full-text search)
python scripts/drive.py search "quarterly report"

# Search by title only
python scripts/drive.py search "title:budget"

# Search using Google Drive URL (extracts ID automatically)
python scripts/drive.py search "https://drive.google.com/drive/folders/1ABC123..."

# Search files shared with you
python scripts/drive.py search --shared-with-me

# Search with pagination
python scripts/drive.py search "report" --limit 5 --page-token "..."

# Find a folder by exact name
python scripts/drive.py find-folder "Project Documents"

# List files in root Drive
python scripts/drive.py list

# List files in a specific folder
python scripts/drive.py list 1ABC123xyz --limit 20

# Download a file
python scripts/drive.py download 1ABC123xyz ./downloads/report.pdf

Write Commands

# Upload a file to Drive root
python scripts/drive.py upload ~/Documents/report.pdf

# Upload to a specific folder
python scripts/drive.py upload ~/Documents/report.pdf --folder 1ABC123xyz

# Upload with a custom name
python scripts/drive.py upload ~/Documents/report.pdf --name "Q4 Report.pdf"

# Create a new folder
python scripts/drive.py create-folder "Project Documents"

# Create a folder inside another folder
python scripts/drive.py create-folder "Attachments" --parent 1ABC123xyz

# Move a file to a different folder
python scripts/drive.py move FILE_ID DESTINATION_FOLDER_ID

# Copy a file
python scripts/drive.py copy FILE_ID
python scripts/drive.py copy FILE_ID --name "Report Copy" --folder 1ABC123xyz

# Rename a file or folder
python scripts/drive.py rename FILE_ID "New Name.pdf"

# Move a file to trash
python scripts/drive.py trash FILE_ID

Search Query Formats

The search command supports multiple query formats:

Format Example Description
Full-text "quarterly report" Searches file contents and names
Title "title:budget" Searches file names only
URL https://drive.google.com/... Extracts and uses file/folder ID
Folder ID 1ABC123... Lists folder contents (25+ char IDs)
Native query mimeType='application/pdf' Pass-through Drive query syntax

File ID Format

Google Drive uses long IDs like 1ABC123xyz_-abc123. Get IDs from:

  • search results
  • find-folder results
  • list results
  • Google Drive URLs

Download Limitations

  • Regular files (PDFs, images, etc.) download directly
  • Google Docs/Sheets/Slides cannot be downloaded via this tool
  • For Google Workspace files, use export or dedicated tools

Token Management

Tokens stored securely using the system keyring:

  • macOS: Keychain
  • Windows: Windows Credential Locker
  • Linux: Secret Service API (GNOME Keyring, KDE Wallet, etc.)

Service name: google-drive-skill-oauth

Automatically refreshes expired tokens using Google's cloud function.

Version History

  • 3619692 Current 2026-07-24 17:33

Same Skill Collection

skills/atlassian/SKILL.md
skills/azure-devops/SKILL.md
skills/elevenlabs/SKILL.md
skills/gmail/SKILL.md
skills/google-calendar/SKILL.md
skills/google-chat/SKILL.md
skills/google-docs/SKILL.md
skills/google-sheets/SKILL.md
skills/google-slides/SKILL.md
skills/grok-build/SKILL.md
skills/imagen/SKILL.md
skills/jules/SKILL.md
skills/manus/SKILL.md
skills/mssql/SKILL.md
skills/mysql/SKILL.md
skills/notebooklm/SKILL.md
skills/postgres/SKILL.md
skills/apple-container/SKILL.md
skills/google-tts/SKILL.md
skills/telegram/SKILL.md
skills/whatsapp/SKILL.md

Metadata

Files
0
Version
3619692
Hash
44b81233
Indexed
2026-07-24 17:33

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 22:38
浙ICP备14020137号-1 $방문자$