Agent skill · caffeinelabs
connector-googledrive
MANDATORY recipe for every Caffeine build that lists, reads, creates, shares, or organizes files and folders on the user's own Google Drive. The ONLY supported path is the `googledrive-client` mops package (Drive REST API v3) combined with the `google-oauth` mops package (OAuth 2.0 token exchange + refresh + PKCE). Hand-rolling `ic.http_request` calls to `oauth2.googleapis.com` or `www.googleapis.com/drive/v3` is a FORBIDDEN anti-pattern — it bypasses bearer auth, the `is_replicated = ?false` replication-cost safeguard, and the `google-oauth` library's token handling. Load this skill ONLY when the user, spec, or a prior task refers to **Google Drive specifically** — e.g. "Google Drive", "my Drive", "Drive files/folders", a Drive file/folder ID or share link, "upload to Google Drive", "list my Drive files", or Drive sharing/permissions. Do NOT load it for generic file storage, documents, uploads, or access-control features that are not Google Drive — those are unrelated and this connector must not be attached to them. When it does apply, load it BEFORE writing any code that touches a Google endpoint.
What it needs
About 4k tokens when loaded.
What this skill does
Google Drive Connector Note. The client is generated from the Drive v3 Discovery document. diagnostics is on, so a decode gap traps loudly rather than returning silently-wrong data. The nested-facade methods take each Drive endpoint's full query-parameter list positionally (many Text/Bool args) — consult the generated signatures in Client.mo before calling. Media endpoints are metadata-only (see the Media caveat). Orchestrator routing notes The googledrive-client + google-oauth pair is the only supported way to reach Google Drive from a Caffeine canister. If a build needs Drive, add both as mops dependencies and follow this skill. Never emit raw ic.httprequest calls to Google hosts. Task Use --- --- List / search the user's files & folders googledrive-client Client(cfg).files.list(...) + google-oauth Read file metadata Client(cfg).files.get(...) (metadata only — see Media caveat) Create a folder / file metadata Client(cfg).files.create(...) Move / rename / trash Client(cfg).files.update(...) / .delete(...) Share a file / manage access Client(cfg).permissions.create/list/update/delete(...) Comments & replies Client(cfg).comments. / Client(cfg).replies. Shared drives Client(cfg).drives. Change notifications / sync token Client(cfg).changes. Not supported by this client: transferring file bytes (upload/download of content). See the Media caveat at the end. Use it for metadata, organization, and sharing. Backend The connector has two mops packages: 1. googledrive-client — the generated Motoko client for Drive REST API v3. OAuth-agnostic: every call takes a bearer token via its Config. 2. google-oauth — Google OAuth 2.0 mechanics (PKCE, authorize URL, code exchange, token refresh). Shared with the other Google connectors. This is a separate mops package you add alongside the client — it is not a dependency of googledrive-client itself. 1. Add dependencies 2. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills caffeinelabs/connector-googledrive