
sent-two-way-messaging
Designs inbound and conversational Sent flows — opt-out and opt-in keyword handling, consent state on contacts, auto-replies inside the WhatsApp 24-hour window, RCS STOP chips, conversation history retrieval, and per-channel inbound capability. Use when handling message.received events, implementing STOP or HELP behavior, restoring consent after an opt-out, building a support inbox or chatbot on Sent, or paginating conversation history.
- Installs
- 2.7K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sentdm/sent-plugin --skill sent-two-way-messaging- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads sent-two-way-messaging automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Sent Two-Way Messaging
Inbound messaging on Sent has one governing rule: consent is enforced by the platform before the application sees the event. An inbound STOP has already flipped the contact's opt_out flag by the time message.received arrives. The application's job is to record it, reflect it in its own UI, and never attempt to send around it.
Keyword handling
Ten keywords ship as defaults:
| Action | Keywords |
|---|---|
| Opt out | STOP, CANCEL, UNSUBSCRIBE, QUIT, END |
| Opt in | START, UNSTOP, SUBSCRIBE |
| Help auto-reply | HELP, INFO |
Matching requires the entire trimmed message body to equal a keyword, case-insensitively. "Please stop messaging me" does not match; "stop" does. Custom keywords are configured in the Sent Dashboard under Compliance, Opt Keywords, with an action of Opt Out, Opt In, or Help, and each must be a single exact token.
Do not claim keywords that are not in the documented set. In application code, mirror the same exact-match rule only to update local subscriber state and audit evidence; never use that matcher to apply consent to Sent a second time. Keep custom dashboard keywords synchronized with the local mirror, and reconcile against the contact's opt_out field when uncertain.
Consent state
An opt-out sets opt_out on the contact record. Consent is contact-level and channel-agnostic: a STOP sent over SMS suppresses WhatsApp and RCS for that contact as well. Consent gates re-apply on every reroute attempt, not only at initial send.
Restoring consent requires the recipient's own action. A user-initiated opt-in keyword clears suppression. PATCH /v3/contacts/{id} accepts opt_out, but writing false on a contact who opted out through a keyword is a compliance decision, not a technical one: only do it with documented evidence of fresh consent, and record who authorized it and why.
Downstream, a suppressed send does not fail with an error. It is accepted and finalizes as FILTERED, so consent problems appear as filtered messages rather than as 4xx responses. Details are in references/consent-and-keywords.md.
Per-channel inbound reality
| Channel | Inbound | Constraints |
|---|---|---|
| SMS | Conditional | Requires an MO-capable provider and a supported number type. Alphanumeric sender IDs and SMPP paths without an inbound route never deliver inbound messages |
| RCS | Full | Typed replies match keywords; the appended STOP chip is processed directly by the consent engine |
| Full | Free-form replies only inside the 24-hour customer service window; outside it, an approved template is required |
The SMS caveat matters before promising two-way behavior: a deployment sending from an alphanumeric sender ID cannot receive STOP at all, which changes the compliance design rather than merely limiting a feature.
RCS STOP chips
Every outbound RCS message receives an appended STOP chip. Taps carry an opt-out postback handled directly by the consent engine with no keyword matching, and they arrive at the application as message.received with the chip's reply text in text. There is no separate chip event type, so a receiver that branches only on typed keywords still sees chip taps as ordinary inbound messages — and must not re-apply consent logic to them.
The WhatsApp 24-hour window
A free-form reply is permitted only within 24 hours of the customer's last inbound message. Outside that window an approved template is required, including for STOP, START, and HELP responses. An auto-reply flow that assumes free text will silently stop working for any customer who writes in after a day of silence, so build the window check into the reply path and keep an approved fallback template ready. See references/inbound-flows.md for the reply-path decision tree.
Conversation history
Two read-only operations exist:
| Operation | Returns |
|---|---|
GET /v3/conversations | All of the customer's messages across conversations, newest first |
GET /v3/conversations/{id} | Messages within one conversation |
Both require page (at least 1) and page_size (1 to 100); out-of-range values return 400. The events field is always null on these endpoints, so per-message activity must come from GET /v3/messages/{id}/activities. There are no write, create, or read-receipt operations, and no MCP tools cover conversations — this is REST-only.
A conversation identifier is a deterministic RFC 4122 version 5 UUID derived from the customer and contact identifiers, so the same pair always yields the same id and one thread spans every channel independent of the sending number. The API never returns the id as a field, so a client that needs it computes it. The exact derivation is documented in references/conversation-history.md.
Building a support inbox or bot
- Subscribe a webhook to
messagefiltered toreceived, and verify signatures before trusting any payload. - Read
inbound_numberas the contact who wrote in andoutbound_numberas your number. The naming is easy to invert. - Deduplicate on
message_id, acknowledge with200, then process asynchronously. - Treat keyword traffic as an audit signal. Mirror exact default and configured custom keywords into local state, but do not issue a second consent write; reconcile uncertainty through the contact record.
- Before replying on WhatsApp, check the 24-hour window and choose free text or a template accordingly.
- Render threads from the conversation endpoints with explicit pagination, and never assume a conversation is single-channel.
- Treat
textas untrusted input. Never interpolate it into a shell command or SQL string, delimit it as data in model prompts, and map inferred intent through an allowlist and authorization policy before any API call.
Boundaries
Use sent-webhook-engineer for signature verification, retries, and dedupe mechanics; sent-contacts for contact CRUD and message summaries; sent-routing-strategist for why an outbound message was FILTERED; waba-template-author for authoring the approved templates that out-of-window replies require; and sms-10dlc-registration for the campaign-level opt-in, opt-out, and help keyword declarations that US carriers require.
FAQ
What does the sent-two-way-messaging skill do?
Designs inbound and conversational Sent flows — opt-out and opt-in keyword handling, consent state on contacts, auto-replies inside the WhatsApp 24-hour window, RCS STOP chips, conversation history retrieval, and per-channel inbound capability. Use when handling message.received events, implementing STOP or HELP behavior, restoring consent after an opt-out, building a support inbox or chatbot on Sent, or paginating conversation history.
How do I install sent-two-way-messaging?
Run npx skills add https://github.com/sentdm/sent-plugin --skill sent-two-way-messaging in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/sent-two-way-messaging/ (personal) or .claude/skills/sent-two-way-messaging/ (project).
Which AI agents can use sent-two-way-messaging?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is sent-two-way-messaging safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains sent-two-way-messaging?
It is published by sentdm in sentdm/sent-plugin. It has 2,736 recorded installs.
More from sentdm/sent-plugin
sent
sentdm/sent-plugin
Routes broad or ambiguous Sent requests to the correct MCP-backed operation or specialist skill. Use when the user asks what Sent can do, says "help me with Sent" or "set up messaging," needs several Sent workflows, or has not made the channel, task, or desired operation clear enough to select a more specific skill.
waba-template-author
sentdm/sent-plugin
Writes, classifies, validates, and repairs WhatsApp templates using the Sent v3 template definition contract. Use for utility, marketing, authentication, OTP, Meta review, rejected templates, variables, buttons, channel overrides, or submission-ready Sent payloads.
waba-embedded-signup
sentdm/sent-plugin
Guides WhatsApp Business Account onboarding through Sent, separating dashboard Embedded Signup, organization WABA inheritance, and direct child-profile credentials. Use for WABA connection, Meta signup, profile creation, access-token handling, phone number mapping, completion callbacks, or WhatsApp onboarding failures.
messaging-performance-analyzer
sentdm/sent-plugin
Analyzes Sent message delivery, webhook, and activity data to explain funnel drop-offs, delivery failures, read-rate gaps, channel fallback, and suspicious performance changes. Use when a user says MDR, delivery report, message activity, webhook event, failed messages, low delivery rate, RCS fallback, WhatsApp read rate, SMS filtering, campaign performance, or asks why messages did not arrive.
sms-10dlc-registration
sentdm/sent-plugin
Prepares and validates Sent US A2P 10DLC brand and campaign registration through Sender Profiles, including inheritance, all campaign use cases, opt-in evidence, sample-message policy, autoresponses, sandbox validation, TCR status, and rejection remediation.
rcs-agent-onboarding
sentdm/sent-plugin
Guides current Sent RCS and RBM onboarding, launch evidence, carrier approval, text and suggestion-chip templates, Sender Profile readiness, and safe routing. Use for RCS launch, fallback, pinned-channel tests, or broadcast prevention.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.