| name | permission-slip-openclaw-skill-google-drive |
| description | Browse, search, open, upload, and organize files on Google Drive through a Google account connected to Permission Slip. Use when the user says things like "what's in my Drive?", "find that doc", "open that file", "upload this", "make a folder", or "delete that file" and their Google account is managed via Permission Slip. |
Google Drive (via Permission Slip)
This skill lets you act on the user's Google Drive by driving the
permission-slip CLI. You never talk to the Google Drive API directly — every
action goes through Permission Slip, which enforces the user's approval policy.
This skill contains no code of its own: it is a thin shim over the
permission-slip CLI. All authentication (Google OAuth), approval enforcement,
and default-account selection live in Permission Slip and its built-in google
connector.
Defaults
- "What's in my Drive?" → list the most recently modified files.
Run
list_drive_files with {"max_results": 50, "order_by": "modifiedTime desc"}.
- Account selection: omit
--instance. Permission Slip auto-selects the
user's default Google instance. Only pass --instance if the user
explicitly names a second account.
Preflight (run once per session, before the first action)
permission-slip whoami — confirm this agent is registered. If not, tell
the user to register (permission-slip register ...) and stop.
permission-slip connectors — confirm google is available. If it's
missing, the user hasn't connected a Google account yet; point them at the
connector setup docs and stop.
Intent -> action mapping
| User says | Action | Params |
|---|
| "what's in my Drive?", "recent files" | google.list_drive_files | {"max_results":50,"order_by":"modifiedTime desc"} |
| "find / search for X" | google.search_drive | {"query":"<text>","max_results":50} |
| "what's in ?" | google.list_drive_files | {"folder_id":<id>,"max_results":50} |
| "open / read that file" | google.get_drive_file | {"file_id":<id>,"include_content":true} |
| "upload this file" | google.upload_drive_file | upload params (needs approval) |
| "make a folder" | google.create_drive_folder | folder params (needs approval) |
| "delete that file" | google.delete_drive_file | {"file_id":<id>} (HIGH risk — needs approval) |
query accepts Google Drive search syntax
(e.g. name contains 'report', mimeType = 'application/pdf').
How to run an action
permission-slip request \
--action google.list_drive_files \
--params '{"max_results":50,"order_by":"modifiedTime desc"}'
The CLI prints JSON. Two outcomes:
- Auto-approved (reads): the result includes the file list. Each file has an
id, name, mimeType, and modifiedTime. Use the id as file_id for a
follow-up get_drive_file / delete_drive_file.
- Pending approval (upload / create folder / delete): the CLI returns a
request id in a
pending state. Tell the user plainly: "That needs your
approval — I've sent the request to Permission Slip; I'll know once you approve
it." Then poll with permission-slip request-status <id> and report the
outcome. Never claim a file was uploaded, created, or deleted until the status
is approved and executed.
Presenting results
- Summarize the listing briefly (name, type, modified time). Don't dump raw JSON
unless asked.
- Use emojis by file type to make the listing easier to scan — e.g.
📁 folder, 📄 doc, 📊 spreadsheet, 📽️ slides, 🖼️ image, 📕 PDF, ⏰ modified
time. Keep it tasteful: one icon per file, not a wall of emoji.
- If the query returns nothing, say so — don't retry blindly.
- Deletes are destructive and high-risk. Always confirm the exact file
(name + id) with the user before submitting a
delete_drive_file request, and
make clear it requires their approval.
- On error, surface the connector's message verbatim and suggest the fix rather
than guessing.
Constraints
- Max
max_results is 100 — never request more.
- One concern per request. For several files, make one request each.
- Reads are low-risk; uploads and folder creation are medium-risk; deletes are
high-risk. Treat every write as approval-gated and communicate the wait.