jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ Google Drive Automation

google-drive-automation

Googleドライブと手軽に連携し、ファイルの読み書??

⏱ ボイラープレート実装 半日 → 30分

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

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

🇯🇵 日本人クリエイター向け解説

一言でいうと

Googleドライブと手軽に連携し、ファイルの読み書??

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o google-drive-automation.zip https://jpskill.com/download/2947.zip && unzip -o google-drive-automation.zip && rm google-drive-automation.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/2947.zip -OutFile "$d\google-drive-automation.zip"; Expand-Archive "$d\google-drive-automation.zip" -DestinationPath $d -Force; ri "$d\google-drive-automation.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して google-drive-automation.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → google-drive-automation フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

💬 こう話しかけるだけ — サンプルプロンプト

  • Google Drive Automation を使って、最小構成のサンプルコードを示して
  • Google Drive Automation の主な使い方と注意点を教えて
  • Google Drive Automation を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Google Drive

スタンドアロンのOAuth認証による軽量なGoogle Drive連携です。MCPサーバーは不要です。完全な読み取り/書き込みアクセスが可能です。

Google Workspaceアカウントが必要です。 個人のGmailアカウントはサポートされていません。

使用する場面

  • Google Driveのファイルやフォルダを検索、一覧表示、アップロード、ダウンロード、移動、整理する必要がある場合。
  • Workspaceアカウント内のローカルスクリプトを通じて、Driveへの直接的な読み取り/書き込み自動化が必要なタスクの場合。
  • MCPサーバーへの依存関係を導入せずに、ファイルレベルのDrive操作を行いたい場合。

初回セットアップ

Googleで認証します(ブラウザが開きます):

python scripts/auth.py login

認証ステータスを確認します:

python scripts/auth.py status

必要に応じてログアウトします:

python scripts/auth.py logout

読み取りコマンド

すべての操作は scripts/drive.py を介して行われます。ログインしていない場合、初回使用時に自動的に認証されます。

# ファイルを検索(全文検索)
python scripts/drive.py search "quarterly report"

# タイトルのみで検索
python scripts/drive.py search "title:budget"

# Google DriveのURLを使用して検索(IDを自動的に抽出)
python scripts/drive.py search "https://drive.google.com/drive/folders/1ABC123..."

# 共有されているファイルを検索
python scripts/drive.py search --shared-with-me

# ページネーション付きで検索
python scripts/drive.py search "report" --limit 5 --page-token "..."

# フォルダを正確な名前で検索
python scripts/drive.py find-folder "Project Documents"

# ルートDrive内のファイルを一覧表示
python scripts/drive.py list

# 特定のフォルダ内のファイルを一覧表示
python scripts/drive.py list 1ABC123xyz --limit 20

# ファイルをダウンロード
python scripts/drive.py download 1ABC123xyz ./downloads/report.pdf

書き込みコマンド

# ファイルをDriveのルートにアップロード
python scripts/drive.py upload ~/Documents/report.pdf

# 特定のフォルダにアップロード
python scripts/drive.py upload ~/Documents/report.pdf --folder 1ABC123xyz

# カスタム名でアップロード
python scripts/drive.py upload ~/Documents/report.pdf --name "Q4 Report.pdf"

# 新しいフォルダを作成
python scripts/drive.py create-folder "Project Documents"

# 別のフォルダ内にフォルダを作成
python scripts/drive.py create-folder "Attachments" --parent 1ABC123xyz

# ファイルを別のフォルダに移動
python scripts/drive.py move FILE_ID DESTINATION_FOLDER_ID

# ファイルをコピー
python scripts/drive.py copy FILE_ID
python scripts/drive.py copy FILE_ID --name "Report Copy" --folder 1ABC123xyz

# ファイルまたはフォルダの名前を変更
python scripts/drive.py rename FILE_ID "New Name.pdf"

# ファイルをゴミ箱に移動
python scripts/drive.py trash FILE_ID

検索クエリ形式

検索コマンドは複数のクエリ形式をサポートしています:

形式 説明
全文検索 "quarterly report" ファイルの内容と名前を検索します
タイトル "title:budget" ファイル名のみを検索します
URL https://drive.google.com/... ファイル/フォルダIDを抽出して使用します
フォルダID 1ABC123... フォルダの内容を一覧表示します(25文字以上のID)
ネイティブクエリ mimeType='application/pdf' Driveクエリ構文をそのまま渡します

ファイルID形式

Google Driveは 1ABC123xyz_-abc123 のような長いIDを使用します。IDは以下から取得できます:

  • search の結果
  • find-folder の結果
  • list の結果
  • Google DriveのURL

ダウンロードの制限事項

  • 通常のファイル(PDF、画像など)は直接ダウンロードされます
  • Google Docs/Sheets/Slidesは、このツールではダウンロードできません
  • Google Workspaceファイルの場合、エクスポートまたは専用ツールを使用してください

トークン管理

トークンはシステムキーリングを使用して安全に保存されます:

  • macOS: キーチェーン
  • Windows: Windows資格情報マネージャー
  • Linux: Secret Service API(GNOMEキーリング、KDEウォレットなど)

サービス名:google-drive-skill-oauth

Googleのクラウド機能を使用して、期限切れのトークンを自動的に更新します。

制限事項

  • このスキルは、タスクが上記で説明された範囲に明確に一致する場合にのみ使用してください。
  • 出力を、環境固有の検証、テスト、または専門家によるレビューの代わりとして扱わないでください。
  • 必要な入力、権限、安全境界、または成功基準が不足している場合は、停止して説明を求めてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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.

When to Use

  • You need to search, list, upload, download, move, or organize Google Drive files and folders.
  • The task requires direct Drive read/write automation through local scripts in a Workspace account.
  • You want file-level Drive operations without introducing an MCP server dependency.

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.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.