drive

A command for browsing, searching, and downloading files stored in Google Drive through rclone, a command-line file transfer tool. It can also guide setup when the required connection is missing.

In plain words
What is it for?
Use it to find and download files from Google Drive, or to check and prepare the rclone connection needed to access them.
Why use it?
It removes the need to switch to a browser or manually manage file-transfer commands. It also checks whether the local Google Drive connection is ready.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/derek-larson14/delegate/drive
Clone the repo
git clone --depth 1 https://github.com/derek-larson14/delegate

Made for: Claude Code.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.01638
Opus 5 $0.00005 $0.00819
Sonnet 5 $0.00002 $0.00328
Haiku 4.5 $0.00001 $0.00164

Measured 2d ago against content hash d37fc7ae3f0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

drive scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

mkdir -p ./ops/scripts && curl -sL https://raw.githubusercontent.com/derek-larson14/delegate/main/ops/scripts/setup-drive.sh -o ./ops/scripts/setup-drive.sh && chmod +x ./ops/scripts/setup-drive.sh
.claude/commands/drive.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Drive Assistant

Access Google Drive via rclone - browse, search, and download files.

Setup (handle automatically, silently if already configured)

First, check if rclone + gdrive are ready:

rclone listremotes 2>/dev/null | grep -q "^gdrive:" && echo "READY"

If output is "READY": Skip all setup messaging. Just proceed directly to what the user asked for. If they just said "/drive" without a specific request, ask: "What do you want to find in your Drive?"

If not ready, then handle setup:

  1. Check if rclone is installed: which rclone

    • If not found, detect OS first: uname -s 2>/dev/null || echo "Windows"
    • macOS/Linux: check if Homebrew exists: which brew
      • If brew exists → run brew install rclone yourself
      • If no brew → tell user: "rclone needs Homebrew. In Finder, open your workspace folder and double-click SETUP.command - it'll install Homebrew and the tools you need. Follow the prompts in the terminal window, then try /drive again."
    • Windows (MINGW/CYGWIN/MSYS/Windows): tell user: "rclone not found. Run .\SETUP.ps1 (right-click → Run with PowerShell) or install manually: winget install Rclone.Rclone"
  2. Check if the setup script exists. If not, download it:

mkdir -p ./ops/scripts && curl -sL https://raw.githubusercontent.com/derek-larson14/delegate/main/ops/scripts/setup-drive.sh -o ./ops/scripts/setup-drive.sh && chmod +x ./ops/scripts/setup-drive.sh
  1. Tell the user: "Google Drive isn't connected yet. I'll open your browser - just sign in and click Allow."

  2. Run: ./ops/scripts/setup-drive.sh

  3. Once complete, proceed with the user's request.

If connection test fails on an existing config, tell user to run rclone config reconnect gdrive:.

Browse & List

# List top-level folders
rclone lsd gdrive:

# List files in a folder
rclone ls gdrive:path/to/folder

# List with details (size, date)
rclone lsl gdrive:path/to/folder

# Limit depth when exploring
rclone lsd gdrive:Projects --max-depth 2

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 200 lines · 9 tokens per session scan A d37fc7ae3f0c

Subscribe to this mod's changes

drive is a command published in the GitHub repository derek-larson14/delegate (39 stars, last pushed 4mo ago), licensed MIT. It adds 9 tokens to every session and 1,638 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.