Skip to main content
skill CX Codex

google-drive · sanjay3290 — Claude Code skill: what it does, how to install

The google-drive skill gives full Google Drive access: search, download, upload, move and trash files via Python scripts with OAuth authentication.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sanjay3290/ai-skills --skill google-drive -a claude-code
Open on GitHub

What google-drive does

The skill operates through scripts/drive.py and scripts/auth.py. First run opens a browser for OAuth login; tokens are stored in the system keyring (Keychain on macOS, Windows Credential Locker, Secret Service on Linux) and refresh automatically. It searches file contents, titles, extracts IDs from Google Drive URLs, lists folders, creates folders and copies files between them.

Google Docs, Sheets and Slides cannot be downloaded — the skill handles regular files only (PDFs, images, archives). Search accepts full-text queries, the title: prefix for name-only search, a URL, or a folder ID longer than 25 characters.

Requires a Google Workspace account. Personal Gmail accounts are not supported — OAuth will fail without a Workspace account.

What it helps with

  • find a file in Drive by content or title
  • download a PDF or image from a shared folder
  • upload a report to a specific project folder
  • move files between Drive folders
  • create a folder structure for a new project

Example prompts for the agent

  • Find all files in Drive containing "quarterly report"
  • Download file 1ABC123xyz to ./downloads/report.pdf
  • Upload ~/Documents/budget.xlsx to folder 1DEF456abc as "Q4 Budget"

How to install google-drive

1Skills CLI (Vercel)

npx skills add sanjay3290/ai-skills --skill google-drive -a claude-code

2Manually: put the files in place

~/.claude/skills/google-drive/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/google-drive/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about google-drive

How to install google-drive in Claude Code?

Run npx skills add sanjay3290/ai-skills --skill google-drive -a claude-code, then check ~/.claude/skills/google-drive/SKILL.md.

What does the google-drive skill do?

It gives the agent full Google Drive access: search by content and title, download and upload files, create and move folders, copy and trash items. OAuth authentication, tokens stored in the system keyring.

Why can't I download Google Docs?

The skill works with regular files only (PDFs, images, archives). Google Docs, Sheets and Slides require export via separate tools — direct download through the Drive API is not available for them.

Source text

SKILL.md · Apache-2.0
---
name: google-drive
description: |
  Interact with Google Drive - search files, find folders, list contents, download files, upload files,
  create folders, move, copy, rename, and trash files. Use when user asks to: search Google Drive,
  find a file/folder, list Drive contents, download or upload files, create folders, move files,
  or organize Drive content. Lightweight integration with standalone OAuth authentication supporting
  full read/write access.
license: Apache-2.0
metadata:
  author: sanjay3290
  version: "1.0"
---

# Google Drive

Lightweight Google Drive integration with standalone OAuth authentication. No MCP server required. Full read/write access.

> **Requires Google Workspace account.** Personal Gmail accounts are not supported.

## First-Time Setup

Authenticate with Google (opens browser):
```bash
python scripts/auth.py login
```

Check authentication status:
```bash
python scripts/auth.py status
```

Logout when needed:
```bash
python scripts/auth.py logout
```

## Read Commands

All operations via `scripts/drive.py`. Auto-authenticates on first use if not logged in.

```bash
# Search for files (full-text search)
python scripts/drive.py search "quarterly report"

# Search by title only
python scripts/drive.py search "title:budget"

# Search using Google Drive URL (extracts ID automatically)
python scripts/drive.py search "https://drive.google.com/drive/folders/1ABC123..."

# Search files shared with you
python scripts/drive.py search --shared-with-me

# Search with pagination
python scripts/drive.py search "report" --limit 5 --page-token "..."

# Find a folder by exact name
python scripts/drive.py find-folder "Project Documents"

# List files in root Drive
python scripts/drive.py list

# List files in a specific folder
python scripts/drive.py list 1ABC123xyz --limit 20

# Download a file
python scripts/drive.py download 1ABC123xyz ./downloads/report.pdf
```

## Write Commands

```bash
# Upload a file to Drive root
python scripts/drive.py upload ~/Documents/report.pdf

# Upload to a specific folder
python scripts/drive.py upload ~/Documents/report.pdf --folder 1ABC123xyz

# Upload with a custom name
python scripts/drive.py upload ~/Documents/report.pdf --name "Q4 Report.pdf"

# Create a new folder
python scripts/drive.py create-folder "Project Documents"

# Create a folder inside another folder
python scripts/drive.py create-folder "Attachments" --parent 1ABC123xyz

# Move a file to a different folder
python scripts/drive.py move FILE_ID DESTINATION_FOLDER_ID

# Copy a file
python scripts/drive.py copy FILE_ID
python scripts/drive.py copy FILE_ID --name "Report Copy" --folder 1ABC123xyz

# Rename a file or folder
python scripts/drive.py rename FILE_ID "New Name.pdf"

# Move a file to trash
python scripts/drive.py trash FILE_ID
```

## Search Query Formats

The search command supports multiple query formats:

| Format | Example | Description |
|--------|---------|-------------|
| Full-text | `"quarterly report"` | Searches file contents and names |
| Title | `"title:budget"` | Searches file names only |
| URL | `https://drive.google.com/...` | Extracts and uses file/folder ID |
| Folder ID | `1ABC123...` | Lists folder contents (25+ char IDs) |
| Native query | `mimeType='application/pdf'` | Pass-through Drive query syntax |

## File ID Format

Google Drive uses long IDs like `1ABC123xyz_-abc123`. Get IDs from:
- `search` results
- `find-folder` results
- `list` results
- Google Drive URLs

## Download Limitations

- Regular files (PDFs, images, etc.) download directly
- Google Docs/Sheets/Slides cannot be downloaded via this tool
- For Google Workspace files, use export or dedicated tools

## Token Management

Tokens stored securely using the system keyring:
- **macOS**: Keychain
- **Windows**: Windows Credential Locker
- **Linux**: Secret Service API (GNOME Keyring, KDE Wallet, etc.)

Service name: `google-drive-skill-oauth`

Automatically refreshes expired tokens using Google's cloud function.

© sanjay3290 · Apache-2.0 · sanjay3290/ai-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

google-drive by other authors comes first.

google-drive membrane Use this skill to work with Google Drive through the Membrane CLI. It can help an agent find files, manage folders and permissions, and update file metadata. CX Codex +1 2,900installs google-drive official OpenAI This skill routes Drive, Docs, Sheets and Slides work through one entry point in Codex. Handy when you keep documents in Google and edit them from the terminal. CX Codex GP ChatGPT 25installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. 1,052,851installs ask-matt Matt Pocock Routes you to the right Matt Pocock skill or flow for the task at hand. Use it when you need a starting point for a feature, prototype, incoming issue, or hard bug. 766,587installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. CX Codex 282,859installs caveman-review JuliusBrussee Turns code review comments into one line per finding: location, problem, fix. Useful when a diff or PR needs a fast pass without the filler. CX Codex +1 411,800installs caveman-compress JuliusBrussee Compresses CLAUDE.md, todo lists, and other prose files into a shorter format while retaining a readable backup. CX Codex +1 411,500installs

From the same set18

deep-research Runs multi-step autonomous investigations using the Google Gemini Deep Research Agent. Generates cited technical reports, market overviews, and competitive matrices. CX Codex +1 672installs imagen This skill turns a text prompt into a PNG using Google Gemini, saving the file straight into your project. Handy for icons, placeholders and docs illustrations. CX Codex +1 626installs postgres Runs safe read-only SQL queries against PostgreSQL databases. Helpful for inspecting schemas, running SELECT queries, and analyzing data without write risks. CX Codex +1 620installs google-docs Creates Google Docs, locates them by title, pulls out text and edits content straight from an agent chat. Needs a Google Workspace account. CX Codex +1 552installs mssql Runs read-only SQL queries against Microsoft SQL Server databases. Useful for exploring schemas and analyzing data without the risk of mutating records. CX Codex +1 537installs google-calendar This skill lets your agent read Google Calendar, create and edit events, and find free slots. OAuth only, no MCP server involved. CX Codex +1 536installs gmail Searches, reads, and sends emails through Gmail directly from the agent interface. Helpful for triaging the inbox, managing drafts, and organizing labels. CX Codex +1 516installs google-sheets This skill gives your agent read and write access to Google Sheets: pull ranges, append rows, search for files by name. Handy when the data lives in a spreadsheet, not in code. CX Codex +1 465installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor