backend-sms-messaging
Use when the user asks about sending SMS, Twilio, Amazon SNS SMS, Vonage, OTP codes by SMS, WhatsApp Business API, STOP/opt-out handling, 10DLC or TCPA…
by j4flmao★ 47 GitHub stars
Install backend-sms-messaging in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
SMS Messaging Skill
Purpose
Build reliable, compliant SMS and messaging systems supporting transactional messages, 2FA delivery, WhatsApp integration, and comprehensive delivery tracking.
Agent Protocol
Trigger
User mentions SMS, text messaging, Twilio, AWS SNS, Vonage, WhatsApp API, 2FA via SMS, OTP delivery, message templates, TCPA compliance, opt-in/out, SMS delivery tracking, or messaging analytics.
Input Context
- SMS provider selection and credentials
- Message types (transactional, 2FA, notifications, alerts)
- Volume estimates and sending quotas
- Compliance requirements (TCPA, GDPR, local regulations)
- WhatsApp Business API requirements (template approval, opt-in)
- Fallback channel requirements
- International sending needs
Output Artifact
SKILL.md adherence document plus implemented messaging service, provider integration, template management, delivery tracking, and compliance handling.
Response Format
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- SMS provider integrated with failover/secondary provider
- Message template system with variable injection implemented
- 2FA OTP generation, delivery, verification flow operational
- Rate limiting per recipient, per number, per campaign enforced
- Opt-in/opt-out mechanism with consent record storage
- Delivery status tracking (sent, delivered, failed, undelivered)
- WhatsApp Business API integration with approved templates
- Cost tracking and budget alerts configured
- Fallback channel (SMS -> Voice -> Email) implemented
- Compliance documentation (TCPA, GDPR) generated
Max Response Length
4096 tokens
Workflow
- Provider Abstraction: Unified interface over multiple providers with failover.
interface MessageProvider {
name: string;
send(params: SendParams): Promise<SendResult>;
getStatus(messageId: string): Promise<DeliveryStatus>;
getBalance(): Promise<number>;
}
class MessagingService {
private providers: MessageProvider[];
constructor(primary: MessageProvider, secondary: MessageProvider) {
this.providers = [primary, secondary];
}
async send(params: SendParams): Promise<SendResult> {
const errors: Error[] = [];
for (const provider of this.providers) {
try {
const result = await provider.send(params);
await this.recordMessage({ ...params, provider: provider.name, messageId: result.messageId });
return result;
} catch (error) {
errors.push(error);
await this.recordFailover(params, provider.name, error.message);
}
}
throw new AggregateError(errors, 'All message providers failed');
}
private async recordMessage(data: MessageRecord): Promise<void> {
await MessageLog.create({
to: data.to,
from: data.from,
body: data.body,
provider: data.provider,
messageId: data.messageId,
status: 'sent',
sentAt: new Date(),
type: data.type,
});
}
}
- Twilio Integration: SMS and Voice with webhook status callbacks.
import twilio from 'twilio';
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
async function sendSmsTwilio(to: string, body: string): Promise<SendResult> {
const message = await client.messages.create({
to,
from: process.env.TWILIO_PHONE_NUMBER,
body,
statusCallback: `${process.env.BASE_URL}/webhooks/sms/twilio`,
});
return { messageId: message.sid, status: 'sent' };
}
// Status callback webhook
app.post('/webhooks/sms/twilio', (req, res) => {
const { MessageSid, MessageStatus, To, ErrorCode, ErrorMessage } = req.body;
const statusMap: Record<string, string> = {
queued: 'queued',
sent: 'sent',
delivered: 'delivered',
undelivered: 'failed',
failed: 'failed',
};
MessageLog.updateOne(
{ messageId: MessageSid },
{
status: statusMap[MessageStatus] || MessageStatus,
errorCode: ErrorCode,
errorMessage: ErrorMessage,
updatedAt: new Date(),
}
).exec();
res.send('<Response></Response>');
});
- 2FA OTP Delivery: Generate, send, verify, expire OTP codes.
class OTPService {
private readonly OTP_LENGTH = 6;
private readonly OTP_TTL = 300; // 5 minutes
private readonly MAX_ATTEMPTS = 3;
private readonly RESEND_COOLDOWN = 60; // 1 minute
async generateAndSend(
userId: string,
channel: 'sms' | 'voice' | 'email',
recipient: string
): Promise<{ expiresIn: number }> {
const recent = await OtpRecord.findOne({
userId,
sentAt: { $gt: new Date(Date.now() - this.RESEND_COOLDOWN * 1000) },
});
if (recent) {
throw new Error(`Please wait ${this.RESEND_COOLDOWN} seconds before requesting a new OTP`);
}
const code = this.generateCode();
const hashedCode = await bcrypt.hash(code,
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/2fa-sms.md
- references/compliance-analytics.md
- references/sms-messaging-advanced.md
- references/sms-messaging-fundamentals.md
- references/sms-messaging-monitoring.md
- references/sms-messaging-testing.md
- references/sms-providers.md
- references/whatsapp-api.md
FAQ
What does the backend-sms-messaging skill do?
Use when the user asks about sending SMS, Twilio, Amazon SNS SMS, Vonage, OTP codes by SMS, WhatsApp Business API, STOP/opt-out handling, 10DLC or TCPA. Produces SMS/OTP sending code with consent, rate limits and failover. Not for push notifications (use mobile-push-notifications) or email (use backend-transactional-email).
How do I install the backend-sms-messaging skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the backend-sms-messaging skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…