agent-sms-inbox/SKILL.md
Secure SMS agent workflow for building a text message chatbot, messaging agent, or SMS bot on Rewrite. Covers LLM-driven replies over application-owned inbound conversations with prompt-injection defense, action policy gates, risk-level escalation, and outbound send controls.
npx skillsauth add rewritetoday/skills agent-sms-inboxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build an application-owned SMS agent on top of Rewrite under strict safety controls.
../rewrite-inbound/references/payload-contract.md, then normalize into your app's internal schema as needed. Use @rewritetoday/types or @rewritetoday/zod from references/installation.md when helpful. Reject malformed events before any processing.contactId linkage from your application data.references/security-levels.md).references/safe-actions.md).send-sms/) when the policy allows it.type Decision = "allow" | "deny" | "escalate" | "confirm";
function evaluatePolicyGate(riskLevel: number, action: string, allowlist: Set<string>): Decision {
if (!allowlist.has(action)) return "deny";
if (riskLevel >= 4) return "escalate"; // high-risk → human
if (riskLevel === 3) return "confirm"; // sensitive → user confirmation
return "allow"; // levels 1–2
}
const decision = evaluatePolicyGate(riskLevel, requestedAction, ALLOWED_ACTIONS);
logger.info({ action: requestedAction, riskLevel, decision }); // checkpoint log
if (decision === "deny") throw new PolicyDeniedError(requestedAction);
references/installation.md../rewrite-inbound/references/payload-contract.mdreferences/threat-model.mdreferences/security-levels.mdreferences/safe-actions.mdreferences/local-dev-tunneling.mddevelopment
General SMS best-practices guide for Rewrite-based systems. Use when the agent needs to define SMS architecture, contacts and segments strategy, deliverability, templates, retries, observability, webhook handling, or rollout guardrails before or alongside implementation.
tools
Production SMS delivery workflow for Rewrite. Use when the agent needs to send transactional or campaign SMS, manage Rewrite contacts or segments, implement batching, enforce idempotency, use templates and scheduling, and integrate the official Rewrite SDKs, REST client, CLI, or ecosystem packages.
development
Rewrite webhook ingestion workflow for your application. Use when the agent needs to configure Rewrite webhooks, verify signatures, parse and normalize event payloads, handle retries and dedupe, inspect delivery logs, and route delivery or OTP events safely.
tools
Rewrite platform router for API, SDK, CLI, contacts, segments, webhooks, templates, and AI workflows. Use when the agent needs to send SMS, manage Rewrite contacts or segments, handle Rewrite webhook events, work with official Rewrite SDKs/packages, or build application-owned agent flows on top of Rewrite.