packages/skills/skills/broadcast-newsletter/SKILL.md
End-to-end newsletter pipeline: investigate recent features, draft, send via API endpoint, and track delivery/open/click metrics.
npx skillsauth add mediar-ai/skillhubz broadcast-newsletterInstall 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.
End-to-end newsletter pipeline: investigate recent features, draft a newsletter, send it to all users via a backend API, and track delivery/open/click metrics.
Run stages in order, get user approval between stages.
git log --since="N days ago" --oneline --no-merges in the product repoCHANGELOG.json for user-facing descriptionsUse an Explore agent to read relevant source files. Understand how it works, what the user sees, key capabilities. Report back for alignment.
Every newsletter MUST have at least one CLICKABLE CTA. Instructions like "open Settings > Remote Control" don't count: there's nothing to click, and the open-but-don't-click pattern will tank CTR. Use at least one of:
chat.fazm.ai, a fazm:// URL scheme, a specific landing page). The URL must be a complete clickable thing in the email, not "go to fazm.ai then click X".Bold the primary action with **...** so the eye lands on it. Never make the only link a generic "Download here" line, existing users don't need it and it's noise.
The May 12, 2026 send (47% open / 3% CTR) failed exactly here: the only link was "Download" and the feature CTA pointed to in-app menus with nothing to click. 250 people opened, 16 clicked.
Present the draft to the user for approval before proceeding.
All broadcasts go through the production API endpoint. No scripts, no direct DB/Resend calls.
Endpoint: POST https://<your-dashboard-domain>/api/crm/broadcast
Auth: Authorization: Bearer $CRON_SECRET
curl -X POST https://<your-domain>/api/crm/broadcast \
-H "Authorization: Bearer <CRON_SECRET>" \
-H "Content-Type: application/json" \
-d '{"product":"fazm","subject":"Your subject","body":"Body text...","dry_run":true}'
Response includes recipient_count, first 10 recipients, and a tracking block:
"tracking": {
"html_body_length": 2876,
"text_body_length": 1783,
"will_track_opens_and_clicks": true
}
Always verify will_track_opens_and_clicks is true and html_body_length > 50 before showing the dry run to the user. If it's false, opens and clicks will silently record as zero (this is what happened to the May 5, 2026 "ChatGPT 5.5" broadcast: 516 sends, 0 tracked opens). The route will also hard-fail a real send if HTML can't be derived.
curl -X POST https://<your-domain>/api/crm/broadcast \
-H "Authorization: Bearer <CRON_SECRET>" \
-H "Content-Type: application/json" \
-d '{"product":"fazm","subject":"Your subject","body":"Body text...","test_email":"[email protected]"}'
Sends only to that address with [TEST] prefix. Bypasses unsubscribe check.
curl -X POST https://<your-domain>/api/crm/broadcast \
-H "Authorization: Bearer <CRON_SECRET>" \
-H "Content-Type: application/json" \
-d '{"product":"fazm","subject":"Your subject","body":"Body text..."}'
Response: { success, total, sent, skipped, failed, errors }
skipped = unsubscribed or dedup-blocked (normal). failed = actual errors.
The endpoint accepts an optional image_url field. The image is injected into the derived HTML between the lead paragraph and the rest of the body. Plain-text recipients see nothing (no inline image fallback), so don't put critical info in the visual.
curl -X POST https://<your-domain>/api/crm/broadcast \
-H "Authorization: Bearer <CRON_SECRET>" \
-H "Content-Type: application/json" \
-d '{"product":"fazm","subject":"...","body":"...","image_url":"https://fazm.ai/agents.gif"}'
Hosting pattern: drop the file in ~/fazm-website/public/<filename> and push. It serves at https://fazm.ai/<filename> automatically via Vercel (e.g. agents.gif → https://fazm.ai/agents.gif). Verify with curl -I returning 200 before sending.
GIF sizing recipe (known-good for inbox preview without hurting deliverability):
ffmpeg -i input.mp4 -vf "fps=8,scale=260:-1:flags=lanczos" -loop 0 output.gifAfter test send, open the email in Gmail web to verify the image actually loads. Gmail proxies images and occasionally blocks self-hosted GIFs on the first send to a domain.
sendEmail, before any Resend API call)appendUnsubscribeHtml / appendUnsubscribeText in src/lib/resend.ts)List-Unsubscribe and List-Unsubscribe-Post: List-Unsubscribe=One-Click on every send (required by Gmail/Yahoo bulk-sender rules)text only; the API generates the HTML version via textToHtml() so open/click tracking pixels get inserted. If derivation produces empty HTML, the real send is rejected with a 400skipped, not failed)fazm_emails / assrt_emails with status transitions driven by Resend webhooksSELECT
COUNT(*) as total_sent,
COUNT(*) FILTER (WHERE status = 'delivered') as delivered,
COUNT(*) FILTER (WHERE opened_at IS NOT NULL) as opened,
COUNT(*) FILTER (WHERE clicked_at IS NOT NULL) as clicked
FROM fazm_emails
WHERE direction = 'outbound'
AND subject = '<SUBJECT>'
AND created_at > NOW() - INTERVAL '7 days';
Stats arrive via Resend webhooks. Check after 1h, 24h, and 48h.
What "good" looks like for a Fazm-scale broadcast (~500 engaged Mac app users). Anything below the floor means something broke or the content failed.
| Metric | Floor (something is wrong) | OK | Strong | |---|---|---|---| | Delivery rate | < 92% | 92-97% | 97%+ | | Open rate | < 35% | 35-50% | 50%+ | | CTR (of delivered) | < 3% | 3-5% | 5-10%+ | | Reply rate | n/a | any reply is a win | 5+ replies |
The metric that actually matters: clicks per send. Opens are vanity at this scale. 250 opens with 16 clicks (May 12, 2026 send) means you woke up 250 people and converted 16. That's the funnel leak. If clicks < 20 on a 500-person send, the CTA was structural, not vibes; revisit the Stage 3 CTA rules.
Transactional sends have different thresholds. The "Your Fazm download link" emails routinely hit 60%+ open and 50%+ CTR because users need that link. Don't compare a feature-update broadcast to a transactional send.
Downstream conversion is the only real KPI. Tie clicks to the PostHog distinct_id via fazm_workflow_users.posthog_distinct_id and check activation within 48h. A broadcast that drives 30 clicks and 0 activations is worse than one that drives 10 clicks and 5 activations.
tracking.will_track_opens_and_clicks is true and html_body_length > 50image_url: URL returns 200 via curl -I before sendbody_html (sanity check that tracking is wired)body_html is null or empty for the recipient row, opens and clicks will record as zero no matter what. The May 5, 2026 ChatGPT 5.5 broadcast hit this. The dry-run tracking block and the route's hard-fail guard exist to prevent a repeat.status column is the latest state, not a count. A row that moves sent → delivered → opened → clicked overwrites earlier statuses. For accurate rates, count via opened_at IS NOT NULL and clicked_at IS NOT NULL, not via status = 'opened'.tools
Design web-like user interfaces in the terminal and inside tmux with a cell-grid Canvas, CSS-like box model, flexbox/grid layout, and 15 reusable widgets such as Panel, Table, Card, ProgressBar, Meter, Tabs, Tree, Badge, Banner, and a braille line chart. Use when an agent needs a dashboard, panel, table, status page, TUI layout, tmux dashboard, screenshot-driven CLI/TUI replica, ANSI frame, truecolor render, pyte PNG screenshot smoke test, wide-character alignment, or a new terminal widget.
tools
Drive interactive terminal (TUI) programs — CLIs, REPLs, installers, menu apps, agent CLIs, and editors like vim — through a PTY, reading semantic screen snapshots. A pattern library classifies a screen (REPL, menu, pager, fzf search, confirm dialog, form, spinner, wizard) and drives it with a ready recipe. Use when a program expects a live terminal (arrow-key menus, prompts, spinners, password fields, curses UIs), or when a piped command hangs or prints nothing.
tools
Design and render terminal/CMD visual effects and ASCII art from a one-line request via the pluggable `fx` engine (18 hot-swappable, themeable effects plus scripted shows). Effects include donut, matrix rain, plasma, fire, a spinning 3D ball, Game of Life, wireframe cube, 3D text banners, rainbow/lolcat gradient text, starfield, tunnel, fireworks, image-to-ASCII, and more. Use when the request is for a terminal animation, ANSI/CLI art, or a new console effect. Pure Python stdlib; truecolor.
tools
# X Twitter Scraper Use Xquik for X/Twitter tweet search, user lookup, profile tweets, follower export, media download, monitors, webhooks, posting workflows, and MCP-backed API exploration. ## Prerequisites - A Xquik API key in `XQUIK_API_KEY`. - Internet access to `https://xquik.com/api/v1`, `https://xquik.com/mcp`, and `https://docs.xquik.com`. - A clear user request that identifies the target tweets, users, accounts, keywords, media, monitor, webhook, or write action. ## Source Truth -