Agent skill
Manage inbox email. Uses the inbox script and stores metadata (ids) to open or archive messages later.
Install this agent skill to your Project
npx add-skill https://github.com/antoniolg/agent-kit/tree/main/skills/email
SKILL.md
Email (inbox)
Goal
List Gmail/iCloud inboxes showing a clean user view while preserving metadata (IDs) for later actions.
Base command
- Helper in the skill:
scripts/email-inbox - Always pass
--json-outto save metadata. - Configure accounts in
~/.config/skills/config.jsonunderemail: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
Flow
- Run the command with
--json-out /tmp/inbox.json. - Show the user ONLY the clean output (numbered list), using the agreed format (see "Output format").
- Read
/tmp/inbox.jsonto get IDs and keep them for later actions. - Propose recommended actions (archive/open/reply/wait) using your own judgment; ask for confirmation before acting.
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.
Metadata format
The JSON contains a list of items with:
index(number shown to the user)source(gmailoricloud)accountid(Gmail: threadId, iCloud: UID)fromsubject
Open an email (Gmail)
Use the helper:
scripts/email-open --index <n>
This prints the email (from/subject/date/body) and saves metadata to /tmp/email-open.json.
Reply to an email (Gmail/iCloud)
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
- If you need to reply-all (Gmail), add
--reply-all. - To force a subject:
--subject "Re: ..." - iCloud replies via SMTP with the same app password and stores a copy in Sent.
- To save to Sent without sending (already sent):
--append-only. - To avoid saving to Sent:
--no-append-sent. - By default it replies-all and keeps CC. To reply only to the sender:
--no-reply-all. - After sending a reply, archive the thread with
scripts/email-archive --index <n>to keep the inbox clean.
Archive an email (Gmail)
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
iCloud (current state)
- List: supported by
inbox. - Open: supported by
scripts/email-open --index <n>(uses UID). - Archive: supported by
scripts/email-archive --index <n>.- If it cannot detect the archive mailbox, use
--mailbox "<Name>". - To list mailbox names:
scripts/email-mailboxes --account <icloud>.
- If it cannot detect the archive mailbox, use
Missing context
- If the JSON is stale or missing, run inbox again with
--json-out.
Notes
- The script may prompt for the iCloud password if env vars are missing.
- Avoid showing IDs to the user; only show the clean list.
Output format
- Separate by account (Gmail/iCloud) while keeping the absolute numbering.
- Account header in bold:
đź“§ **<account>**. - Separator line after the header:
—. - Use emojis before each message with this legend:
- 🔍 open
- 🗂️ archive
- đź‘€ review
- ⏳ wait
- Do not bold the sender; bold is only for the account header.
Optional triage rules
If the user notices failures, add specific rules in rules.json to refine future recommendations.
Active rules
Rules live in rules.json inside this skill (single source of truth).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gen-pdf
Converts a Markdown file to a styled PDF with DevExpert branding (logo in bottom-right corner). Use when asked to generate a PDF from a Markdown document, or when any DevExpert proposal/document needs to be exported as PDF.
cloudflared-tunnel
Create temporary public URLs for localhost apps using Cloudflare Quick Tunnels with tmux-based process management. Use when you need to preview a local app externally (mobile device, remote collaborator, QA), including host-allowlist fixes when a dev server blocks external hosts.
whatsapp-evo
Manage WhatsApp via Evolution API (v2.x): list chats with unread messages and reply.
create-cli
Design command-line interface parameters and UX: arguments, flags, subcommands, help text, output formats, error messages, exit codes, prompts, config/env precedence, and safe/dry-run behavior. Use when you’re designing a CLI spec (before implementation) or refactoring an existing CLI’s surface area for consistency, composability, and discoverability.
academy-enrollments
Manage academy enrollments by appending rows to a Google Sheet (used by Zapier/n8n to grant LearnWorlds access).
monthly-content-report
Genera el informe mensual de correlación entre contenido publicado en X, visitas a /cursos/expert/ai en Umami y ventas de AI Expert. Cruza métricas para identificar qué contenido impulsa conversiones. Úsalo cuando Antonio pida el informe mensual, el análisis de ventas del mes, o quiera saber qué posts funcionan mejor para vender.
Didn't find tool you were looking for?