用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/taracodlabs/aiden --skill google-workspace命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | google-workspace |
| description | Gmail, Calendar, Drive, Sheets, Docs via Google API (SA / OAuth) |
| category | productivity |
| version | 1.0.0 |
| origin | aiden |
| license | Apache-2.0 |
| tags | google, gmail, calendar, drive, sheets, docs, workspace, api, oauth, email |
Access Gmail, Google Calendar, Drive, Sheets, and Docs through the Google REST APIs. Requires either a service account JSON key (GOOGLE_APPLICATION_CREDENTIALS) or an OAuth2 access token.
Get a short-lived access token via gcloud CLI (requires Google Cloud SDK installed):
# One-time login (opens browser)
gcloud auth login
# Get token for API calls
$token = (gcloud auth print-access-token)
$headers = @{ "Authorization" = "Bearer $token" }
For service accounts, set GOOGLE_APPLICATION_CREDENTIALS to the JSON key path and use gcloud auth application-default print-access-token.
$resp = Invoke-RestMethod -Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=10" -Headers $headers
$resp.messages | ForEach-Object {
$msg = Invoke-RestMethod -Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages/$($_.id)?format=metadata&metadataHeaders=Subject,From,Date" -Headers $headers
$msg.payload.headers | Where-Object { $_.name -in @("Subject","From","Date") } | Select-Object name,value
}
$now = [System.DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
$end = [System.DateTime]::UtcNow.AddDays(1).ToString("yyyy-MM-ddTHH:mm:ssZ")
$resp = Invoke-RestMethod -Uri "https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=$now&timeMax=$end&singleEvents=true&orderBy=startTime" -Headers $headers
$resp.items | Select-Object summary, @{N="start";E={$_.start.dateTime}}
$spreadsheetId = "your-sheet-id" # from URL: /spreadsheets/d/<id>/
$range = "Sheet1!A1:E20"
$resp = Invoke-RestMethod -Uri "https://sheets.googleapis.com/v4/spreadsheets/$spreadsheetId/values/$range" -Headers $headers
$resp.values | ForEach-Object { $_ -join "`t" }
$spreadsheetId = "your-sheet-id"
$range = "Sheet1!A1"
$writeHeaders = $headers.Clone(); $writeHeaders["Content-Type"] = "application/json"
$payload = @{ values = @(@("Name","Score"),@("Alice","95"),@("Bob","87")) } | ConvertTo-Json
Invoke-RestMethod -Uri "https://sheets.googleapis.com/v4/spreadsheets/$spreadsheetId/values/$range`?valueInputOption=RAW" -Method Put -Headers $writeHeaders -Body $payload
$resp = Invoke-RestMethod -Uri "https://www.googleapis.com/drive/v3/files?pageSize=20&fields=files(id,name,mimeType,modifiedTime)" -Headers $headers
$resp.files | Select-Object name, mimeType, modifiedTime | Format-Table -AutoSize
$docId = "your-doc-id" # from URL: /document/d/<id>/
$resp = Invoke-RestMethod -Uri "https://docs.googleapis.com/v1/documents/$docId" -Headers $headers
$resp.body.content | Where-Object { $_.paragraph } |
ForEach-Object { $_.paragraph.elements.textRun.content } | Where-Object { $_ } | Out-String
"Show me my unread Gmail emails from today"
→ Use step 2 with query parameter q=is:unread after:2026/04/17.
"What meetings do I have tomorrow?"
→ Use step 3 with tomorrow's date range for timeMin/timeMax.
"Read the sales data from my Google Sheet" → Use step 4 with the sheet ID from the URL and the relevant range.
gcloud auth print-access-token as needednextPageToken for paginationgmail.send scope — confirm scope during OAuth setup