Manage inbox email. Uses the inbox script and stores metadata (ids) to open or archive messages later.
List Gmail/iCloud inboxes showing a clean user view while preserving metadata (IDs) for later actions.
scripts/email-inbox--json-out to save metadata.~/.config/skills/config.json under email:gmail_accounts: list of Gmail accountsicloud_user: iCloud user (optional)Example:
{
"email": {
"gmail_accounts": ["you@gmail.com", "other@gmail.com"],
"icloud_user": "you@icloud.com"
}
}
Example:
scripts/email-inbox
--json-out /tmp/inbox.json./tmp/inbox.json to get IDs and keep them for later actions./tmp/inbox.json as a frozen snapshot until you explicitly refresh the inbox again.Helpers (from the skill folder):
scripts/email-open --index <n> (Gmail/iCloud) opens and writes /tmp/email-open.json.scripts/email-archive --index <n> (Gmail/iCloud) archives the message/thread. Accepts multiple indices.scripts/email-reply --index <n> --body-file <path> replies to the message (Gmail/iCloud).scripts/email-mailboxes --account <icloud> lists iCloud mailboxes.The JSON contains a list of items with:
index (number shown to the user)source (gmail or icloud)accountid (Gmail: threadId, iCloud: UID)fromsubjectUse the helper:
scripts/email-open --index <n>
This prints the email (from/subject/date/body) and saves metadata to /tmp/email-open.json.
Before sending, always show the draft to the user and ask for explicit approval.
Use the helper:
scripts/email-reply --index <n> --body-file /tmp/reply.txt
--reply-all.--subject "Re: ..."--append-only.--no-append-sent.--no-reply-all.scripts/email-archive --index <n> to keep the inbox clean.Use the helper:
scripts/email-archive --index <n>
Examples:
scripts/email-archive --index 1 --index 2 --index 3
scripts/email-archive --index 1,2,3,4,9,10
inbox.scripts/email-open --index <n> (uses UID).scripts/email-archive --index <n>.--mailbox "<Name>".scripts/email-mailboxes --account <icloud>.--json-out./tmp/inbox.json replaces the previous snapshot and becomes the new source of truth for follow-up actions.inbox, email-open, email-reply, email-mailboxes, email-archive) read the app password from the ICLOUD_APP_PASSWORD environment variable.ICLOUD_APP_PASSWORD is not set, the script falls back to an interactive getpass() prompt, which fails in non-interactive/headless runs.ICLOUD_APP_PASSWORD is exported in the current session before assuming the credential is wrong.[AUTHENTICATIONFAILED], treat it as a different service credential rather than the iCloud app password.python3 - <<'PY' import os print('ICLOUD_APP_PASSWORD' in os.environ) PYsecurity find-internet-password -a '<icloud-user>' -s 'imap.mail.me.com' -g 2>&1 | headsecurity find-generic-password -a '<icloud-user>' -g 2>&1 | head📧 **<account>**.—.If the user notices failures, add specific rules in rules.json to refine future recommendations.
Rules live in rules.json inside this skill (single source of truth).