skills/google-drive/SKILL.md
Upload, download, search, and share files on Google Drive. Create folders, manage permissions, and manage comments and replies. Use when asked to share a file, upload to gdrive, search cloud storage, manage a Drive folder, organize Google Drive files, comment on a file, or reply to comments.
npx skillsauth add odyssey4me/agent-skills google-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 for file management, search, and sharing.
Dependencies: pip install --user google-auth google-auth-oauthlib google-api-python-client keyring pyyaml
After installation, verify the skill is properly configured:
$SKILL_DIR/scripts/google-drive.py check
This will check:
If anything is missing, the check command will provide setup instructions.
Google Drive uses OAuth 2.0 for authentication. For complete setup instructions, see:
Create ~/.config/agent-skills/google.yaml:
oauth_client:
client_id: your-client-id.apps.googleusercontent.com
client_secret: your-client-secret
Run $SKILL_DIR/scripts/google-drive.py check to trigger OAuth flow and verify setup.
On scope or authentication errors, see the OAuth troubleshooting guide.
See permissions.md for read/write classification of each command.
# Setup and auth
$SKILL_DIR/scripts/google-drive.py check
$SKILL_DIR/scripts/google-drive.py auth setup --client-id ID --client-secret SECRET
$SKILL_DIR/scripts/google-drive.py auth reset
$SKILL_DIR/scripts/google-drive.py auth status
# Files
$SKILL_DIR/scripts/google-drive.py files list [--query QUERY] [--max-results N] [--order-by FIELD]
$SKILL_DIR/scripts/google-drive.py files search [--name NAME] [--mime-type TYPE] [--folder ID]
$SKILL_DIR/scripts/google-drive.py files get FILE_ID
$SKILL_DIR/scripts/google-drive.py files download FILE_ID --output PATH
$SKILL_DIR/scripts/google-drive.py files export FILE_ID [--format markdown|text|pdf] [--lines N] [--output PATH]
$SKILL_DIR/scripts/google-drive.py files upload PATH [--parent ID] [--name NAME] [--mime-type TYPE] [--convert-to MIME_TYPE]
$SKILL_DIR/scripts/google-drive.py files move FILE_ID --parent FOLDER_ID
$SKILL_DIR/scripts/google-drive.py files delete FILE_ID
$SKILL_DIR/scripts/google-drive.py files rename FILE_ID --name NAME
$SKILL_DIR/scripts/google-drive.py files copy FILE_ID [--name NAME] [--parent ID]
# Folders
$SKILL_DIR/scripts/google-drive.py folders create NAME [--parent ID]
$SKILL_DIR/scripts/google-drive.py folders list FOLDER_ID [--max-results N]
# Sharing and permissions
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email EMAIL [--role ROLE] [--no-notify]
$SKILL_DIR/scripts/google-drive.py permissions list FILE_ID
$SKILL_DIR/scripts/google-drive.py permissions delete FILE_ID PERMISSION_ID
# Comments
$SKILL_DIR/scripts/google-drive.py comments list FILE_ID [--max-results N] [--include-deleted]
$SKILL_DIR/scripts/google-drive.py comments get FILE_ID COMMENT_ID
$SKILL_DIR/scripts/google-drive.py comments create FILE_ID --content TEXT [--quoted-text TEXT]
$SKILL_DIR/scripts/google-drive.py comments update FILE_ID COMMENT_ID --content TEXT
$SKILL_DIR/scripts/google-drive.py comments delete FILE_ID COMMENT_ID
# Replies
$SKILL_DIR/scripts/google-drive.py replies list FILE_ID COMMENT_ID [--max-results N] [--include-deleted]
$SKILL_DIR/scripts/google-drive.py replies get FILE_ID COMMENT_ID REPLY_ID
$SKILL_DIR/scripts/google-drive.py replies create FILE_ID COMMENT_ID --content TEXT [--action resolve|reopen]
$SKILL_DIR/scripts/google-drive.py replies update FILE_ID COMMENT_ID REPLY_ID --content TEXT
$SKILL_DIR/scripts/google-drive.py replies delete FILE_ID COMMENT_ID REPLY_ID
See command-reference.md for full argument details and examples.
$SKILL_DIR/scripts/google-drive.py check
$SKILL_DIR/scripts/google-drive.py files list --query "mimeType='application/pdf'" --max-results 5
$SKILL_DIR/scripts/google-drive.py files search --name "project proposal"
# First, find the file ID
$SKILL_DIR/scripts/google-drive.py files search --name "report.pdf"
# Then download it
$SKILL_DIR/scripts/google-drive.py files download FILE_ID -o ./report.pdf
# Export as markdown (default)
$SKILL_DIR/scripts/google-drive.py files export FILE_ID
# Export as plain text (useful as fallback for large docs)
$SKILL_DIR/scripts/google-drive.py files export FILE_ID --format text
# Export first 50 lines only
$SKILL_DIR/scripts/google-drive.py files export FILE_ID --format text --lines 50
# Export as PDF
$SKILL_DIR/scripts/google-drive.py files export FILE_ID --format pdf --output ./doc.pdf
# Upload the file
$SKILL_DIR/scripts/google-drive.py files upload ./presentation.pdf --name "Q4 Presentation"
# Share with a colleague
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email [email protected] --role writer
Use --convert-to to convert uploaded files to native Google formats:
# Upload HTML and convert to Google Docs
$SKILL_DIR/scripts/google-drive.py files upload ./report.html \
--convert-to "application/vnd.google-apps.document"
# Upload CSV and convert to Google Sheets
$SKILL_DIR/scripts/google-drive.py files upload ./data.csv \
--convert-to "application/vnd.google-apps.spreadsheet"
$SKILL_DIR/scripts/google-drive.py files delete FILE_ID
$SKILL_DIR/scripts/google-drive.py files rename FILE_ID --name "New Name"
# Copy with default name ("Copy of <original>")
$SKILL_DIR/scripts/google-drive.py files copy FILE_ID
# Copy with custom name into a specific folder
$SKILL_DIR/scripts/google-drive.py files copy FILE_ID --name "Backup" --parent FOLDER_ID
# Create a folder
$SKILL_DIR/scripts/google-drive.py folders create "Project Documents"
# Upload files to the folder
$SKILL_DIR/scripts/google-drive.py files upload ./doc1.pdf --parent FOLDER_ID
$SKILL_DIR/scripts/google-drive.py files upload ./doc2.pdf --parent FOLDER_ID
# List folder contents
$SKILL_DIR/scripts/google-drive.py folders list FOLDER_ID
$SKILL_DIR/scripts/google-drive.py comments list FILE_ID
To mention a user, include their email with an @ prefix in the content text.
$SKILL_DIR/scripts/google-drive.py comments create FILE_ID \
--content "Hey @[email protected] please review this section"
$SKILL_DIR/scripts/google-drive.py replies create FILE_ID COMMENT_ID \
--content "Fixed in latest revision" --action resolve
$SKILL_DIR/scripts/google-drive.py replies create FILE_ID COMMENT_ID \
--content "Actually this still needs work" --action reopen
See drive-queries.md for operators, searchable fields, and query examples.
See api-reference.md for MIME types used with --mime-type and search queries.
See api-reference.md for operations not yet implemented and their alternatives.
Authentication and scope errors are not retryable. If a command fails with an authentication error, insufficient scope error, or permission denied error (exit code 1), stop and inform the user. Do not retry or attempt to fix the issue autonomously — these errors require user interaction (browser-based OAuth consent). Point the user to the OAuth troubleshooting guide.
Retryable errors: Rate limiting (HTTP 429) and temporary server errors (HTTP 5xx) may succeed on retry after a brief wait. All other errors should be reported to the user.
This skill makes API calls requiring structured input/output. A standard-capability model is recommended.
Google Docs, Sheets, and Slides are not binary files — they cannot be downloaded with files download. Use files export instead to export them as markdown, plain text, or PDF. Use --lines N to limit output for large documents.
testing
Search and manage Jira issues using JQL queries, create/update tickets, and manage workflows. Use when asked to find Jira tickets, check the backlog, manage sprints, track bugs, or work with Atlassian project management.
development
Create and edit Google Slides presentations. Add or delete slides, insert text, shapes, and images. Use when asked to build a deck, create a slideshow, update a Google presentation, or edit slides.
development
Read, write, and format Google Sheets spreadsheets. Manage cell values, ranges, formulas, pivot tables, and charts. Use when asked to update a gsheet, edit a Google spreadsheet, add formulas, or work with spreadsheet data.
development
Create and modify Google Docs documents. Read content, insert tables, apply heading styles, and manage formatting. Use when asked to edit a gdoc, write a Google document, update a doc, or format document content.