Busabase AirApp-first email inbox-zero operator. Reviews unread mail, drafts replies, and executes only explicitly approved archive/mark-read/send actions across configured IMAP accounts.
Ships in mr-kelly-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Kelly Email is a Busabase Cloud App-in-Skill. Its canonical product surface is the AirApp in Busabase, not a separate local-data product and not a chat-only review mode. The same Hono source supports an explicitly requested local preview with OAuth connection bootstrap.
The system has two deliberately separate sides:
The AirApp must never scan mailboxes, send mail, archive, mark read, delete, label, approve a ChangeRequest, or merge a ChangeRequest. An AirApp decision only records a Busabase change: with write access it lands at once, without it it waits as a ChangeRequest for someone who has write access. The trusted process remains the sole owner of mailbox side effects.
Default behavior is AirApp-first. Unless the user explicitly asks only for explanation or configuration help, update the Busabase batch and give the user the clickable AirApp URL. Start localhost only when local preview/debugging is explicitly requested; it uses the same Busabase resources and never offers another data provider.
All durable state belongs to the declared resources under the Kelly Email Folder:
kelly-email-reviews-v3: structured email review rows, drafts, decisions, and execution outcomes.kelly-email-contacts-v3: structured derived contacts.kelly-email-settings-v3: non-secret account configuration, Vault reference names, agent lock, and scan state.kelly-email-files-v3: email HTML and attachment artifacts.busabase:vault/kelly-email: IMAP/SMTP secret values.The last resolved Space and resource IDs live in app/resource-map.json and app/app/js/config.js. Treat them as scoped hints for that Space, not global identity. A local OAuth preview selects its Space before any resource access; deployed AirApp uses its ambient Space. On NOT_FOUND, discover the declared root slug with ownership metadata and lazily provision within the selected Space.
The app lazily materializes its declared Folder, Bases, and Drive when they are absent. It must verify ownership metadata (appId, resourceKey, schemaVersion) before adopting an existing same-slug node. A mismatch is a conflict, never permission to overwrite or move somebody else's resource.
Configuration is the kelly-email-config record in Email Settings. Its payload field follows config.example.json. Store only non-secret settings and Vault reference names in the record. Never store secret values, OAuth tokens, API keys, cookies, or passwords in a Base, Drive, source file, chat, screenshot, log, or execution report.
Busabase authentication is ambient inside the deployed AirApp, which must not show OAuth, API-key, Base URL, provider, hosting, or Space controls. Standalone loopback preview uses browser OAuth without exposing tokens; after OAuth it auto-selects a single/open-source Space or requires a native selector when several Spaces are accessible. It performs no app-resource read or initialization before selection. Agent-side Busabase tooling uses the user's existing credentials and explicit target Space. Mailbox credentials are resolved from authorized Vault references only.
The canonical app project is app/ and follows the Busabase AirApp runtime contract:
app/package.json has exact start: node server.js.busabase-sdk.app/app/ and use relative asset URLs.busabase-sdk; filesystem reads are only for packaged static assets.When changing the product, update the canonical app/ source first and submit an AirApp ChangeRequest in Busabase. Do not approve or merge that AirApp CR unless the user explicitly identifies and authorizes it. Return a clickable Inbox review URL.
Preserve the established approval-desk layout and visual quality:
All, Needs Review, Approved, Done, and Blocked.Help & Settings contains Guide, Files, Accounts, Profile, Style, Knowledge, Config, and appearance controls.Review #n per current batch so chat edits such as “改 2” resolve unambiguously.Screenshots in assets/screenshots/ define the expected product character. Refresh them when a material UI change is merged.
reply_as from original recipient, thread history, brand/product, customer domain, and customer language. Ask when ambiguous.mailbox_group_id.Before reading live mail, propose:
Batch plan:
- Accounts:
- Scope: unread support threads
- Folders / query / time window:
- Review quota:
- Auto-cleanup policy:
- Actions: triage / draft / prepare send-ready / execute approved
- Stop condition: one batch / account done / user stops
- Identity rules:
Please approve before I process this batch.
Allowed before approval: explain workflow, inspect declared Busabase readiness, prepare a configuration ChangeRequest, propose a batch, and ask non-secret clarifying questions.
Not allowed before approval: search/read/summarize/classify live mail, open attachments, draft from live mail, send, mark, archive, delete, label, unsubscribe, or move messages.
After triage, the AirApp is the approval surface. For each proposed action show the review reference, account, subject, reply identity, action, customer-visible draft or mailbox mutation, and risk. “Approve all” applies only to the exact latest visible proposal set.
Before a scan, verify:
kelly-email-config record with at least one mailbox.If resources are absent, use lazy provisioning. Do not ask the user to hand-create nodes or paste IDs.
If account configuration is absent, collect only non-secret details: mailbox address, aliases, IMAP/SMTP host/port/security/username, folders, mailbox group, outbound identities, display names, routing rules, profile, brands, URLs, style, and knowledge sources. Create a reviewable record CR in Email Settings based on config.example.json.
If secrets are absent, name the exact Vault keys to add. Never ask the user to paste the values into chat.
Do not scan mail until onboarding is ready.
finally.scripts/generate_review_batch.ts for the approved scope. Use --mailbox <mailbox-id> to limit secret checks and reads to one physical mailbox, and --recipient <email> when the support identity shares a mailbox with aliases; the recipient filter is applied by IMAP before message bodies are downloaded. It writes Reviews/Contacts/Settings/Drive through the provider.classification_method: agent_review with concise evidence and confidence.scripts/execute_ui_decisions.ts. Read only materialized, explicitly approved decisions; use --dry-run when unsure.The scan script is a trusted producer and may auto-merge its own review/contact/lock/scan-state records. AirApp writes follow the person's own permission, wherever the AirApp runs: with write access a decision lands at once; without it, it becomes a ChangeRequest for someone who has write access, and the app says it was sent for review. The app never forces review on its own writes. A decision that is still in an unmerged CR is not approval and must not be executed.
Default goal: all unread support-related threads in approved accounts. Every thread ends as one of:
reply_neededescalatewaiting_on_customerwaiting_on_userno_reply_cleanupnot_supportDefault scan stops when Needs Review reaches 5 or no in-scope unread mail remains. Low-risk notifications may continue within an explicitly approved cleanup policy and do not consume the review quota.
Always surface real customer intent, money, refunds, billing disputes, access problems, complaints, sales/partnership, privacy/security, unresolved technical alerts, attachments, course/homework/feedback, and unclear messages from real people.
Do not infer high risk from isolated keywords or tracking parameters. Judge sender, subject, visible intent, thread context, and requested action together.
After cleanup, report total, counts by category, and a compact list with account, UID/message identifier, sender/domain, short subject, and reason. Scan audit state belongs in the kelly-email-scan-state Settings record, never a local cache.
Supported decisions are defined in references/batch-schema.md, including archive, mark read, draft reply, send reply, keep unread, no action, needs review, and revise.
draft_reply is an approved agent task, not a mailbox mutation. After drafting, return the item to Needs Review for wording approval.archive and mark_read may execute after the corresponding materialized AirApp approval unless risk_policy.block_by_default explicitly requires another override.send_reply always requires an explicit materialized send decision and a non-empty approved draft. Broad cleanup approval never authorizes sending.In-Reply-To and References headers. Include only a short relevant quote unless the user requests a clean reply.Write customer replies for minimal editing:
For coupon or broken merge-tag replies, include the verified code and CTA URL. If either is unavailable, ask before sending.
references/inbox-accounts.md for account routing, aliases, labels, and per-account rules.references/support-taxonomy.md for classification, priority, and reusable support notes.references/batch-schema.md before changing review fields, workflow states, or decision semantics.config.example.json as the Settings Base payload template, never as a configured mailbox and never as a place for secret values.README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/screenshots/blocked-security-zh-CN.webp (opens in a new tab)assets/screenshots/blocked-security.webp (opens in a new tab)assets/screenshots/inbox-approval-zh-CN.webp (opens in a new tab)assets/screenshots/inbox-approval.webp (opens in a new tab)assets/screenshots/needs-review-zh-CN.webp (opens in a new tab)assets/screenshots/needs-review.webp (opens in a new tab)assets/screenshots/overview-zh-CN.webp (opens in a new tab)assets/screenshots/overview.webp (opens in a new tab)assets/screenshots/thumbs/blocked-security-zh-CN.webp (opens in a new tab)assets/screenshots/thumbs/blocked-security.webp (opens in a new tab)assets/screenshots/thumbs/inbox-approval-zh-CN.webp (opens in a new tab)assets/screenshots/thumbs/inbox-approval.webp (opens in a new tab)assets/screenshots/thumbs/needs-review-zh-CN.webp (opens in a new tab)assets/screenshots/thumbs/needs-review.webp (opens in a new tab)assets/screenshots/thumbs/overview-zh-CN.webp (opens in a new tab)assets/screenshots/thumbs/overview.webp (opens in a new tab)busabase.json (opens in a new tab)config.example.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
email-management, inbox-zero, busabase, email-automation, gated-write
Other plugins' skills for the same job
25 skills in this plugin
/agent-rulesAlign all AI coding agents to a single source of truth. AGENTS.md for rules, .agents/skills/ for skills, symlinks for everything else. Use when setting up a repo for multiple agents, or when links are missing, broken, or out of date./kelly-adsAd-campaign command desk (投放指挥台, Busabase App-in-Skill) for a cross-border e-commerce seller running Amazon Ads, Meta (FB/IG), TikTok Ads, and Google Ads. Use when the user invokes $kelly-ads or /kelly-ads, or asks about 投放, ad campaigns, ad spend, ACOS, ROAS, Amazon Ads, TikTok ads, Meta ads, Google Ads, search terms, negative keywords, bid adjustment, budget pacing, CPC spikes, rejected ads, ad anomaly detection, 广告优化, or reviewing agent-proposed adjustment cards (negative keyword, bid down/up, pause target, budget shift, creative refresh).//mr-kelly-skills:kelly-emailfrom mr-kelly-skills
npx claudepluginhub mr-kelly/skills --plugin mr-kelly-skills