agentleFS
GhostPawJSGhostPawJS/email/SKILL.md

email

Skill1 starsChanged 11 days agoMITView on GitHub

Read, search, compose, organize and synchronize email with a local SQLite cache. Use when managing email or searching cached messages.

  • Pipes a download into a shell

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use content, calendar and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Rayan55050Skill

    content

    Создание контента: посты, статьи, тексты

    Also in 7 projects that use this

  • jacobraskSkill

    calendar

    Interact with Apple Calendar via AppleScript. Use when the user asks to check calendar, view events, create events, manage schedule, find free time, or list calendars. Triggers include "my calendar", "my schedule", "calendar events", "create event", "add to calendar", "what's on my calendar", "free time", "available slots", "upcoming events", "today's events". Requires macOS with Calendar.app.

    Also in 6 projects that use this

  • anshul-garg27Skill

    repurpose

    Transform one piece of content into 10+ platform-native formats - threads, posts, scripts, newsletters, and more

    Also in 4 projects that use this

  • Rayan55050Skill

    finance

    Финансы: Monobank, подписки, курсы валют, рынки

    Also in 3 projects that use this

  • SentrySkill

    tts

    Generates spoken narration with Gemini TTS through Vercel AI Gateway. Use for text-to-speech, audio samples, voiceovers, or speaking as Junior with the reusable Junior voice. Do not use for transcription, voice cloning, music generation, or rendering a video without a narration request.

    Also in 3 projects that use this

  • jholhewresSkill

    journal

    Daily journaling with structured entries and reflections

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run tools as ghostpaw-email ....

    line 24
  2. Distinctive:

    Read mailbox state: folder list, message queue, thread view, single message body, attachment metadata, or raw EML export.

    line 65
  3. Distinctive:

    Use when: Inspect folders, cached messages, threads, attachments or raw message content.

    line 67
  4. Distinctive:

    Not for: Use mail_search to find messages by query or mail_organize to change them.

    line 69
  5. Distinctive:

    Search for messages locally via FTS or remotely via IMAP SEARCH.

    line 94
  6. Distinctive:

    Use when: Find messages by a local full-text query or a remote IMAP search.

    line 96
  7. Distinctive:

    Not for: Use mail_read when the folder and message UID are already known.

    line 98
  8. Distinctive:

    Use when: Send, reply, forward, or save and manage a draft after its content is agreed.

    line 125
  9. Distinctive:

    Not for: Use mail_read to inspect an existing message without sending or saving content.

    line 127
  10. Distinctive:

    Use when: Change message flags, labels, destinations or folder organization.

    line 187
  11. Distinctive:

    Not for: Use mail_read or mail_search when only inspection is requested.

    line 189
  12. Distinctive:

    Use when: Connect, disconnect, reconnect, refresh folders or synchronize the cache.

    line 218
  13. Distinctive:

    Not for: Use mail_read for cached content or the network watch stream for continuous monitoring.

    line 220

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

email

Install

Linux/macOS (checks SHA256SUMS and installs ~/.local/bin/ghostpaw-email):

curl -fsSL https://raw.githubusercontent.com/GhostPawJS/email/main/install.sh | sh

Windows x64:

irm https://raw.githubusercontent.com/GhostPawJS/email/main/install.ps1 | iex

Run tools as ghostpaw-email ...; use ~/.local/bin/ghostpaw-email if it is not on PATH.

Read and search cached email offline. Configure live accounts with email account add before network operations. Inspect messages before replying or changing folders. Confirm recipients and content before sending; trash and folder deletion can remove mail. Credentials use the existing email CLI account configuration or EMAIL_* environment variables.

Running inside sandboxed agent harnesses

Inside a Codex CLI --sandbox workspace-write session, the database and its parent directory must be inside a writable root, including SQLite's -wal and -shm side files. A default DB under ~/.ghostpaw outside those roots can fail with SQLITE_CANTOPEN or EPERM (often exit 70; directory creation failures may exit 2), even when normal shell permissions allow access. Put the DB inside the workspace with --db ./state/email.db, or set GHOSTPAW_EMAIL_DB="$PWD/state/email.db" for CLI/MCP use.

To use an external DB directory, add it when starting the OpenAI Codex CLI (replace <dir-with-db> with its absolute path):

codex exec --sandbox workspace-write --add-dir <dir-with-db> "Run the GhostPaw CLI"

Alternatively, set sandbox_workspace_write.writable_roots in ~/.codex/config.toml before starting the session:

[sandbox_workspace_write]
writable_roots = ["/absolute/dir-with-db"]

For the compact cheat sheet, run ghostpaw-email skill --short.

Calling tools

MCP: connect to ghostpaw-email, then call a tool by name with its JSON arguments.

CLI: ghostpaw-email call <tool> '<JSON object>' or ghostpaw-email <tool> --parameter value.

Inspect schemas with ghostpaw-email describe <tool>. Use --db <path> to select a database.

mail_read

Read mailbox state: folder list, message queue, thread view, single message body, attachment metadata, or raw EML export.

Use when: Inspect folders, cached messages, threads, attachments or raw message content.

Not for: Use mail_search to find messages by query or mail_organize to change them.

Writes: writes_state.

Nested requirements apply within the parent for the selected action.

ParameterTypeRequiredValues / description
viewstringyeseml. What to read.
folderstringnoFolder path (required for queue/message/attachment/eml).
uidintegernoMessage UID (required for message/attachment/eml).
threadIdstringnoThread ID (required for thread view).
partPathstringnoPart path for a specific attachment (optional for attachment view).
limitintegernoMaximum messages to return (queue view).
unreadOnlybooleannoFilter to unread messages only (queue view).
refreshbooleannoFetch live folder list from server before returning (folders/queue view).

Examples:

ghostpaw-email call mail_read '{"view":"folders"}'

mail_search

Search for messages locally via FTS or remotely via IMAP SEARCH. Returns matching message references.

Use when: Find messages by a local full-text query or a remote IMAP search.

Not for: Use mail_read when the folder and message UID are already known.

Writes: writes_state.

Nested requirements apply within the parent for the selected action.

ParameterTypeRequiredValues / description
querystringyesFree-text search query or FTS5 expression.
folderstringnoRestrict search to a specific folder.
modestringnolocal, remote. local (default) or remote IMAP SEARCH.
sincestringnoISO date string — only messages after this date.
beforestringnoISO date string — only messages before this date.
hasAttachmentsbooleannoFilter to messages with attachments.
unreadOnlybooleannoFilter to unread messages.
limitintegernoMaximum number of results.

Examples:

ghostpaw-email call mail_search '{"query":"invoice"}'

mail_compose

Compose and send email: send new message, reply, forward, save/update/send a draft.

Use when: Send, reply, forward, or save and manage a draft after its content is agreed.

Not for: Use mail_read to inspect an existing message without sending or saving content.

Writes: writes_state.

Nested requirements apply within the parent for the selected action.

ParameterTypeRequiredValues / description
actionstringyessend_draft. string value.
folderstringnoSource folder (required for reply/forward).
uidintegernoSource message UID (required for reply/forward/update_draft/send_draft).
inputobjectnoComposeInput / ReplyInput / ForwardInput payload.
input.fromobjectnoObject: address (required), name.
input.from.addressstringyesEmail address.
input.from.namestringnoDisplay name.
input.senderobjectnoObject: address (required), name.
input.sender.addressstringyesEmail address.
input.sender.namestringnoDisplay name.
input.envelopeFromobjectnoObject: address (required), name.
input.envelopeFrom.addressstringyesEmail address.
input.envelopeFrom.namestringnoDisplay name.
input.replyToobjectnoObject: address (required), name.
input.replyTo.addressstringyesEmail address.
input.replyTo.namestringnoDisplay name.
input.toarrayyesRecipient addresses.
input.to[].addressstringyesEmail address.
input.to[].namestringnoDisplay name.
input.ccarraynoRecipient addresses.
input.cc[].addressstringyesEmail address.
input.cc[].namestringnoDisplay name.
input.bccarraynoRecipient addresses.
input.bcc[].addressstringyesEmail address.
input.bcc[].namestringnoDisplay name.
input.subjectstringyesMessage subject.
input.textstringnoPlain text body.
input.htmlstringnoHTML body.
input.replyAllbooleannoReply to all original recipients.
input.modestringnoinline, attachment. string value.
input.attachmentsarraynoMessage attachments.
input.attachments[].filenamestringyesstring value.
input.attachments[].contentanyyesAttachment bytes (Buffer in library calls).
input.attachments[].mimeTypestringnostring value.
input.attachments[].inlinebooleannoboolean value.
input.attachments[].contentIdstringnostring value.
input.inReplyTostringnostring value.
input.referencesarraynoArray of string.
input.headersobjectnoobject value.

Examples:

ghostpaw-email call mail_compose '{"action":"send","input":{"to":[{"address":"reader@example.com"}],"subject":"Hello"}}'
ghostpaw-email call mail_compose '{"action":"reply","input":{},"folder":"INBOX","uid":1}'
ghostpaw-email call mail_compose '{"action":"forward","input":{"to":[{"address":"reader@example.com"}]},"folder":"INBOX","uid":1}'

mail_organize

Organize messages: mark read/unread/starred/answered, copy, move, archive, trash, junk, label, or manage folders.

Use when: Change message flags, labels, destinations or folder organization.

Not for: Use mail_read or mail_search when only inspection is requested.

Writes: writes_state.

Nested requirements apply within the parent for the selected action.

ParameterTypeRequiredValues / description
actionstringyesunsubscribe_folder. string value.
folderstringnoSource folder (required for message actions).
uidsarraynoMessage UIDs to act on.
destinationstringnoDestination folder (required for copy/move).
labelsarraynoLabels to set/add/remove.
pathstringnoFolder path (required for folder actions).
oldPathstringnoOld folder path (required for rename_folder).
newPathstringnoNew folder path (required for rename_folder).

Examples:

ghostpaw-email call mail_organize '{"action":"mark_read","folder":"INBOX","uids":[1]}'
ghostpaw-email call mail_organize '{"action":"mark_unread","folder":"INBOX","uids":[1]}'
ghostpaw-email call mail_organize '{"action":"star","folder":"INBOX","uids":[1]}'

mail_sync

Manage the IMAP connection lifecycle and sync local state: connect, disconnect, reconnect, sync folders, or refresh the folder list.

Use when: Connect, disconnect, reconnect, refresh folders or synchronize the cache.

Not for: Use mail_read for cached content or the network watch stream for continuous monitoring.

Writes: writes_state.

Nested requirements apply within the parent for the selected action.

ParameterTypeRequiredValues / description
actionstringyesconnect, disconnect, reconnect, sync, refresh_folders, watch. string value.
foldersarraynoFolders to sync or watch (optional — defaults to all subscribed folders).
bodiesstringnonone, missing, all. Body fetch strategy for sync (default: missing).

Examples:

ghostpaw-email call mail_sync '{"action":"connect"}'
ghostpaw-email call mail_sync '{"action":"disconnect"}'
ghostpaw-email call mail_sync '{"action":"reconnect"}'

Workflow guides

  • ghostpaw-email skill triage-inbox: Process a full inbox from scratch: sync to get latest state, read message queue, selectively fetch bodies for decisions, then bulk-organize by priority.
  • ghostpaw-email skill read-and-reply: Read a message with full thread context, then compose and send a properly-threaded reply with quoted attribution.
  • ghostpaw-email skill connect-and-sync: Establish or restore an IMAP connection, refresh the folder list, and pull new messages — handling first-run vs incremental scenarios.
  • ghostpaw-email skill search-and-act: Find messages matching criteria (local FTS first, remote IMAP SEARCH as fallback), verify targets, then act — organize, reply, or present.
  • ghostpaw-email skill compose-and-send: Full draft lifecycle — save, review, update, then send — plus direct send, reply, and forward with proper threading and forwarded-header blocks.
  • ghostpaw-email skill organize-bulk: Bulk organize messages across folders — flagging, moving, archiving, labelling — and manage the folder hierarchy as part of the flow.
  • ghostpaw-email skill attachment-workflow: Discover, inspect, and fetch email attachments on demand; embed attachments in outbound messages; and export or import full .eml files.
  • ghostpaw-email skill recover-from-disruption: Detect and recover from connection loss or IMAP/SMTP failures — reconnect with back-off, re-sync to reconcile state, and handle auth vs transient errors distinctly.
  • ghostpaw-email skill cli: Complete existing email CLI guide.

Principles

  • Inspect before changing messages.
  • Confirm recipients and content before sending.

Without the binary

For npm-based environments (Node 24+): npx -y @ghostpaw/email ....

Harnesses that embed it in code can import @ghostpaw/email as a library.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.