技能 azure-communication-sms-java
📦

azure-communication-sms-java

安全

使用 Azure 通信服务发送短信

使用 Azure 通信服务从 Java 应用程序发送短信。支持单条消息、批量发送、投递报告和 OTP 通知。

支持: Claude Codex Code(CC)
📊 71 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“azure-communication-sms-java”。 Send SMS to +14255551234

预期结果:

消息发送成功。消息 ID: abc123, 状态: 成功

正在使用“azure-communication-sms-java”。 Send bulk SMS to 100 recipients

预期结果:

批量完成: 98 条已投递, 2 条失败(号码无效)

正在使用“azure-communication-sms-java”。 Check delivery status

预期结果:

投递报告: 消息已投递至 +14255551234,时间 2024-01-15T10:30:00Z

安全审计

安全
v1 • 2/24/2026

This is a legitimate Azure Communication Services SMS Java SDK documentation skill. The static analyzer flagged 40 potential issues, but after evaluation, all findings are FALSE POSITIVES: backticks are markdown code block syntax (not shell commands), URLs are placeholder examples in documentation, and code references are standard error handling patterns. No security risks identified.

1
已扫描文件
280
分析行数
4
发现项
1
审计总数

高风险问题 (1)

Weak Cryptographic Algorithm Flag (FALSE POSITIVE)
Static analyzer flagged 'weak cryptographic algorithm' at lines 3, 246, 279. After review: these are YAML frontmatter, markdown table syntax, and documentation text. No cryptographic code exists in this skill.
中风险问题 (3)
External Commands Detection (FALSE POSITIVE)
Static analyzer flagged 27 instances of 'Ruby/shell backtick execution'. These are markdown code block delimiters (```java) in documentation, not actual shell commands.
Hardcoded URLs Detection (FALSE POSITIVE)
Static analyzer flagged 4 'Hardcoded URL' instances. These are placeholder example URLs in documentation (e.g., https://<resource>.communication.azure.com), not actual network connections.
System Reconnaissance Detection (FALSE POSITIVE)
Static analyzer flagged 'system reconnaissance' at lines 209, 214, 225, 228-230. These are legitimate error handling code examples (handling HTTP status codes, webhook handlers for delivery reports).
审计者: claude

质量评分

38
架构
100
可维护性
85
内容
50
社区
80
安全
100
规范符合性

你能构建什么

双因素认证

发送 OTP 码进行用户验证和账户安全

交易通知

发送订单确认、物流更新和支付提醒

营销活动

向客户群组发送批量促销信息

试试这些提示

基本短信发送
Use the azure-communication-sms-java skill to send a verification code '+14255551234' from my Azure ACS number
带选项的批量短信
Use the azure-communication-sms-java skill to send a flash sale notification to multiple recipients with delivery reporting enabled
异步批量发送
Use the azure-communication-sms-java skill to send async bulk messages to a list of phone numbers with tagging for tracking
错误处理
Use the azure-communication-sms-java skill to show how to handle rate limiting errors and invalid phone numbers when sending SMS

最佳实践

  • 始终使用 E.164 电话号码格式(+[国家代码][号码])
  • 为 OTP 等关键消息启用投递报告
  • 对 429 错误实施指数退避重试逻辑

避免

  • 不要在源代码中硬编码连接字符串 - 请使用环境变量
  • 不要在没有队列的情况下在高频 API 中同步发送短信
  • 不要跳过错误处理 - 单个收件人可能失败而其他收件人成功

常见问题

支持哪些身份验证方法?
三种方法:DefaultAzureCredential(推荐)、AzureKeyCredential 和连接字符串。
需要什么格式的电话号码?
需要 E.164 格式,例如 +14255550100。
如何启用投递报告?
在 SmsSendOptions 中设置 deliveryReportEnabled=true,并配置 Event Grid 订阅。
如果某个收件人的消息发送失败会怎样?
其他收件人仍会收到消息。请检查每个结果的 isSuccessful()。
是否有速率限制?
是的,Azure 会根据您的订阅应用速率限制。使用重试处理 429 响应。
可以发送到国际号码吗?
可以,但必须在 Azure 订阅中启用免费电话号码Messaging,并使用 E.164 格式。

开发者详情

文件结构

📄 SKILL.md