openclaw/skills/gws-drive/SKILL.md
Search, upload, download, share, and manage Google Drive files and folders for Dylan, Julia, or other accounts. Use when asked about Drive files, documents, sharing, uploads, downloads, storage, or finding files.
npx skillsauth add Dbochman/dotfiles gws-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.
Access Google Drive via the gws CLI at /opt/homebrew/bin/gws. Credentials are AES-256-GCM encrypted at ~/.config/gws/.
| Account | Owner | Flag |
|---------|-------|------|
| [email protected] | Dylan | Default (no flag needed) |
| [email protected] | Julia | --account [email protected] |
| [email protected] | Dylan (spam) | --account [email protected] |
| [email protected] | OpenClaw | --account [email protected] |
When Dylan asks about "my Drive", use default. When he says "Julia's Drive", use her account.
All commands follow: gws drive <resource> <method> [--params '<JSON>'] [--json '<JSON>'] [--account <email>]
--params = URL/query parameters (fileId, q, pageSize, etc.)--json = request body (for create, update, etc.)--account = target account# List recent files
gws drive files list --params '{
"pageSize": 10,
"orderBy": "modifiedTime desc",
"fields": "files(id,name,mimeType,modifiedTime,size,parents)"
}'
# Search by name
gws drive files list --params '{
"q": "name contains '\''budget'\''",
"fields": "files(id,name,mimeType,modifiedTime)"
}'
# Search by type
gws drive files list --params '{
"q": "mimeType = '\''application/vnd.google-apps.spreadsheet'\''",
"fields": "files(id,name,modifiedTime)"
}'
# Files in a specific folder
gws drive files list --params '{
"q": "'\''<folderId>'\'' in parents",
"fields": "files(id,name,mimeType,modifiedTime)"
}'
# Shared with me
gws drive files list --params '{
"q": "sharedWithMe = true",
"pageSize": 10,
"fields": "files(id,name,mimeType,modifiedTime,sharingUser)"
}'
# Julia's recent files
gws drive files list --params '{
"pageSize": 10,
"orderBy": "modifiedTime desc",
"fields": "files(id,name,mimeType,modifiedTime)"
}' --account [email protected]
| Query | Meaning |
|-------|---------|
| name contains 'budget' | Name contains substring |
| name = 'Report.pdf' | Exact name match |
| mimeType = 'application/pdf' | PDF files |
| mimeType = 'application/vnd.google-apps.spreadsheet' | Google Sheets |
| mimeType = 'application/vnd.google-apps.document' | Google Docs |
| mimeType = 'application/vnd.google-apps.folder' | Folders |
| '<folderId>' in parents | Files in folder |
| sharedWithMe = true | Shared with me |
| trashed = true | In trash |
| starred = true | Starred files |
| modifiedTime > '2026-01-01T00:00:00' | Modified after date |
| createdTime > '2026-01-01T00:00:00' | Created after date |
Combine with and/or: name contains 'report' and mimeType = 'application/pdf'
| Type | MIME Type |
|------|-----------|
| Folder | application/vnd.google-apps.folder |
| Document | application/vnd.google-apps.document |
| Spreadsheet | application/vnd.google-apps.spreadsheet |
| Presentation | application/vnd.google-apps.presentation |
| Form | application/vnd.google-apps.form |
| Drawing | application/vnd.google-apps.drawing |
gws drive files get --params '{
"fileId": "<fileId>",
"fields": "id,name,mimeType,modifiedTime,size,parents,webViewLink,permissions"
}'
# Download binary file (PDF, image, etc.)
gws drive files get --params '{
"fileId": "<fileId>",
"alt": "media"
}' --output /tmp/downloaded-file.pdf
# Export Google Docs/Sheets/Slides to a format
gws drive files export --params '{
"fileId": "<fileId>",
"mimeType": "application/pdf"
}' --output /tmp/exported.pdf
| Source | Export To | MIME Type |
|--------|----------|-----------|
| Google Doc | PDF | application/pdf |
| Google Doc | Word | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Google Doc | Plain text | text/plain |
| Google Sheet | PDF | application/pdf |
| Google Sheet | Excel | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| Google Sheet | CSV | text/csv |
| Google Slides | PDF | application/pdf |
| Google Slides | PowerPoint | application/vnd.openxmlformats-officedocument.presentationml.presentation |
# Simple upload (auto-detects name and MIME type)
gws drive +upload /path/to/file.pdf
# Upload to a specific folder
gws drive +upload /path/to/file.pdf --parent <folderId>
# Upload with custom name
gws drive +upload /path/to/data.csv --name 'Sales Data.csv'
# Upload with metadata via files.create + --upload flag
gws drive files create --json '{
"name": "Report.pdf",
"parents": ["<folderId>"],
"description": "Monthly report"
}' --upload /path/to/report.pdf
gws drive files create --json '{
"name": "New Folder",
"mimeType": "application/vnd.google-apps.folder",
"parents": ["<parentFolderId>"]
}'
# Move file to a different folder
gws drive files update --params '{
"fileId": "<fileId>",
"addParents": "<newFolderId>",
"removeParents": "<oldFolderId>"
}'
gws drive files update --params '{"fileId": "<fileId>"}' --json '{
"name": "New Name.pdf"
}'
gws drive files copy --params '{"fileId": "<fileId>"}' --json '{
"name": "Copy of Document",
"parents": ["<folderId>"]
}'
# Share with a specific user (editor)
gws drive permissions create --params '{
"fileId": "<fileId>",
"sendNotificationEmail": true,
"emailMessage": "Here is the file you requested"
}' --json '{
"role": "writer",
"type": "user",
"emailAddress": "[email protected]"
}'
# Share with a specific user (viewer)
gws drive permissions create --params '{
"fileId": "<fileId>"
}' --json '{
"role": "reader",
"type": "user",
"emailAddress": "[email protected]"
}'
# Share with anyone who has the link
gws drive permissions create --params '{
"fileId": "<fileId>"
}' --json '{
"role": "reader",
"type": "anyone"
}'
| Role | Access |
|------|--------|
| owner | Full ownership |
| organizer | Shared drive organizer |
| writer | Can edit |
| commenter | Can comment |
| reader | Can view |
gws drive permissions list --params '{
"fileId": "<fileId>",
"fields": "permissions(id,role,type,emailAddress,displayName)"
}'
gws drive permissions delete --params '{
"fileId": "<fileId>",
"permissionId": "<permissionId>"
}'
# Trash (recoverable)
gws drive files update --params '{"fileId": "<fileId>"}' --json '{
"trashed": true
}'
# Restore from trash
gws drive files update --params '{"fileId": "<fileId>"}' --json '{
"trashed": false
}'
# Permanent delete (irreversible!)
gws drive files delete --params '{"fileId": "<fileId>"}'
# Empty trash
gws drive files emptyTrash
gws drive about get --params '{
"fields": "storageQuota,user"
}'
For large result sets, use --page-all to auto-paginate:
gws drive files list --params '{
"q": "modifiedTime > '\''2026-01-01T00:00:00'\''",
"pageSize": 100,
"fields": "files(id,name,mimeType)"
}' --page-all --page-limit 5
For any endpoint, check available parameters:
gws schema drive.files.list
gws schema drive.files.create
gws schema drive.permissions.create
fields parameter controls which metadata fields are returned — always specify to reduce response sizeexport to download; regular files use get with alt: mediagws outputs JSON by default — parse directly or pipe through jq+upload helper is the easiest way to upload files (auto-detects MIME type)development
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".