skills/gmail/SKILL.md
Read and send emails via [email protected] using Gmail IMAP/SMTP
npx skillsauth add ariffazil/openclaw-workspace gmailInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Any task involving email — read inbox, send message, search emails, check unread.
Stored in: /root/AAA/secrets/email.env (mode 600)
Also available as env vars: GMAIL_USER, GMAIL_APP_PASSWORD
import imaplib, email, os
from email.header import decode_header
user = os.environ.get("GMAIL_USER", "[email protected]")
password = os.environ.get("GMAIL_APP_PASSWORD", "")
mail = imaplib.IMAP4_SSL("imap.gmail.com")
mail.login(user, password)
mail.select("INBOX")
# Fetch last 10 emails
_, msgs = mail.search(None, "ALL")
ids = msgs[0].split()
for uid in ids[-10:]:
_, data = mail.fetch(uid, "(RFC822)")
msg = email.message_from_bytes(data[0][1])
subject = msg["Subject"]
sender = msg["From"]
date = msg["Date"]
print(f"{date} | {sender} | {subject}")
mail.logout()
import smtplib, os
from email.message import EmailMessage
user = os.environ.get("GMAIL_USER", "[email protected]")
password = os.environ.get("GMAIL_APP_PASSWORD", "")
msg = EmailMessage()
msg["From"] = user
msg["To"] = "[email protected]"
msg["Subject"] = "Subject here"
msg.set_content("Body text here")
with smtplib.SMTP("smtp.gmail.com", 587) as server:
server.starttls()
server.login(user, password)
server.send_message(msg)
# Unread only
mail.select("INBOX")
_, msgs = mail.search(None, "UNSEEN")
# Search by subject
_, msgs = mail.search(None, 'SUBJECT "keyword"')
# Search by sender
_, msgs = mail.search(None, 'FROM "[email protected]"')
All outgoing emails show From: [email protected] — no alias support via IMAP/SMTP.
If you need to send from [email protected], requires Cloudflare/Resend API instead.
development
Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker, backtesting, macro signals, RSI strategy. Every organ has a role.
development
Capital claim state management — tracks claim lifecycle across WEALTH organ.
development
Archived constitutional warga placeholder retained only for audit provenance. Do not use for active work; use the live arifOS governance and constitutional skills instead.
testing
Warga (citizen) agent skills for AAA federation members. See subdirectories for specialized warga skills.