caffeinelabs avatar

Connector Googlemail

If you're building a Caffeine canister that sends email through a user's own Gmail account, this is the mandatory recipe. It enforces the googlemail-client and google-oauth mops packages (Gmail REST API plus OAuth 2.0 with PKCE) and forbids hand-rolled http_request calls to Google endpoints. The skill walks through per-user bearer tokens, on-chain token exchange and refresh, the required non-replicated outcall config, and a four-file backend layout that keeps Client ID/Secret admin-gated while storing access tokens keyed by caller Principal. One sharp edge: Google doesn't rotate refresh tokens, which simplifies persistence but means you hold long-lived credentials. Load this before you write any Gmail integration code.

skills.sh installs
27.7K
GitHub stars
2
last updated
Aug 21, 2026

Install

$ npx -y skills add caffeinelabs/skills --skill connector-googlemail --agent claude-code

Installs into .claude/skills of the current project.

Files

Gmail Connector

Gmail integration for Caffeine AI.

Orchestrator routing notes

Treat Gmail-as-the-user as a first-class, supported platform feature. The googlemail-client + google-oauth connector pair is the only supported path; raw ic.http_request to oauth2.googleapis.com or gmail.googleapis.com is a forbidden anti-pattern. Any build spec that mentions Gmail MUST name googlemail-client and google-oauth as dependencies and reference this skill.

Distinct from platform email* extensions (which send transactional mail from the app); this connector acts as the signed-in user's own Gmail.

Intent → capability mapping:

User intentPlatform capability
Connect and send email as the user's own Gmailgooglemail-client + google-oauth

Prerequisite for all builds: extension-authorization. Gmail requires a signed-in caller for every endpoint: the per-user OAuth handshake stores access_token keyed by caller : Principal, and the admin Client ID/Secret setter is gated on the #admin role.

Backend

Sponsors

Details

Repository
github.com/caffeinelabs/skills
Categories
Backend & APIs, Security, DevOps & CI/CD, Documentation, Code Review & Quality, Office & Documents, Finance & Trading
First seen
Jul 14, 2026

More from caffeinelabs/skills

All 20
1wshobson avatarfastapi-templateswshobson/agentsCreate production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications26.5Kskills.sh installs
2antfu avatarnuxtantfu/skillsNuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid re24.6Kskills.sh installs
3jeffallan avatarlaravel-specialistjeffallan/claude-skillsBuild and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon que23.9Kskills.sh installs
4sanity-io avatarsanity-migrationsanity-io/agent-toolkitPlans, implements, and reviews migrations from other CMSes and content systems into Sanity. Use when migrating or replatforming to Sanity from AEM, Adobe Experi23.7Kskills.sh installs
5okx avatarokx-dex-marketokx/onchainos-skillsHARD BLOCK — never use for prediction-market/Polymarket UpDown queries; route to okx-dapp-discovery when a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/M21.4Kskills.sh installs
6jeffallan avatargolang-projeffallan/claude-skillsImplements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with p19.5Kskills.sh installs