gog/skills/gog-drive/SKILL.md
This skill should be used when the user asks to "list files on Drive", "search Drive", "upload file to Drive", "download from Drive", "export Google Doc", "share a file", "move file", "rename file", "create folder on Drive", "delete file from Drive", "check file permissions", "copy file on Drive", "get file link", or mentions Google Drive operations. Provides guidance for using the `gog drive` CLI to interact with Google Drive.
npx skillsauth add musingfox/cc-plugins gog DriveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interact with Google Drive using the gog CLI tool (gog drive or alias gog drv).
Verify gog is available and authenticated:
gog drive ls --max=1
If authentication fails, inform the user to run gog auth add <email> --services drive first.
--json when parsing output programmatically (e.g., extracting file IDs). Use human-readable output when displaying file lists to the user.--dry-run before any destructive or write operation (delete, upload, share, move). Preview the action, then execute after user confirmation.--no-input to prevent interactive prompts.ls or search.List files in a folder (default: root):
gog drive ls # Root folder
gog drive ls --parent=<folderId> # Specific folder
gog drive ls --max=50 # More results
gog drive ls --query="mimeType='application/pdf'" # Drive query filter
gog drive ls --no-all-drives # My Drive only (exclude shared drives)
Full-text search across all of Drive:
gog drive search "quarterly report"
gog drive search "quarterly report" --max=20
For advanced queries, use Drive query language with --raw-query:
gog drive search --raw-query "mimeType='application/vnd.google-apps.spreadsheet' and modifiedTime > '2026-01-01'"
Common raw query patterns:
mimeType='application/vnd.google-apps.document' — Google DocsmimeType='application/vnd.google-apps.spreadsheet' — Google SheetsmimeType='application/vnd.google-apps.presentation' — Google SlidesmimeType='application/vnd.google-apps.folder' — FoldersmodifiedTime > '2026-01-01' — modified after date'<folderId>' in parents — files in a specific foldertrashed = true — trashed filesgog drive get <fileId>
gog drive download <fileId> # Download to default location
gog drive download <fileId> --out=/tmp/file.pdf # Specify output path
For Google Docs formats, specify export format:
gog drive download <fileId> --format=pdf # Export Google Doc as PDF
gog drive download <fileId> --format=docx # Export as Word
gog drive download <fileId> --format=csv # Export Sheet as CSV
gog drive download <fileId> --format=xlsx # Export Sheet as Excel
gog drive download <fileId> --format=pptx # Export Slides as PowerPoint
gog drive download <fileId> --format=txt # Export as plain text
Preview with --dry-run first:
gog drive upload /path/to/file.pdf --dry-run
gog drive upload /path/to/file.pdf --parent=<folderId> --dry-run
Key flags:
--name="custom name" — override filename--parent=<folderId> — destination folder--replace=<fileId> — replace existing file content (preserves link/permissions)--convert — auto-convert to native Google format (e.g., .docx → Google Doc)--convert-to=doc|sheet|slides — convert to specific Google format--mime-type=<type> — override MIME typegog drive copy <fileId> "Copy of Document"
gog drive copy <fileId> "Copy of Document" --parent=<folderId>
gog drive mkdir "New Folder"
gog drive mkdir "Subfolder" --parent=<folderId>
gog drive move <fileId> --to=<folderId> --dry-run
gog drive rename <fileId> "New Name"
Always preview with --dry-run first — default moves to trash:
gog drive delete <fileId> --dry-run # Move to trash (recoverable)
gog drive delete <fileId> --permanent --dry-run # Permanent delete (irreversible)
Share a file:
# Share with a specific user
gog drive share <fileId> --to=user [email protected] --role=writer --dry-run
# Share with anyone (link sharing)
gog drive share <fileId> --to=anyone --role=reader --dry-run
# Share with a domain
gog drive share <fileId> --to=domain --domain=example.com --role=reader --dry-run
Roles: reader, writer.
List existing permissions:
gog drive permissions <fileId>
Remove a permission:
gog drive unshare <fileId> <permissionId>
Get web URL for a file:
gog drive url <fileId>
List shared drives (Team Drives):
gog drive drives
Manage comments on files:
gog drive comments list <fileId>
gog drive comments create <fileId> --content="Comment text"
gog drive search "budget 2026" --json --max=10gog drive download <fileId> --out=/tmp/budget.xlsx --format=xlsxgog drive upload /path/to/report.pdf --parent=<folderId> --dry-run--dry-rungog drive share <fileId> --to=user [email protected] --role=reader --dry-run--dry-rungog drive mkdir "Q1 Reports" --parent=<parentFolderId>gog drive move <fileId> --to=<newFolderId> --dry-run--permanent) without --dry-run preview and user confirmation.--dry-run preview and user confirmation. Sharing can expose sensitive data.--replace without confirming — this overwrites the existing file content.--max=20 to keep output manageable.ls or search before operating. Do not guess file IDs.data-ai
Unified entry point for Obsidian daily-note captures and long-form notes. Triggers on "記一下 / log / 紀錄 / capture this / 寫到 journal" (→ cap mode) and "建立筆記 / new note / 寫一份筆記 / create a note on" (→ note mode). Also via `/obw:cap` and `/obw:note`. Requires `.obsidian.yaml`.
tools
Use the `gog` CLI to operate Google Workspace — Gmail (read/search/send/labels/drafts), Calendar (events/RSVP/freebusy/focus-time/out-of-office), and Drive (list/search/upload/ download/share/move). Triggers on any Gmail, inbox, email, calendar, agenda, meeting, schedule, RSVP, Drive, Google Doc/Sheet/Slides, file share, or upload/download request.
documentation
Interactively create .obsidian.yaml for a project and install starter templates (task / doc / adr) into the vault's Templates folder. Skips templates that already exist; never overwrites.
tools
Manage project hook-guard installation — set up, diagnose, or update Claude Code hooks, git pre-commit, and commit-msg scripts with security checks, code-quality gates, and CLAUDECODE skip logic. Triggers on "set up hooks", "configure pre-commit", "add linting hooks", "initialize hook-guard", "check hooks", "hook doctor", "verify hook setup", "troubleshoot hooks", "update hooks", "regenerate hooks", "sync hooks with current tools", or similar requests.