Skip to content
cccskills
FreePublished on GitHub

gdrive-cli

Operate Google Drive from the terminal via `rclone` — list, upload, download, search, sync, mount, check quota, export Google Docs/Sheets/Slides, browse Shared Drives, and manage trash. Use whenever the user mentions Google Drive, Drive folders, or anything stored in Google Workspace files from the command line. Trigger phrases include "google drive", "g drive", "gdrive", "drive cli", "upload to drive", "download from drive", "list drive", "search drive", "sync to drive", "backup to drive", "mount google drive", "mount drive", "check drive quota", "drive storage", "drive space", "google docs export", "shared drive", "shared with me", "drive trash", "empty drive trash", "google workspace files", "drive folder", "rclone drive", "rclone gdrive".

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (2)

  • SKILL.md14.4 KB
  • references/command-reference.md16.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Google Drive CLI Skill

Interact with Google Drive via rclone. This skill covers listing, uploading, downloading, searching, syncing, mounting, exporting Google Workspace files (Docs/Sheets/Slides), and handling Shared Drives and trash.

The underlying tool is rclone — a cloud storage swiss-army knife — but this skill is scoped to Google Drive. For other providers (S3, Dropbox, OneDrive, etc.) don't use this skill; run rclone directly with the appropriate remote.

Constraints

  • rclone must be installed (brew install rclone on macOS).
  • A Google Drive remote must be configured via rclone config. OAuth is browser-based and cannot be automated — the user must run rclone config themselves.
  • Remote names are user-chosen (e.g., gdrive:, tx-gdrive:, personal:). Always run rclone listremotes first — never assume a name.
  • Destructive operations (sync, move, delete, purge) can permanently erase Drive data. Run with --dry-run first and confirm before executing.
  • Daily upload quota on Google Drive is 750 GB per user. Plan accordingly.
  • Google Docs/Sheets/Slides have no file size and can't be downloaded as-is unless you pass --drive-export-formats to convert them.

Preflight Check

Before any Drive operation:

rclone version          # confirm install
rclone listremotes      # find the Drive remote name

If rclone is missing:

  • macOS: brew install rclone
  • Linux: sudo -v ; curl https://rclone.org/install.sh | sudo bash
  • Windows: winget install Rclone.Rclone

If no remote is configured, guide the user through rclone config:

  1. n → new remote
  2. Name: e.g., gdrive
  3. Storage type: type drive (NOT google cloud storage — different product)
  4. client_id / client_secret — leave blank
  5. Scope: 1 (full) or 2 (read-only) or 3 (file-only)
  6. Leave service_account_file blank
  7. Edit advanced config: n
  8. Use auto config: y — opens browser for OAuth
  9. Configure as Shared Drive: n (unless using a Team/Shared Drive)
  10. Confirm y, quit with q

To verify: rclone about <remote>: should return quota info.

Safety Rules for Destructive Operations

CommandWhat it doesRisk
rclone sync SRC DSTMakes DST identical to SRCDeletes files on DST not in SRC
rclone move SRC DSTCopies then deletes from SRCData loss if DST write fails
rclone delete REMOTE:PATHDeletes files matching filtersPermanent
rclone purge REMOTE:PATHDeletes folder + contentsPermanent, recursive
rclone backend drop REMOTE:Empties Drive trashIrrecoverable

Always:

  1. Run with --dry-run first and show the plan to the user.
  2. Get explicit confirmation before running for real.
  3. For sync, prefer --backup-dir to retain deleted versions.
  4. Never chain destructive commands with && without review.

Non-destructive operations (copy, ls, lsd, lsf, lsjson, about, check, cat, tree, size, ncdu) proceed without extra confirmation.

Output Format Guidance

CommandOutputBest for
rclone ls<size> <path> per lineFlat file list
rclone lsdDirectories onlyTop-level folder overview
rclone lslLong format with modtimeHuman browsing
rclone lsfPath only, one per lineShell pipelines
rclone lsjsonJSON objectsClaude processing, jq filtering
rclone treeTree viewVisual structure
rclone ncduInteractive TUIUser-driven exploration

When Claude needs to process output, prefer rclone lsjson with jq:

# Good — filtered JSON, minimal tokens
rclone lsjson gdrive:Projects | jq '.[] | select(.IsDir==false and .Size > 1000000)'

# Avoid — verbose table output wastes context
rclone lsl gdrive:Projects

Quick Reference

ActionCommand
List remotesrclone listremotes
Check quotarclone about gdrive:
Top-level foldersrclone lsd gdrive:
Files in folderrclone ls gdrive:path
List as JSONrclone lsjson gdrive:path
Interactive browserrclone ncdu gdrive:
Read a filerclone cat gdrive:path/file.txt
Uploadrclone copy ~/local gdrive:remote -P
Downloadrclone copy gdrive:remote ~/local -P
Search by namerclone lsf gdrive: -R --include "*.pdf"
Compare local/remoterclone check ~/local gdrive:remote
Folder sizerclone size gdrive:path
Mirror (DESTRUCTIVE)rclone sync ~/src gdrive:dst --dry-run
Share linkrclone link gdrive:path/file.pdf
List Shared Drivesrclone backend drives gdrive:
Shared-with-me itemsrclone lsd gdrive: --drive-shared-with-me
Trashed itemsrclone ls gdrive: --drive-trashed-only
Empty trashrclone backend drop gdrive:
Mountrclone mount gdrive: ~/mnt/gdrive --vfs-cache-mode full --daemon
Reauthorizerclone config reconnect gdrive:

Global flags worth knowing:

FlagPurpose
-P / --progressShow transfer progress
--dry-runSimulate without changes
-v / -vvVerbose / debug logging
--transfers NParallel file transfers (default 4)
--exclude "*.tmp"Skip matching files
--include "*.pdf"Include only matching files
--max-age 7dOnly files newer than 7 days
--backup-dir PATHKeep overwritten/deleted files
--tpslimit 10Cap Drive API calls per second

Common Workflows

Check quota and browse

rclone about gdrive:
rclone lsd gdrive:
rclone ncdu gdrive:          # interactive

Upload files or folders

# Single file with progress
rclone copy ~/report.pdf gdrive:Reports/ -P

# Whole folder, skipping junk
rclone copy ~/project gdrive:Backups/project \
  --exclude ".git/**" --exclude "node_modules/**" -P

rclone copy is safe — it never deletes on the destination.

Download from Drive

rclone copy gdrive:Reports/report.pdf ~/Downloads/ -P
rclone copy gdrive:Reports ~/Downloads/reports -P

Search across Drive

# All PDFs recursively
rclone lsf gdrive: -R --include "*.pdf"

# Files modified in last 24 hours
rclone lsjson gdrive: -R | jq '.[] | select(.ModTime > (now - 86400 | todate))'

# Largest 10 files
rclone lsjson gdrive: -R | jq 'sort_by(.Size) | reverse | .[:10] | .[] | {name: .Name, mb: (.Size/1048576 | round)}'

Export Google Docs / Sheets / Slides

Google Workspace files have no native file — you must tell rclone what format to export them as. --drive-export-formats accepts a comma-separated priority list:

# Export Docs as .docx, Sheets as .xlsx, Slides as .pptx
rclone copy gdrive:Projects ~/local/projects \
  --drive-export-formats "docx,xlsx,pptx" -P

# Prefer PDF for everything
rclone copy gdrive:Projects ~/local/projects \
  --drive-export-formats "pdf" -P

# Markdown for Docs, CSV for Sheets
rclone copy gdrive:Notes ~/local/notes \
  --drive-export-formats "md,csv" -P

Supported export targets: docx, odt, rtf, pdf, txt, html, epub, xlsx, ods, csv, tsv, pptx, odp, svg, jpg, png.

Sync a local folder to Drive (DESTRUCTIVE)

Always two-step:

# 1. Dry-run
rclone sync ~/project gdrive:Backups/project --dry-run -v

# 2. Show output to user, get confirmation, then real run with safety net
rclone sync ~/project gdrive:Backups/project \
  --backup-dir gdrive:Backups/_versions/$(date +%Y-%m-%d) \
  --max-delete 100 \
  -P

Compare local and remote

# Hash-based check
rclone check ~/project gdrive:Backups/project

# Size-only (faster, less accurate)
rclone check ~/project gdrive:Backups/project --size-only

# Produce diff reports
rclone check ~/project gdrive:Backups/project \
  --differ diff.txt \
  --missing-on-dst missing-dst.txt \
  --missing-on-src missing-src.txt

Shared Drives

If the user is on Google Workspace, they may have Shared Drives (formerly Team Drives).

# List Shared Drives available to this account
rclone backend drives gdrive:

# To access one, either:
# (a) Reconfigure the remote with "Configure as Shared Drive? y" in rclone config
# (b) Use --drive-shared-with-me or --drive-team-drive flags ad-hoc

# Example: operate on a specific Shared Drive by ID
rclone ls gdrive: --drive-team-drive 0ABCDEF1234567890

Shared-with-me

Files other users shared with you but that don't live in your My Drive:

rclone lsd gdrive: --drive-shared-with-me
rclone copy gdrive: ~/shared-downloads --drive-shared-with-me -P

Trash management

# List trashed items
rclone ls gdrive: --drive-trashed-only

# Restore from trash (rclone backend command)
rclone backend untrash gdrive:path/to/file

# Empty trash (PERMANENT)
rclone backend drop gdrive: --dry-run      # preview first
rclone backend drop gdrive:                # execute

Mount Drive as a filesystem

Requires FUSE. On macOS: brew install --cask macfuse. Note that Homebrew's rclone formula excludes mount — install rclone from https://rclone.org/install/ for full mount support, or use nfsmount subcommand.

mkdir -p ~/mnt/gdrive
rclone mount gdrive: ~/mnt/gdrive --vfs-cache-mode full --daemon

# Unmount
umount ~/mnt/gdrive            # macOS
fusermount -u ~/mnt/gdrive     # Linux

Generate a share link

rclone link gdrive:shared/file.pdf
# Returns: https://drive.google.com/open?id=...

Bandwidth control

Useful on metered connections or to avoid hitting Drive's rate limits:

rclone copy ~/bigfolder gdrive:backup --bwlimit 5M -P
# Schedule: 1M during work hours, unlimited overnight
rclone copy ~/bigfolder gdrive:backup --bwlimit "08:00,1M 18:00,off" -P
# Cap API transactions per second
rclone copy ~/bigfolder gdrive:backup --tpslimit 10 -P

Error Handling

SymptomCauseFix
command not found: rcloneNot installedbrew install rclone
didn't find section in config fileWrong remote namerclone listremotes to check
Failed to get oauth tokenExpired refresh tokenrclone config reconnect gdrive:
directory not foundPath typo or missing :Double-check <remote>:<path>
quota exceededDrive full or 750 GB/day hitWait 24h or free space
userRateLimitExceeded (403)Too many API callsAdd --tpslimit 10
exportSizeLimitExceededGoogle Doc too large to exportSplit the doc or use --drive-export-formats pdf
mount: command not foundHomebrew rclone lacks mountInstall from rclone.org or use nfsmount
Slow transfersDefault 4 parallel streamsTry --transfers 8 --checkers 16

References

For the full flag-by-flag reference of every subcommand, including Drive-specific flags and advanced usage, read references/command-reference.md.

Behavior Scenarios

Scenario 1: Check Drive quota

Given rclone is installed and a Drive remote is configured
When the user asks about Drive storage or quota
Then run `rclone about <remote>:`
And report total, used, free, and trashed space

Scenario 2: Upload to Drive

Given a Drive remote is configured
When the user asks to upload a file or folder to Drive
Then run `rclone copy <local> <remote>:<path> -P`
And report files transferred and total size

Scenario 3: Sync local folder to Drive (destructive)

Given the user wants to mirror a local folder to Drive
When the user asks to sync or backup to Drive
Then first run `rclone sync <src> <dst> --dry-run -v`
And show planned deletions/overwrites to the user
And only execute real sync after explicit user confirmation
And prefer `--backup-dir` for recoverability

Scenario 4: Browse Drive interactively

Given a Drive remote is configured
When the user asks to explore or browse Drive
Then prefer `rclone ncdu <remote>:` for interactive use
Or use `rclone lsjson <remote>:<path> | jq` when Claude needs to process output

Scenario 5: Export Google Docs / Sheets / Slides

Given the user wants to download Google Workspace files
When the user asks to export or download Docs/Sheets/Slides
Then pass `--drive-export-formats` with appropriate targets (docx/xlsx/pptx/pdf/md/csv)
And explain that Google-native files have no size and must be exported

Scenario 6: Access Shared Drives

Given the user is on Google Workspace with Shared Drives
When the user asks to list or access a Shared Drive
Then run `rclone backend drives <remote>:` to list available Shared Drives
And either guide reconfiguration or use `--drive-team-drive <ID>` flag

Scenario 7: Shared-with-me items

Given the user wants to access files others shared with them
When the user asks about "shared with me" items
Then add `--drive-shared-with-me` flag to any list/copy command
And explain these items don't live in My Drive

Scenario 8: rclone not installed

Given rclone is not on PATH
When the user asks any Drive operation
Then report the missing install and suggest `brew install rclone` (macOS)
Or the platform-appropriate install command

Scenario 9: No Drive remote configured

Given rclone is installed but no Drive remote exists
When the user asks any Drive operation
Then explain OAuth cannot be automated
And walk through `rclone config`, emphasizing storage type `drive` (not `google cloud storage`)

Scenario 10: Hitting the 750 GB daily upload limit

Given a large upload encounters quota errors
When rclone reports `quotaExceeded` or `userRateLimitExceeded`
Then explain Drive's 750 GB/day per-user upload cap
And suggest resuming the next day, or adding `--tpslimit 10 --transfers 2`
And point out that `rclone copy` resumes correctly on re-run (skips existing)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Run a multi-model adversarial mutual review with facilitator synthesis: 2+ panelists (different model families where possible — use codex-server / codex-cli for the external-family seat) independently answer, adversarially critique each other across rounds, and the main session acts as facilitator, synthesizing agreements, live disagreements, and calibrated confidence into one answer. Use ONLY on high-stakes, hard-to-reverse claims, designs or decisions, and only when the user EXPLICITLY asks to debate or adversarially review with multiple models — "discuss with Opus and Codex", "red-team this", "devil's advocate", 敵対的レビュー, 相互レビュー, 多モデル討論, 議論させて. A full run costs ~6 subagent/CLI dispatches: state the panel size and round count and get a go-ahead before launching. Where the Workflow tool is available, run the panel as a Workflow (judge-panel / adversarial-verify) instead of ad-hoc fan-out. Do NOT self-trigger on a bare "are you sure?" — that is a cue to OFFER the panel, not to run it.

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

Orchestrate multiple coding-agent sessions (Claude Code, Codex, Gemini) over the mcp_agent_mail MCP server, observe their progress on a recurring auto-loop, and prevent inconsistencies (file/edit conflicts and contradictory decisions) between concurrent tasks. Auto-manages the agent-mail server, derives the shared room key from the git repo, and runs either as the orchestrator/observer or as a participating worker. Handles the operational details (server startup, room key, reservation conventions) so the user does not have to remember them. Use when coordinating several agent sessions on different tasks at once, watching a swarm of sessions for conflicts, or wiring already-running sessions into a shared coordination room. Trigger phrases: "agent-swarm", "/agent-swarm", "orchestrate agents", "orchestrate multiple claude sessions", "coordinate sessions", "watch for conflicts between agents", "observe the swarm", "prevent inconsistency between sessions", "multi-agent observe", "複数セッションを協調", "エージェント協調", "セッション間の不整合監視", "スウォーム監視", "複数のClaudeを束ねて".

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

Generate AGENTS.md (cross-tool agent context — Codex CLI, Aider, Cursor, etc.) and wire CLAUDE.md as a symlink so Claude Code reads the same file. Delegates content generation to Claude's built-in /init when needed, then renames + symlinks. Idempotent. Triggers — /agents-init, "generate agents.md", "create agents.md", "share claude and codex context", "set up agents file", "init agents", "agents-init", "cross-tool agent context", "wire claude and agents".

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

Drive an already-running, LOGGED-IN Chromium browser on macOS via AppleScript — navigate, click, fill forms, scroll, and extract page content from the user's REAL session, with the browser left open and NO profile copy and NO restart. Use when the task needs the existing logged-in session (cookies, auth, current tabs) reused as-is. Trigger phrases: "chrome-use", "ブラウザから取得", "ログイン済みの Chromeで", "ブラウザを操作して", "このページ読んで", "Xのスレッド読んで", "ログインしたまま取得", "自分のセッションでスクレイプ", "read this page in my browser", "scrape with my session", "drive my chrome", "execute JS in my (logged-in) browser", "automate my logged-in browser". Chromium family (Chrome default; Brave/Edge/Arc/Vivaldi via --app). NOT for isolated/throwaway automation where login reuse is unneeded — use playwright-cli for that. macOS only.

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

Run OpenAI Codex CLI from the terminal for batch / one-shot `codex exec` invocations with output captured to an `-o` file. Use for fire-and-forget runs, scripted CI, code review batches (`codex review`), and resuming a specific session by id (`codex exec resume`). Always use this skill instead of `mcp__codex__codex` and `mcp__codex__codex-reply` MCP tools — CLI is faster and more capable. For streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling → **use codex-server instead**. codex-server uses the user's ChatGPT subscription via Codex App Server and decoupled async invocation that bypasses the Bash 2-minute timeout entirely. Trigger patterns (batch-only — chat/streaming triggers belong to codex-server): codex-cli / codex CLI / codex exec / codex review / codex resume / codex fork / batch + {codex, gpt} / one-shot + {codex, gpt} / non-interactive + codex / codex {to a file, -o, output file, captured output} / CI + {codex, gpt} / scripted + {codex, gpt} / fork codex session / resume codex session by id

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

Run OpenAI Codex via the Codex App Server (JSON-RPC-over-stdio) for streaming multi-turn chat sessions with persistent threads, structured output, image input, and rich event streams. Default entry point for ChatGPT/GPT/Codex-like conversations from the terminal. Uses the user's ChatGPT subscription (Plus / Pro / Team) exclusively via `codex login` — never consumes OPENAI_API_KEY billing, by design. Implementation: TypeScript on deno with npm:@openai/codex-sdk; spawns the existing system codex binary. Decoupled async invocation: every turn returns turn-id in <1 s; the actual SDK work runs in a detached worker that streams to per-turn files under ~/.codex-server/turns/<turn-id>/ — Bash's 2-min timeout never applies. Prefer this over codex-cli for streaming UX, multi-turn dialogues that need live state, structured (JSON schema) output, attaching images, or programmatic event handling. Use codex-cli only for one-shot batch invocations that pre-capture to an -o file. For OpenAI Platform API calls specifically (embeddings, image generation, audio, moderation, batches, files) — not open-ended chat — use openai-cli instead; that path bills OPENAI_API_KEY, this one uses the ChatGPT subscription. Trigger patterns (match any variation): codex / codex-server / codex app server / codex app-server / openai / open ai / OpenAI / chatgpt / chat gpt / ChatGPT / GPT / ask gpt / chat with gpt / gpt session / codex session / streaming chat / multi-turn chat / multi turn chat / second opinion / cross-check / cross check / ai pair programming / another AI / external AI / ask another model / get GPT's take / what does openai think / show me what gpt thinks / structured output from gpt / json schema gpt / resume codex thread / continue codex conversation / continue codex session / /codex-server

The English summary is being prepared. Showing the original description.

hideki5123/agent-skill-set2Updated Oct 21, 2026

See all skills by hideki5123

Report a problem with this skill