返回顶部
E

Email Validator 邮箱验证器

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
114
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

Email Validator

邮箱验证器

Claw0x提供的本地技能 — 完全在您的OpenClaw代理中运行。

验证电子邮件地址的格式正确性并评估风险等级。纯本地逻辑处理,无需外部API调用。

本地运行。 无需外部API调用,无需API密钥。完全隐私保护。

前置条件

无。 安装即可使用。

快速参考

触发条件执行操作返回结果
用户提供邮箱验证格式有效/无效 + 风险评分
检查一次性邮箱
运行验证 | 检测一次性域名 | | 批量邮箱验证 | 循环处理列表 | 逐一检查格式 | | 注册前预过滤 | 保存前验证 | 风险评估 |

5分钟快速上手

第一步:安装(30秒)

bash openclaw skills install email-validator

第二步:使用(1分钟)

typescript const result = await agent.run(email-validator, { email: user@example.com });

console.log(result.valid); // true/false
console.log(result.risk_score); // 10-100

第三步:获取结果(即时)

json { valid: true, email: user@example.com, checks: { format_valid: true, domain: example.com, local_part: user, is_disposable: false }, risk_score: 10, suggestion: null }

工作原理 — 底层机制

100%本地处理。零外部API调用。完全隐私保护。

该技能完全在您的代理环境中使用纯TypeScript逻辑运行。所有验证均在本地完成,使用:

  • - 正则表达式进行格式检查
  • 字符串操作提取域名
  • 对内置域名列表进行数组查找
  • 简单算术进行风险评分

第一步:本地格式验证(RFC 5322)

使用正则表达式模式在本地检查邮箱结构:

  • - 本地部分(@之前):1-64个字符,字母数字、点号、连字符、下划线、加号
  • 域名部分(@之后):带有顶级域名的有效主机名
  • 总长度:3-254个字符

无网络调用。纯字符串匹配。

第二步:本地域名分析

将提取的域名与内置列表(存储在代码中)进行比较:

  • - 一次性域名列表:10+个已知提供商(mailinator.com、guerrillamail.com等)
  • 免费提供商列表:8+个常见提供商(gmail.com、yahoo.com等)
  • 企业域名:不在上述列表中的任何域名

无DNS查询。纯数组查找。

第三步:本地风险评分

使用简单算术计算风险评分:

因素风险影响
无效格式+90(即时高风险)
一次性域名
+70 |
| 全数字本地部分 | +30 |
| 本地部分过短(<3个字符) | +20 |
| 免费邮箱提供商 | +10 |
| 有效企业域名 | +10(基准值) |

无外部评分API。纯数学计算。

分数越低 = 邮箱越安全。

该技能不执行的操作

  • - 无SMTP验证:不连接邮件服务器
  • 无DNS MX查询:不验证邮件交换记录
  • 无投递性检查:无法预测邮件是否会退回

这是有意设计的。该技能针对速度、确定性和零外部依赖进行了优化。

实际应用场景

场景1:注册表单验证

问题:在注册过程中过滤虚假邮箱 解决方案:验证格式并检查一次性域名 示例: typescript const result = await agent.run(email-validator, { email: test@mailinator.com });

if (result.risk_score > 70) {
console.log(检测到一次性邮箱);
}

场景2:批量邮箱列表清理

问题:在营销活动前清理邮箱列表 解决方案:验证所有邮箱并移除无效邮箱 示例: typescript const emails = [user1@example.com, invalid@, user2@gmail.com]; const results = await Promise.all( emails.map(email => agent.run(email-validator, { email })) );

const validEmails = results
.filter(r => r.valid && r.risk_score < 50)
.map(r => r.email);

场景3:B2B线索资格认定

问题:优先处理企业邮箱而非免费提供商 解决方案:使用风险评分对线索进行排序 示例: typescript const result = await agent.run(email-validator, { email: ceo@company.com });

// 企业域名 = 低风险评分(10-20)
// 免费提供商 = 中等风险(20-30)
// 一次性邮箱 = 高风险(80-100)

集成方案

OpenClaw代理

typescript import { Claw0xClient } from @claw0x/sdk;

const claw0x = new Claw0xClient(process.env.CLAW0XAPIKEY);

agent.onUserInput(async (input) => {
if (input.includes(@)) {
const result = await claw0x.call(email-validator, {
email: input
});

if (!result.valid) {
return 无效的邮箱格式;
}

if (result.checks.is_disposable) {
return 不允许使用一次性邮箱;
}
}
});

LangChain代理

python from claw0x import Claw0xClient

client = Claw0xClient(apikey=os.environ[CLAW0XAPI_KEY])

def validate_email(email: str) -> dict:
result = client.call(email-validator, {email: email})
return result

在链中使用

email = user@example.com validation = validate_email(email) if validation[valid]: print(f邮箱有效,风险评分:{validation[risk_score]})

自定义代理

javascript const response = await fetch(https://api.claw0x.com/v1/call, { method: POST, headers: { Authorization: Bearer ${process.env.CLAW0XAPIKEY}, Content-Type: application/json }, body: JSON.stringify({ skill: email-validator, input: { email: test@example.com } }) });

const result = await response.json();
console.log(result);

输入模式

字段类型必填描述
email字符串要验证的邮箱地址(3-254个字符)

输出模式

typescript
{
valid: boolean; // 邮箱格式是否有效
email: string; // 标准化(小写)后的邮箱
checks: {
format_valid: boolean; // RFC格式检查结果
domain: string; // 提取的域名
local_part: string; // 提取的本地部分(@之前)
is_disposable: boolean; // 域名是否为一次性域名
};
risk_score: number; // 风险评分(10 = 低,90 = 高)
suggestion: string | null; // 如果无效,提供建议
}

错误处理

错误原因解决方案
缺少必填字段:email未提供邮箱在输入中提供邮箱
email长度必须在3到254个字符之间
邮箱过短或过长 | 检查邮箱长度 |

关于Claw0x

该技能由Claw0x提供,是AI代理的原生技能层。

云端版本可用:对于需要集中分析的用户,云端版本可在claw0x.com/skills/validate-email获取。

探索更多技能claw0x.com/skills

GitHubgithub.com/kennyzir/validate-email

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 validate-email-1776007586 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 validate-email-1776007586 技能

通过命令行安装

skillhub install validate-email-1776007586

下载

⬇ 下载 Email Validator v1.0.1(免费)

文件大小: 5.28 KB | 发布时间: 2026-4-13 12:26

v1.0.1 最新 2026-4-13 12:26
- Adds full local (offline) email validation: no external API calls or API keys needed.
- Streamlines documentation with clear quickstart, integration recipes, and usage scenarios.
- Expands and clarifies input/output schema and error handling.
- Introduces local-only logic for format validation, domain checks, and risk scoring.
- Clearly explains what the skill does and does NOT do for user transparency.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部