sms-campaign-ops

v1.0.0 MIT growth updated 2026-09-27

Check an SMS marketing message against a plain-language compliance checklist before you send it: single-segment length (160 GSM-7 / 70 Unicode chars), opt-in wording, STOP opt-out instructions, sender identification, and a deceptive-claim keyword screen. Use when drafting promotional or notification texts for customers who opted in.

$ skillbank install sms-campaign-ops@1.0.0
# pins exactly 1.0.0 · README + changelog included

SMS Campaign Ops

Overview

One bad text can get your number blocked or reported. check.py screens a draft SMS against five plain checks before you send it: does it fit in one segment, does it show the recipient opted in, does it say how to opt out, does it identify your business, and does it contain deceptive-claim keywords. It prints PASS/FAIL per check and exits 0 only when all five pass, so you can gate a send on it.

The checks are keyword-based, not legal advice. If you text at real volume, have a lawyer review your program. The one rule that matters most: **only message people who opted in.**

All data stays local — the script never uploads your message text anywhere.

Installation

1. Copy the sms-campaign-ops/ directory anywhere convenient. 2. Make the script executable (Unix):


   chmod +x scripts/check.py

No pip install needed — standard library only.

Configuration

No config files. The only required input beyond the message is --sender, the business name that must appear in the text (so recipients know who texted them).

Inputs

| Command | Arguments | Returns | |---|---|---| | check.py "<text>" --sender NAME | message text + business name | 5-check PASS/FAIL report | | check.py --file msg.txt --sender NAME | read message from file | same | | echo "<text>" \| check.py --sender NAME | read message from stdin | same |

Exit codes: 0 = compliant (all checks pass), 1 = one or more checks failed, 2 = bad/missing input (message never checked).

Length rule: plain ASCII text gets 160 chars for one segment; anything with accented characters or emoji is billed as Unicode and gets 70. Multi-segment texts cost more and get split on the recipient's phone, so the check fails anything over one segment.

Worked example


$ ./scripts/check.py \
  "Maple St Bakery: Thanks for signing up for texts! Fresh sourdough every Friday. Reply STOP to end. Msg&data rates may apply." \
  --sender "Maple St Bakery"
SMS compliance check -- 124 chars
====================================================
[PASS] Single SMS segment: 124 chars (GSM-7), 1 segment(s) -- limit for one is 160
[PASS] Opt-in language present: found: 'signing up'
[PASS] Opt-out instructions present: found: 'reply stop'
[PASS] Sender identified: found: 'Maple St Bakery'
[PASS] No deceptive-claim keywords: none found

RESULT: COMPLIANT -- all 5 checks passed

$ ./scripts/check.py \
  "You've WON a FREE cruise!!! Act now - guaranteed, no credit check! Call 555-0100" \
  --sender "Acme Co"
[PASS] Single SMS segment: 80 chars (GSM-7), 1 segment(s) -- limit for one is 160
[FAIL] Opt-in language present: no opt-in wording found -- only text people who asked for texts
[FAIL] Opt-out instructions present: no STOP instructions -- every marketing text must say how to opt out
[FAIL] Sender identified: business name 'Acme Co' not in the message -- recipients must know who texted them
[FAIL] No deceptive-claim keywords: flagged: guaranteed, no credit check, you've won, act now -- reword or remove these

RESULT: NOT COMPLIANT -- 4 of 5 check(s) failed

See references/sms-compliance-playbook.md for the house rules this script enforces, in plain language.

Version history

Changelog

1.0.0 — 2026-09-27

  • Initial release: scripts/check.py screens a draft SMS against five checks — single-segment length (160 GSM-7 / 70 Unicode), opt-in wording, STOP opt-out instructions, sender identification, and a deceptive-claim keyword screen. Exit 0 only when all checks pass. Includes references/sms-compliance-playbook.md.

← back to catalog