Email logo

Email

Community
antoniolg
email

Manage inbox email. Uses the inbox script and stores metadata (ids) to open or archive messages later.

Overview

Publisherantoniolg
Repositoryagent-kit
Skill nameemail
Stars
97
Forks
16
Bundled files
8
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by antoniolg on GitHub. Read the source before you install it.

Installation

Install the Email AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/antoniolg/agent-kit.git /tmp/agent-kit
mkdir -p .claude/skills
cp -r /tmp/agent-kit/skills/email .claude/skills/email
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Email in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Email on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Email is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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-out to save metadata.
  • Configure accounts in ~/.config/skills/config.json under email:
    • gmail_accounts: list of Gmail accounts
    • icloud_user: iCloud user (optional)

Example:

json
{
  "email": {
    "gmail_accounts": ["you@gmail.com", "other@gmail.com"],
    "icloud_user": "you@icloud.com"
  }
}

Example:

scripts/email-inbox

Flow

  1. Run the command with --json-out /tmp/inbox.json.
  2. Show the user ONLY the clean output (numbered list), using the agreed format (see "Output format").
  3. Read /tmp/inbox.json to get IDs and keep them for later actions.
  4. Treat /tmp/inbox.json as a frozen snapshot until you explicitly refresh the inbox again.
  5. If the user says "archive all except 141, 144" (or similar), interpret "all" as all items from the last shown snapshot, not every message currently in the live inbox. This avoids archiving new emails that arrived after the list was shown.
  6. Only refresh/reload the inbox before acting when the user explicitly asks for it, or when you no longer trust the saved snapshot.
  7. Propose recommended actions (archive/open/reply/wait) using your own judgment; ask for confirmation before acting.
  8. When you execute archive actions and want to verify the result, do it sequentially: wait for the archive command to finish, then refresh the inbox. Do not run archive and refresh in parallel, or you may read a stale state and draw the wrong conclusion.

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 (gmail or icloud)
  • account
  • id (Gmail: threadId, iCloud: UID)
  • from
  • subject

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>.

Missing context

  • If the JSON is stale or missing, run inbox again with --json-out.
  • If you refresh, the new /tmp/inbox.json replaces the previous snapshot and becomes the new source of truth for follow-up actions.

Notes

  • The iCloud helpers (inbox, email-open, email-reply, email-mailboxes, email-archive) read the app password from the ICLOUD_APP_PASSWORD environment variable.
  • If ICLOUD_APP_PASSWORD is not set, the script falls back to an interactive getpass() prompt, which fails in non-interactive/headless runs.
  • If iCloud access fails, first verify whether ICLOUD_APP_PASSWORD is exported in the current session before assuming the credential is wrong.
  • If a candidate password exists in local config for the same email address but IMAP returns [AUTHENTICATIONFAILED], treat it as a different service credential rather than the iCloud app password.
  • Useful diagnostics:
    • python3 - <<'PY' import os print('ICLOUD_APP_PASSWORD' in os.environ) PY
    • security find-internet-password -a '<icloud-user>' -s 'imap.mail.me.com' -g 2>&1 | head
    • security find-generic-password -a '<icloud-user>' -g 2>&1 | head
  • 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).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Email AI skill do?

Manage inbox email. Uses the inbox script and stores metadata (ids) to open or archive messages later.

Why use Email on TypingMind?

Because you install it once and use it with any model. Email is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Email in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/antoniolg/agent-kit/tree/main/skills/email. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Email?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Email?

As many as you like. As long as a model supports skills, you can use Email with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Email AI skill free?

It is published on GitHub by antoniolg. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇