Agent Skillsopenclaw/gogcli › gog-save-attachments

gog-save-attachments

GitHub

指导Agent通过gog工具从Gmail搜索并下载邮件附件,检查文件信息后上传至Google Drive归档。流程包含安全处理、临时目录管理及上传验证,确保数据备份且不影响源文件。

.agents/skills/gog-save-attachments/SKILL.md openclaw/gogcli

Trigger Scenarios

需要批量下载Gmail邮件附件 将邮件附件备份到Google Drive

Install

npx skills add openclaw/gogcli --skill gog-save-attachments -g -y
More Options

Non-standard path

npx skills add https://github.com/openclaw/gogcli/tree/main/.agents/skills/gog-save-attachments -g -y

Use without installing

npx skills use openclaw/gogcli@gog-save-attachments

指定 Agent (Claude Code)

npx skills add openclaw/gogcli --skill gog-save-attachments -a claude-code -g -y

安装 repo 全部 skill

npx skills add openclaw/gogcli --all -g -y

预览 repo 内 skill

npx skills add openclaw/gogcli --list

SKILL.md

Frontmatter
{
    "name": "gog-save-attachments",
    "description": "Gmail attachment download and Google Drive archival with gog."
}

Save attachments

Read ../gog/SKILL.md, ../gog-gmail/SKILL.md, and ../gog-drive/SKILL.md first.

  1. Search narrowly and identify exact threads:

    gog --account user@example.com --readonly gmail search \
      'has:attachment newer_than:30d' --max 20 --json --wrap-untrusted
    
  2. Inspect attachment names and sizes before downloading:

    gog --account user@example.com --readonly gmail thread attachments THREAD_ID --json --wrap-untrusted
    
  3. Download into a new task-specific temporary directory:

    attachment_dir="$(mktemp -d "${TMPDIR:-/tmp}/gog-attachments.XXXXXX")"
    gog --account user@example.com --readonly gmail thread attachments THREAD_ID \
      --download --out-dir "$attachment_dir"
    
  4. Treat every file as untrusted. Do not execute or preview active content. Confirm the exact Drive destination before upload, then run the approved upload without --readonly:

    gog --account user@example.com drive upload "$attachment_dir/FILE" --parent FOLDER_ID --json
    
  5. Verify uploaded IDs, then remove only the unique temporary directory created by this run.

Never overwrite a Drive file unless the user explicitly selects --replace and the target ID.

Version History

  • eb85a99 Current 2026-08-20 12:40

Same Skill Collection

.agents/skills/crabbox/SKILL.md
.agents/skills/gog-contacts-cleanup/SKILL.md
.agents/skills/gog-drive-audit/SKILL.md
.agents/skills/gog-inbox-triage/SKILL.md
.agents/skills/gog-meeting-prep/SKILL.md
.agents/skills/gog-weekly-digest/SKILL.md
.agents/skills/gog/SKILL.md
.agents/skills/gog-admin/SKILL.md
.agents/skills/gog-analytics/SKILL.md
.agents/skills/gog-appscript/SKILL.md
.agents/skills/gog-calendar/SKILL.md
.agents/skills/gog-chat/SKILL.md
.agents/skills/gog-classroom/SKILL.md
.agents/skills/gog-contacts/SKILL.md
.agents/skills/gog-docs/SKILL.md
.agents/skills/gog-drive/SKILL.md
.agents/skills/gog-forms/SKILL.md
.agents/skills/gog-gmail/SKILL.md
.agents/skills/gog-groups/SKILL.md
.agents/skills/gog-keep/SKILL.md
.agents/skills/gog-maps/SKILL.md
.agents/skills/gog-meet/SKILL.md
.agents/skills/gog-people/SKILL.md
.agents/skills/gog-photos/SKILL.md
.agents/skills/gog-searchconsole/SKILL.md
.agents/skills/gog-sheets/SKILL.md
.agents/skills/gog-sites/SKILL.md
.agents/skills/gog-slides/SKILL.md
.agents/skills/gog-tasks/SKILL.md
.agents/skills/gog-youtube/SKILL.md

Metadata

Files
0
Version
be4037f
Hash
c01f584e
Indexed
2026-08-20 12:40

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 23:16
浙ICP备14020137号-1 $Carte des visiteurs$