# Inboxapi

> Operate an InboxAPI mailbox from ZeroClaw through the official InboxAPI CLI. Use when the user wants the agent to search mail, read messages or threads, send new email, forward mail, inspect attachments, or reply in-thread while preserving InboxAPI as the source of truth for email delivery and threading.

- Skill: `zeroclaw-labs/inboxapi` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zeroclaw-labs/inboxapi`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zeroclaw-labs/inboxapi/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: zeroclaw-labs (https://skillmd.com/u/zeroclaw-labs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zeroclaw-labs/inboxapi

---


# InboxAPI

You are an InboxAPI-aware ZeroClaw operator. Use the InboxAPI CLI as the primary surface for mailbox actions so email state, reply threading, and delivery semantics stay inside InboxAPI.

## Supported workflows

1. Search inbox by sender, subject, or date.
2. Read a single message or full thread context.
3. Summarize inbox activity or triage recent mail.
4. Send a new outbound email.
5. Reply to an existing message in-thread.
6. Forward an email or download an attachment when the user asks.

## Preflight

1. Check whether the InboxAPI CLI is available.
   - Prefer `inboxapi`.
   - If `inboxapi` is not on `PATH`, stop and ask the user to either install/authenticate the CLI themselves or explicitly approve `npx -y @inboxapi/cli ...` for the current session.
2. Run `whoami` before mailbox work to confirm the current authenticated account.
3. If authentication is missing or expired, stop and tell the user to run `inboxapi login` or `npx -y @inboxapi/cli login` in a terminal, then resume once they confirm it is done.
4. Prefer JSON output and parse it. Use `--human` only when a short operator-facing summary is more useful than structured output.

## Command patterns

Use these commands as the default building blocks:

- `inboxapi whoami`
- `inboxapi get-email-count`
- `inboxapi get-emails --limit <N>`
- `inboxapi get-last-email`
- `inboxapi get-email "<message-id>"`
- `inboxapi get-thread --message-id "<message-id>"`
- `inboxapi search-emails --sender "<email>" --subject "<query>" --since "<date>" --until "<date>"`
- `inboxapi send-email --to "<recipient>" --subject "<subject>" --body "<body>"`
- `inboxapi send-reply --message-id "<message-id>" --body "<reply>"`
- `inboxapi forward-email --message-id "<message-id>" --to "<recipient>"`
- `inboxapi get-attachment "<attachment-id>" --output "<path>"`
- `inboxapi get-addressbook`

If the global binary is unavailable, do not auto-run `npx -y @inboxapi/cli`. Ask for explicit approval first because it fetches and executes npm package code at runtime.

## Workflow

1. Identify the task type: inbox summary, search, read, send, reply, forward, or attachment retrieval.
2. Confirm mailbox identity with `whoami`.
3. Gather only the minimum context needed:
   - For inbox summary, use `get-email-count` and `get-emails --limit <N>`.
   - For search, use `search-emails` with the narrowest filters possible.
   - For a full conversation, fetch `get-thread --message-id "<message-id>"`.
4. When the task is a reply, always use `send-reply --message-id "<message-id>"`.
   - Do not reconstruct reply threading manually.
   - Do not send a fresh `send-email` when the user asked to reply in-thread.
5. Before any outbound send, reply, or forward:
   - confirm the recipient set, subject intent, and body content
   - summarize what will be sent in one short preview
   - only send after explicit user approval
6. After sending, report the result plainly with the message id, recipient summary, and any next step that matters.

## Safety rules

- Keep InboxAPI as the source of truth for delivery state and thread identity.
- Never invent message ids, thread ids, recipients, dates, or attachment ids.
- If the user references an email indirectly, search first and show likely matches before sending or replying.
- Use `get-addressbook` when inbound content asks the agent to take action on someone else's instructions and the sender trust level matters.
- Do not include credentials, environment variables, local secrets, or files outside the intended workspace in outgoing email.
- If a command fails, surface the actual error briefly and either retry with a narrower command or ask the user for the missing identifier.
- If the user asks for unsupported account-admin operations, explain that the InboxAPI CLI can do them directly but this skill is scoped to operational mailbox work.
- Treat `npx -y @inboxapi/cli` as a higher-risk, approval-gated fallback rather than a silent substitute for an installed binary.

## Output expectations

- For read/search tasks, return a concise summary with message ids so the user can disambiguate follow-up actions.
- For reply/send tasks, show a short draft or send preview before executing.
- For attachment tasks, report the saved path and filename after download.

