Claude-skill-registry google-drive
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/google-drive" ~/.claude/skills/majiayu000-claude-skill-registry-google-drive && rm -rf "$T"
manifest:
skills/data/google-drive/SKILL.mdsource content
Google Drive Operations with gogcli
gog CLIを使用してGoogle Driveを操作する。
Prerequisites
# Installation brew install gogcli # Authentication (初回のみ) gog auth login
Commands Reference
List Files
# ルートフォルダのファイル一覧 gog drive ls # 特定フォルダの一覧 gog drive ls --parent="<folderId>" # 最大件数指定 gog drive ls --max=50 # クエリフィルタ付き gog drive ls --query="mimeType='application/vnd.google-apps.folder'"
Search Files
# フルテキスト検索 gog drive search "検索キーワード" # 複数キーワード gog drive search "報告書 2024" # JSON形式で出力 gog drive search "議事録" --json --max=20
Download Files
# ファイルをダウンロード gog drive download <fileId> # 出力先を指定 gog drive download <fileId> --out="/path/to/output.pdf" # Google Docsのエクスポート形式を指定 gog drive download <fileId> --format=pdf # PDF形式 gog drive download <fileId> --format=docx # Word形式 gog drive download <fileId> --format=xlsx # Excel形式 gog drive download <fileId> --format=pptx # PowerPoint形式 gog drive download <fileId> --format=csv # CSV形式 gog drive download <fileId> --format=txt # テキスト形式
Upload Files
# ファイルをアップロード(ルートへ) gog drive upload /path/to/file.pdf # ファイル名を変更してアップロード gog drive upload /path/to/file.pdf --name="新しいファイル名.pdf" # 特定フォルダへアップロード gog drive upload /path/to/file.pdf --parent="<folderId>"
Create Folder
# ルートにフォルダ作成 gog drive mkdir "新しいフォルダ" # 特定フォルダ内にサブフォルダ作成 gog drive mkdir "サブフォルダ" --parent="<parentFolderId>"
File Operations
# ファイルのメタデータ取得 gog drive get <fileId> # ファイルをコピー gog drive copy <fileId> "コピー後の名前" # ファイルを移動 gog drive move <fileId> --parent="<newParentFolderId>" # ファイル名を変更 gog drive rename <fileId> "新しい名前" # ファイルを削除(ゴミ箱へ) gog drive delete <fileId> # WebのURLを取得 gog drive url <fileId>
Share Files
# 特定ユーザーと共有(閲覧権限) gog drive share <fileId> --email="user@example.com" --role="reader" # 特定ユーザーと共有(編集権限) gog drive share <fileId> --email="user@example.com" --role="writer" # 公開リンクを作成 gog drive share <fileId> --anyone --role="reader" # 権限一覧を表示 gog drive permissions <fileId> # 権限を削除 gog drive unshare <fileId> <permissionId>
Shared Drives
# 共有ドライブ一覧 gog drive drives
Comments
# ファイルのコメント一覧 gog drive comments list <fileId> # コメントを追加 gog drive comments add <fileId> "コメント内容"
Common Workflows
最近のファイルを確認
gog drive ls --max=10
特定の名前のファイルを検索
gog drive search "週報"
Google Docsをローカルにダウンロード
# PDF形式でダウンロード gog drive download <fileId> --format=pdf --out="./document.pdf"
ローカルファイルを特定フォルダにアップロード
# まずフォルダIDを確認 gog drive search "プロジェクトフォルダ" --json # フォルダにアップロード gog drive upload ./report.pdf --parent="<folderId>"
Output Formats
| Flag | Description |
|---|---|
| JSON形式で出力(スクリプト向け) |
| TSV形式で出力(パース容易) |
| (default) | 人間が読みやすい形式 |
Tips
で複数アカウントを切り替え--account=email@example.com- ファイルIDはURLから取得可能:
https://drive.google.com/file/d/<fileId>/view - フォルダIDもURLから取得可能:
https://drive.google.com/drive/folders/<folderId>
で確認をスキップ(削除時など注意して使用)--force