gmail-connector-setup
GitHub指导用户完成Gmail连接配置,包括权限选择、记忆策略及心跳设置,支持状态检查与断开连接。
Trigger Scenarios
Install
npx skills add QuixiAI/Hexis --skill gmail-connector-setup -g -y
SKILL.md
Frontmatter
{
"name": "gmail-connector-setup",
"category": "communication",
"contexts": [
"chat"
],
"requires": {
"tools": [
"gmail_setup_status",
"connect_gmail",
"complete_gmail_connection",
"start_gmail_backfill",
"gmail_backfill_status",
"control_gmail_backfill",
"revoke_gmail_connection"
]
},
"bound_tools": [
"gmail_setup_status",
"connect_gmail",
"complete_gmail_connection",
"start_gmail_backfill",
"gmail_backfill_status",
"control_gmail_backfill",
"revoke_gmail_connection"
],
"description": "Connect Gmail through first-class guided setup, inspect status, complete authorization, queue read-only backfill, control jobs, and revoke local access"
}
Gmail Connector Setup
Use this when the user asks to connect Gmail, inspect Gmail setup, choose whether email reads may feed memory, filter spam, label/delete messages, send replies, or disconnect Gmail.
Principles
- Treat connection setup as a first-class conversation flow. Do not tell the user to leave chat and figure it out alone.
- Ask what Gmail provider powers the user wants before starting sign-in: read/search only, send/reply, or managed mailbox changes such as labels, spam triage, and delete.
- Ask separately whether Samantha should remember what she reads in email or forget it after the task. This is the Hexis config key
integrations.gmail.memory_policy, not a Google permission. - Ask separately whether Samantha may check Gmail during autonomous heartbeats while the user is away, or only read Gmail when the user asks in a live turn. This is the Hexis config key
integrations.gmail.heartbeat_digest_enabled, defaults off, and is not implied by connecting Gmail. - Add
label,spam_triage, ordeleteonly when the user explicitly wants labeling, spam filtering, or deletion. - Add
sendorreplyonly when the user explicitly authorizes sending or replying on their behalf. - Queue
start_gmail_backfillonly after Gmail is connected and the user has asked Hexis to ingest/learn from email history. - Treat backfill as read-only provider access but local memory ingestion: it still requires explicit user approval.
- For ongoing send/reply/label/spam-triage/delete behavior, use
connector-action-authorizationafter connection setup so the grant is scoped and DB-audited. - Prefer the structured setup UI and built-in Google sign-in when configured. Do not ask the user to paste Google setup JSON into chat; tool calls and activity traces are audited. If this local build needs setup, rely on the setup UI's step-by-step guide and upload control.
- Never ask for Google account passwords.
- For ordinary email work ("check my inbox", "read a batch", "is anything urgent", "find the email from Alice"), use the operational Gmail/email tool first. If it reports Gmail is not connected, use the returned
ui.kind = connector_setupartifact or callconnect_gmailto open setup. Do not route already-connected operational requests back into setup.
Flow
- Call
gmail_setup_status. - If Gmail is not connected and the user has not chosen provider powers yet, ask the scope question before calling
connect_gmail. - After provider powers are chosen, ask whether email reads should be remembered or forgotten. Pass the answer as
memory_policy; do not addingestto Gmail capabilities. - After memory behavior is chosen, ask whether heartbeats may check Gmail autonomously or only when the user asks live. Pass the answer as
heartbeat_digest_enabled. - Call
connect_gmailwith the least provider capabilities that match the user's request, even if this local build is not ready to start Google sign-in yet. The tool result includes a structuredui.kind = connector_setuppayload that chat surfaces render as the setup interface. - If the setup UI says local Gmail sign-in setup is missing, tell the user the panel will walk them through it step by step. Do not lead with OAuth, app, client, secret, JSON, or environment-variable vocabulary unless the user asks for technical details.
- If the tool returns an
authorization_url, rely on the rendered setup UI when available; otherwise send the URL exactly. Tell the user the localhost page may fail after approval and that this is expected. - When the user pastes the redirected URL or code, call
complete_gmail_connection. - Report the connected account and granted capabilities.
- If the user asked to ingest email history, call
start_gmail_backfillwith the smallest usefulquery,label_ids, andmax_messagesfor the request. - Use
gmail_backfill_statusfor progress, andcontrol_gmail_backfillonly when the user asks to pause, resume, or cancel a job.
When a tool result includes ui.kind = connector_setup, do not replace that setup interface with prose-only instructions. Briefly name the requested capabilities and point the user to the setup control rendered by the channel.
Use revoke_gmail_connection only after the user asks to disconnect Gmail.
Version History
- 990da5f Current 2026-08-20 13:53


