← ClaudeAtlas

google-drivelisted

Export, download, upload, and share Google Drive and Docs files. Use when a file must be fetched from or published to Drive(Google Drive・Google Docs・共有リンク).
devbasex/ai-plugins · ★ 1 · AI & Automation · score 68
Install: claude install-skill devbasex/ai-plugins
# Google Drive アクセス ## 概要 Google Drive / Google Docs のファイルを CLI 環境から操作する。 認証は `ndf:google-auth` スキルの共通モジュール (`get_credentials()`) を使用。 ## 提供物 ``` google-drive/ ├── SKILL.md ← このファイル ├── pyproject.toml ← uv プロジェクト (Drive API 依存) └── scripts/ └── gdrive_fetch.py ← CLI: エクスポート / ダウンロード / アップロード ``` `gdrive_fetch.py` は実行時に `ndf:google-auth` スキルの `google_auth.py` を sys.path に追加して `get_credentials()` を呼ぶ。`google-auth` 側で OAuth2 トークンを取得済みであれば追加の認証は不要。 ## 前提条件 | 項目 | 値 | |---|---| | 認証 | `ndf:google-auth` スキル (共通 OAuth2 モジュール) | | Python 実行 | `uv run --project ${CLAUDE_SKILL_DIR} python ...` または `uv run --with ...` | | client_secret.json | `ndf:google-auth` の手順で配置済み | | 既存トークン | `~/.config/gcloud/google_token.json` (`ndf:google-auth` で取得済み) | ## クイックスタート ```bash SKILL_DIR=${CLAUDE_SKILL_DIR} SCRIPT=$SKILL_DIR/scripts/gdrive_fetch.py # Google Doc をテキストでエクスポート uv run --project $SKILL_DIR python $SCRIPT --id FILE_ID # HTML 形式 uv run --project $SKILL_DIR python $SCRIPT --id FILE_ID --mime text/html -o /tmp/doc.html # PDF 形式 uv run --project $SKILL_DIR python $SCRIPT --id FILE_ID --mime application/pdf -o /tmp/doc.pdf # バイナリファイル (画像、PDF 等) をダウンロード uv run --project $SKILL_DIR python $SCRIPT --id FILE_ID --download -o /tmp/file.png # ファイルをアップロード (既定は非公開) uv run --project $SKILL_DIR python $SCRIPT --upload /path/to/file.png # リンクを知る全員が閲覧できるようにしてアップロード uv run --project $SKILL_DIR python $SCRIPT --upload /path/to/file.png --public ``` `--po