← 返回 Skills 市场
melvynx

Lumail

作者 Melvyn · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
120
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install lumail
功能描述
Manage Lumail email marketing platform via CLI and TypeScript SDK. Use this skill whenever working with email marketing, subscriber management, campaign crea...
使用说明 (SKILL.md)

Lumail - Email Marketing CLI & SDK

Interact with the Lumail API using either the CLI (pnpm lumail) or the TypeScript SDK (import { Lumail } from "@/lib/lumail-sdk").

Quick Start

# Set your API key first
pnpm lumail auth set \x3Cyour-api-key>

# Verify it works
pnpm lumail auth test

CLI Reference

All CLI commands run via pnpm lumail \x3Ccommand>. Every command supports global flags.

Global Flags

Flag Description
--json Output as JSON
--format \x3Ctext|json|csv> Output format (default: text)
--verbose Enable debug logging
--no-color Disable colored output
--no-header Omit table headers (for piping)

Authentication

pnpm lumail auth set \x3Ctoken>       # Save API key (~/.config/lumail/token)
pnpm lumail auth show              # Show masked token
pnpm lumail auth show --raw        # Show full token
pnpm lumail auth remove            # Delete saved token
pnpm lumail auth test              # Verify token is valid

Subscribers

# Create or upsert a subscriber
pnpm lumail subscribers create --email [email protected] --name "John" --tags vip beta

# Get subscriber by email or ID
pnpm lumail subscribers get [email protected]

# Update subscriber
pnpm lumail subscribers update [email protected] --name "John Doe"
pnpm lumail subscribers update [email protected] --tags premium --replace-tags

# Delete subscriber
pnpm lumail subscribers delete [email protected]

# Unsubscribe
pnpm lumail subscribers unsubscribe [email protected]

# Manage tags
pnpm lumail subscribers add-tags [email protected] --tags vip premium
pnpm lumail subscribers remove-tags [email protected] --tags old-tag

# List events
pnpm lumail subscribers events [email protected] --take 50 --order desc

Campaigns

# List campaigns
pnpm lumail campaigns list
pnpm lumail campaigns list --status DRAFT --page 1 --limit 50
pnpm lumail campaigns list --query "welcome" --json

# Create campaign
pnpm lumail campaigns create --subject "Welcome!" --name "Welcome Campaign"

# Get campaign details
pnpm lumail campaigns get \x3CcampaignId>

# Update campaign (DRAFT only)
pnpm lumail campaigns update \x3CcampaignId> --subject "Updated Subject" --preview "Preview text"

# Delete campaign (DRAFT only)
pnpm lumail campaigns delete \x3CcampaignId>

# Send immediately
pnpm lumail campaigns send \x3CcampaignId>

# Schedule for later
pnpm lumail campaigns send \x3CcampaignId> --scheduled-at 2025-12-25T10:00:00Z --timezone UTC

Tags

pnpm lumail tags list
pnpm lumail tags create --name "premium"
pnpm lumail tags get premium          # By name or ID
pnpm lumail tags update \x3Cid> --name "gold"

Emails (Transactional)

# Send transactional email
pnpm lumail emails send \
  --to [email protected] \
  --from [email protected] \
  --subject "Order Confirmation" \
  --content "Your order #123 is confirmed." \
  --content-type MARKDOWN

# With tracking disabled
pnpm lumail emails send --to x --from y --subject z --content "Hello" --transactional

# Verify email address
pnpm lumail emails verify [email protected]

Events

pnpm lumail events create \
  --type SUBSCRIBER_PAYMENT \
  --subscriber [email protected] \
  --data '{"amount": 99, "plan": "pro"}'

Event types: SUBSCRIBED, UNSUBSCRIBED, TAG_ADDED, TAG_REMOVED, EMAIL_OPENED, EMAIL_CLICKED, EMAIL_SENT, EMAIL_RECEIVED, WORKFLOW_STARTED, WORKFLOW_COMPLETED, WORKFLOW_CANCELED, FIELD_UPDATED, EMAIL_BOUNCED, EMAIL_COMPLAINED, WEBHOOK_EXECUTED, SUBSCRIBER_PAYMENT, SUBSCRIBER_REFUND

Tools (V2 API)

The V2 tools API provides 59+ tools for AI agents and advanced operations.

# List all available tools
pnpm lumail tools list

# Get tool schema
pnpm lumail tools get list_subscribers

# Run a tool
pnpm lumail tools run list_subscribers --params '{"limit": 10, "status": "SUBSCRIBED"}'
pnpm lumail tools run create_campaign --params '{"name": "Test", "subject": "Hello"}'
pnpm lumail tools run send_campaign --params '{"campaignId": "abc123"}'

SDK Reference

The SDK lives at src/lib/lumail-sdk/ and is importable via @/lib/lumail-sdk.

Setup

import { Lumail } from "@/lib/lumail-sdk";

const lumail = new Lumail({
  apiKey: "lm_...",
  baseUrl: "https://lumail.io/api", // optional, defaults to this
});

Subscribers

// Create/upsert
const { subscriber } = await lumail.subscribers.create({
  email: "[email protected]",
  name: "John",
  tags: ["vip", "beta"],
  fields: { company: "Acme" },
  triggerWorkflows: true,
});

// Get by email or ID
const { subscriber } = await lumail.subscribers.get("[email protected]");

// Update
await lumail.subscribers.update("[email protected]", { name: "John Doe" });

// Delete
await lumail.subscribers.delete("[email protected]");

// Unsubscribe
await lumail.subscribers.unsubscribe("[email protected]");

// Tags
await lumail.subscribers.addTags("[email protected]", ["premium"]);
await lumail.subscribers.removeTags("[email protected]", ["old-tag"]);

// Events (cursor-based pagination)
const { events, nextCursor } = await lumail.subscribers.listEvents("[email protected]", {
  take: 20,
  order: "desc",
  eventTypes: ["EMAIL_OPENED", "EMAIL_CLICKED"],
});

Campaigns

// List with pagination
const { campaigns, total, pageCount } = await lumail.campaigns.list({
  status: "DRAFT",
  page: 1,
  limit: 20,
  query: "welcome",
});

// Create
const { campaign, campaignId } = await lumail.campaigns.create({
  subject: "Welcome!",
  name: "Welcome Campaign",
  contentType: "MARKDOWN",
});

// Get
const { campaign } = await lumail.campaigns.get(campaignId);

// Update (DRAFT only)
await lumail.campaigns.update(campaignId, { subject: "Updated Subject" });

// Delete (DRAFT only)
await lumail.campaigns.delete(campaignId);

// Send immediately
await lumail.campaigns.send(campaignId);

// Schedule
await lumail.campaigns.send(campaignId, {
  scheduledAt: "2025-12-25T10:00:00Z",
  timezone: "UTC",
});

Emails (Transactional)

const { qstashMessageId } = await lumail.emails.send({
  to: "[email protected]",
  from: "[email protected]",
  subject: "Order Confirmation",
  content: "Your order is confirmed.",
  contentType: "MARKDOWN", // "MARKDOWN" | "HTML" | "TIPTAP"
  tracking: { links: true, open: true },
});

// Verify email
const { isValid } = await lumail.emails.verify({ email: "[email protected]" });

Tags

const { tags } = await lumail.tags.list();
const { tag } = await lumail.tags.create({ name: "premium" });
const { tag } = await lumail.tags.get("premium"); // by name or ID
await lumail.tags.update("premium", { name: "gold" });

Events

await lumail.events.create({
  eventType: "SUBSCRIBER_PAYMENT",
  subscriber: "[email protected]",
  data: { amount: 99, plan: "pro" },
});

Tools (V2 API)

// List all tools
const { tools, grouped } = await lumail.tools.list();

// Get tool schema
const { tool } = await lumail.tools.get("list_subscribers");

// Run a tool with typed response
const result = await lumail.tools.run\x3C{ subscribers: unknown[] }>(
  "list_subscribers",
  { limit: 10 },
);

Error Handling

The SDK throws typed errors - catch specific error types:

import {
  Lumail,
  LumailAuthenticationError,
  LumailNotFoundError,
  LumailRateLimitError,
  LumailValidationError,
  LumailPaymentRequiredError,
} from "@/lib/lumail-sdk";

try {
  await lumail.subscribers.get("[email protected]");
} catch (error) {
  if (error instanceof LumailNotFoundError) {
    // 404 - subscriber not found
  } else if (error instanceof LumailAuthenticationError) {
    // 401 - invalid API key
  } else if (error instanceof LumailRateLimitError) {
    // 429 - rate limited, error.retryAfter has delay in ms
  } else if (error instanceof LumailPaymentRequiredError) {
    // 402 - plan limit reached
  } else if (error instanceof LumailValidationError) {
    // 400 - invalid request
  }
}

Retry Behavior

  • GET/PUT/DELETE requests retry up to 3 times on network errors and 429s
  • POST/PATCH requests do NOT retry (prevents duplicate subscribers/emails)
  • Retry delays: 1s, 2s, 4s (exponential backoff)
  • Respects Retry-After header from rate limit responses
  • Default timeout: 30s per request

npm Package

Published as lumail on npm. Dual CLI + library:

# CLI usage (after npm install -g lumail)
npx lumail auth set \x3Ctoken>
npx lumail subscribers create --email [email protected]

# Library usage
import { Lumail } from "lumail";
const lumail = new Lumail({ apiKey: "lm_..." });

Package source: packages/lumail/ Build: bun run build (in packages/lumail/) Auto-release: pushes to main trigger GitHub Actions release

File Locations

Component Path
SDK source src/lib/lumail-sdk/
CLI source src/cli/
npm package packages/lumail/
Build script packages/lumail/build.ts
Tests __tests__/lumail-sdk.test.ts, __tests__/lumail-cli.test.ts
API docs content/docs/api-reference/
GH Action .github/workflows/release-lumail.yml
安全使用建议
Before installing or enabling this skill: 1) confirm whether your agent environment actually has pnpm/node and the Lumail CLI/SDK available — the SKILL.md assumes `pnpm lumail` but the skill metadata doesn't declare this; 2) treat the Lumail API key as a secret — avoid running `auth show --raw` or letting the agent print/store the token in places other than a secured credential store; 3) ask the publisher or maintainer to update the skill metadata to declare required binaries (pnpm/node), the credential type (Lumail API key), and the config path (~/.config/lumail/token) so you can make an informed decision; 4) if you plan to test, do so in an isolated account or environment (use a test API key) and audit where the CLI writes tokens; 5) if you need the agent to manage secrets automatically, prefer a skill that declares its credential surface and does not instruct printing full secrets.
功能分析
Type: OpenClaw Skill Name: lumail Version: 0.1.0 The 'lumail' skill (SKILL.md) is classified as suspicious because it provides high-risk capabilities that, while plausibly necessary for its stated purpose, present a significant attack surface for an AI agent. Specifically, the CLI includes a command to display raw authentication tokens ('pnpm lumail auth show --raw') and a generic tool-execution interface ('pnpm lumail tools run'), both of which could be targeted by prompt injection to exfiltrate credentials or perform unauthorized API operations. Additionally, the skill requires network access to lumail.io and file system access to ~/.config/lumail/token, which are identified as risky behaviors under the provided criteria. No evidence of intentional malice was found, but the broad API surface and direct secret access warrant caution.
能力评估
Purpose & Capability
The SKILL.md clearly expects a CLI (pnpm lumail) and a TypeScript SDK import, plus an API key stored on disk (~/.config/lumail/token). The registry metadata declares no required binaries, no config paths, and no primary credential. Asking the agent to prefer this skill for Lumail tasks is coherent with the description, but the metadata omission (pnpm/node and the API key) is disproportionate and inconsistent.
Instruction Scope
The instructions explicitly direct running `pnpm lumail` commands, setting an API key, and storing the token under ~/.config/lumail/token. They also describe `pnpm lumail auth show --raw` which prints the full token. Those file reads/writes and the explicit ability to print full credentials are outside what the registry metadata declared and create an opportunity for secret exposure if the agent follows instructions without restrictions.
Install Mechanism
This is an instruction-only skill with no install spec and no code files. That minimizes the on-disk footprint introduced by the skill itself. There is no download/install mechanism to evaluate.
Credentials
The SKILL.md requires an API key (it shows `pnpm lumail auth set <your-api-key>`) and uses a specific config path for storing the token, but the skill metadata lists no required environment variables or primary credential. The absence of declared credential requirements is inconsistent and reduces transparency about what secrets an agent might access or be asked to handle.
Persistence & Privilege
The skill is not forced-always, does not claim elevated persistent privileges, and does not attempt to modify other skills or system-wide configuration in the provided instructions. Its potential risk comes from secret handling rather than persistent platform privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lumail
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lumail 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of lumail CLI and SDK for email marketing. - Provides CLI commands for managing subscribers, campaigns, tags, events, transactional emails, and using V2 AI tools. - Includes TypeScript SDK for programmatic access to the Lumail API. - Supports subscriber management, campaign creation/sending, tag operations, email verification, and event tracking. - Offers output formatting options and authentication management. - Enables advanced operations via V2 tools API for AI-based tasks.
元数据
Slug lumail
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Lumail 是什么?

Manage Lumail email marketing platform via CLI and TypeScript SDK. Use this skill whenever working with email marketing, subscriber management, campaign crea... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。

如何安装 Lumail?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lumail」即可一键安装,无需额外配置。

Lumail 是免费的吗?

是的,Lumail 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Lumail 支持哪些平台?

Lumail 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Lumail?

由 Melvyn(@melvynx)开发并维护,当前版本 v0.1.0。

💬 留言讨论