flowstate-epic-flowstate-community-epicdm-flowstate-mail
Package-local agent skill for @epicdm/flowstate-mail.
Tags
Publisher
Versions
1 version published — latest: 1.0.7
- 1.0.7publishedInvalid Date
Skill
flowstate-mail Package Skill
Package: @epicdm/flowstate-mail
Repository: epic-flowstate-community
Path: packages/flowstate-mail
Version: 1.0.7
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
FlowState Mail Adapter Selection
Purpose
Use this skill to choose and configure the right mail transport while preserving optional peer dependency behavior and consistent SendResult semantics.
Read First
packages/flowstate-mail/src/adapters/interface.tspackages/flowstate-mail/src/adapters/console.tspackages/flowstate-mail/src/adapters/nodemailer.tspackages/flowstate-mail/src/adapters/sendgrid.tspackages/flowstate-mail/tests/console-adapter.test.tspackages/flowstate-mail/tests/nodemailer-adapter.test.tspackages/flowstate-mail/tests/sendgrid-adapter.test.ts
Adapter Choices
Use ConsoleAdapter for local development and tests that do not need external email delivery. It logs email content and returns every recipient as accepted.
Use NodemailerAdapter for SMTP, local mail servers, SES-style SMTP, or sendmail. It supports:
- SMTP config:
host,port, optionalsecure, optionalauth, optionaltls. - Sendmail config:
sendmail: true, optionalpath, optionalnewline.
Use SendGridAdapter when production delivery should go through SendGrid. It requires apiKey and from.
Use a custom adapter when callers need another provider. Implement MailAdapter.send(message) and optional verify().
Optional Peer Rule
nodemailer and @sendgrid/mail are optional peer dependencies. Their adapters dynamically import the SDKs so callers who do not use that provider do not pay module-load cost or need the package installed.
Do not replace dynamic imports with top-level imports unless the package policy changes.
SendResult Semantics
messageIdis provider-specific and can be an empty string if the provider does not return one.acceptedlists recipients accepted by the adapter/provider.rejectedlists recipients rejected by the adapter/provider.- Nodemailer can return partial rejections.
- SendGrid adapter currently treats a successful API send as all requested recipients accepted.
Verification Semantics
ConsoleAdapter.verify()always returnstrue.NodemailerAdapter.verify()awaits initialization and returnsfalseif transport verification throws.SendGridAdapter.verify()awaits initialization and returnstrueif the client is set.
Common Mistakes
- Do not assume
verify()exists on every custom adapter; it is optional. - Do not log or persist provider secrets in adapter setup errors.
- Do not pass undefined SMTP option keys when building Nodemailer config; the adapter intentionally omits absent
auth,secure, andtls. - Do not use ConsoleAdapter as evidence that real delivery occurred.
Verification
yarn workspace @epicdm/flowstate-mail test --runInBand tests/console-adapter.test.ts tests/nodemailer-adapter.test.ts tests/sendgrid-adapter.test.ts
Package Skill Inventory
@epicdm/flowstate-mail Skill Inventory
Skill Set
| Skill | Purpose |
|---|---|
flowstate-mail | Orient agents to the package and route mail work to the right focused skill. |
flowstate-mail-template-workflow | Teach how templates load, render, fail, and support previews/tests. |
flowstate-mail-adapter-selection | Teach how to choose, configure, verify, or extend Console, Nodemailer, and SendGrid adapters. |
flowstate-mail-auth-server-integration | Teach how flowstate-auth-server uses this package for verification-code email. |
flowstate-mail-maintenance | Teach how to maintain exports, optional peers, tests, docs, feature matrix, and Dojo content. |
Design Notes
The package has only five inventory features, but the useful learning path is workflow-based. Agents need to understand how adapters and templates compose through MailService, how optional peer dependencies are preserved, and how the auth server uses the package in production.
Not Included
- No one-function skilllets for each class. Those do not help agents operate the package.
- No generated Dojo text reused directly. Existing Dojo content is generic and should be rebuilt from reviewed skills.
- No instructions to deep-import adapter files; consumers should use the package entrypoint.
Review Gate
@epicdm/flowstate-mail Skills Review
Verdict
Pass with tracked follow-ups.
The authored skills are source-backed and workflow-oriented. They cover the package's actual operational use: service facade, template rendering, adapter selection, auth-server verification email integration, and maintenance.
Coverage
- Mail service facade: covered from
src/mail-service.ts. - Template lifecycle: covered from
src/template-engine.tsand template tests. - Adapter behavior: covered from
src/adapters/*and adapter tests. - Auth-server integration: covered from
packages/flowstate-auth-server/src/server.tsandsrc/routes/auth.routes.ts. - Generated content drift: covered from existing README, feature inventory, and Dojo artifacts.
Verification Results
LC_ALL=C rg -n "[^\\x00-\\x7F]" packages/flowstate-mail/.flowstate/skills
rg -n "^name:|^description:" packages/flowstate-mail/.flowstate/skills
yarn workspace @epicdm/flowstate-mail test
yarn workspace @epicdm/flowstate-mail typecheck
yarn workspace @epicdm/flowstate-mail build
yarn workspace @epicdm/flowstate-mail lint
yarn nx build @epicdm/flowstate-mail
Results:
- ASCII scan passed with no non-ASCII matches.
- Frontmatter scan found
nameanddescriptionon all five skills. typecheckpassed.buildpassed and emitted CJS, ESM, sourcemaps, and DTS outputs.testpassed: 5 suites, 56 tests.lintpassed with 55 existing warnings from Console logging/async methods, optional-peeranyadapter usage, and test spy call typing.yarn nx build @epicdm/flowstate-mailpassed. Nx Cloud reported the existing unconnected-workspace 401 warning.
Follow-Ups
- Update README placeholder usage with real
MailServiceexamples. - Rebuild package-local Dojo artifacts from these reviewed workflow skills.
- Align auth-server test mocks with the real
SendResultshape when touching that package.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-mail/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-epic-flowstate-community-epicdm-flowstate-mail --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.