Use when integrating the NocoBase 3 Mail plugin into an application: configure Gmail, Microsoft 365, or IMAP/SMTP accounts, embed mail UI, send from business code, or diagnose synchronization and delivery.
npx skills add https://github.com/nocobase/nocobase --skill nocobase-app-plugin-mail
Provide a safe, contract-first workflow for integrating the installed @nocobase/app-plugin-mail package into a NocoBase 3 application and validating the requested behavior.
This Skill covers application composition, provider configuration, account connection, production mail UI, business-code sending, drafts, attachments, synchronization, and delivery diagnostics. Use the installed package's public Client, Server, and HTTP contracts; versions may differ from the references.
Do not change the Mail plugin implementation from an application integration task, access private stores or database tables directly, configure notification delivery, authorize an external mailbox without the user's approval, or claim that mocked checks prove live provider delivery.
| Input | Required | Default | Validation |
| ------------ | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| action | yes | none | One of inspect, configure, integrate, send, or diagnose. Stop and ask when absent or outside the enum. |
| target | yes | none | Application path, installed package path, route, provider, account, or failure identifier relevant to action. Stop and ask when absent. |
| provider | no | auto | One of gmail, microsoft, imap-smtp, or auto; auto means infer only when the target identifies one provider. |
| scope | no | local | One of local, authorized-test, or production; live mailbox mutations require explicit authorized-test or production scope. |
| validation | no | static | One of static, mocked, or live; never imply live when credentials or an authorized environment are unavailable. |
Before any mutation, confirm that action, target, and the intended scope are present and valid. If a required value is missing, stop and ask rather than guessing. Clarification is bounded to max clarification rounds=2 and max questions per round=3.
When the user says “you decide”, use provider=auto, scope=local, and validation=static; do not connect an account, send mail, mutate a mailbox, or change production configuration under those defaults. For an ambiguous provider, inspect the installed configuration first, then ask if more than one provider remains possible.
client/plugins.ts, server/plugins.ts, and relevant configuration before editing.mailServiceToken or mailClientToken instead of constructing internal stores or runtimes.| Task | Read |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| Register Mail, configure provider quotas, connect an account, configure OAuth/push, or replace credential storage | Configuration and accounts |
| Embed a production workspace, connect business records, customize reading/composition, or add management and log pages | Client integration |
| Send from business code, manage drafts or attachments, schedule or bulk-send, or handle uncertain delivery | Sending and drafts |
| Upgrade the participant index, set an initial sync boundary, handle Gmail quota errors, recover synchronization, or diagnose stalled tasks and logs | Synchronization and diagnostics |
Do not expose credential values in logs, reports, screenshots, or test output. The default credential vault stores plain JSON in the database; promise encryption only when an application-supplied vault is configured.
Participant-index upgrades require a backed-up maintenance window with application writes and Mail synchronization stopped; complete and verify the historical backfill before restarting or exposing filtered results. Bounded batches do not make this an online backfill. Read the upgrade checklist before deployment.
Treat accepted as provider acceptance, not recipient delivery; unknown may mean the provider already sent the message. Do not retry an uncertain submission until the sending reference and provider state have been checked.
For destructive or external actions, keep the operation reversible where possible. If a configuration write is wrong, restore the read-back value from the prior snapshot and report the rollback. If a mailbox mutation is wrong, stop further mutations and use the provider's supported move, restore, or deletion-recovery operation; do not edit Mail tables directly. See Rollback Guidance below.
High-impact actions include account connection, mailbox mutation, credential replacement, and production configuration writes.
For a wrong configuration write, stop dependent work, restore the previous value from the captured snapshot, read it back, and report the restored state. For a wrong account or mailbox mutation, stop further mutations, use the provider-supported restore or move operation, read the resulting operation status, and report any provider-side recovery that remains unavailable. Never repair state by editing Mail tables directly.
action or target and confirm that the workflow stops and asks for clarification.Minimum scenarios: a normal local inspection; a normal configured or integrated path; missing required input; invalid provider or permission; and an authorized live operation or an explicit record that live validation is unavailable.
Take nocobase/nocobase-app-plugin-mail from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.