Gmail attachment download and Google Drive archival with gog.
66
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/gog-save-attachments/SKILL.mdRead ../gog/SKILL.md, ../gog-gmail/SKILL.md, and ../gog-drive/SKILL.md first.
Search narrowly and identify exact threads:
gog --account user@example.com --readonly gmail search \
'has:attachment newer_than:30d' --max 20 --json --wrap-untrustedInspect attachment names and sizes before downloading:
gog --account user@example.com --readonly gmail thread attachments THREAD_ID --json --wrap-untrustedDownload 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"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 --jsonVerify 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.
1dbd820
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.