AGENT SKILL

sendblue-cli

Send iMessage and SMS from the shell via the @sendblue/cli npm package — outbound sends, contact management, and account setup with no API client or webhook server required.

License 许可
MIT
最近更新
2026-10-22
Stars
★ 1
Forks
0

01 前言 Front Matter

name
sendblue-cli
risk
critical
tags
[ "sendblue", "imessage", "sms", "cli", "messaging", "notifications" ]
tools
[ "claude", "cursor", "gemini" ]
author
AnthonyFirth
plugin
{ "targets": { "codex": "blocked", "claude": "blocked" } }
source
community
license
MIT
category
api-integration
date_added
2026-05-22
description
Send iMessage and SMS from the shell via the @sendblue/cli npm package — outbound sends, contact management, and account setup with no API client or webhook server required.
source_repo
sendblue-api/sendblue-cli
source_type
official
license_source
https://github.com/sendblue-api/sendblue-cli/blob/main/LICENSE

03 SKILL.md 正文

Sendblue CLI

Overview

@sendblue/cli is a Node CLI that creates a Sendblue account, provisions an iMessage-enabled number, and sends messages. It is the fastest way to text from a shell, script, or Claude Code hook — no API client, no webhook server, no credentials in env vars. Credentials live at ~/.sendblue/credentials.json (mode 600) and Node.js 18+ is required.

When to Use This Skill

  • Use when the user wants to text a phone number from a script, shell, hook, or agent turn (e.g. "text me when X finishes", "ping my phone", "notify on completion").
  • Use when the user mentions sendblue as a CLI/binary or asks to set up the @sendblue/cli package.
  • Prefer this skill over [[sendblue-api]] when the work happens in a shell context, one-shot script, cron job, or agent hook.
  • Reach for [[sendblue-api]] instead when writing application code that integrates Sendblue, receiving inbound webhooks, or needing features the CLI does not expose (send styles, reactions, group messages, status callbacks, media uploads).

How It Works

Step 1: Install

npm install -g @sendblue/cli       # global, exposes `sendblue`
# or one-shot:
npx @sendblue/cli <command>

Step 2: Set up an account

sendblue setup runs interactively by default. For CI/scripts, run it in two phases — the first call sends an 8-digit verification code by email, the second consumes it.

sendblue setup --email you@example.com                                       # sends code
sendblue setup --email you@example.com --code 12345678 \
               --company my-co --contact +15551234567                        # completes setup
Flag Notes
--email Email address
--code 8-digit verification code (from the email)
--company Lowercase, hyphens/underscores, 3–64 chars
--contact First contact, E.164

Step 3: Send messages

sendblue send +15551234567 'Hello from Sendblue!'
sendblue messages --inbound --limit 20

Phone numbers must be E.164 (+ + country code + digits, no spaces or dashes).

Step 4: Manage contacts and plan

On the free plan, a contact must text your Sendblue number once before outbound sends to that contact will work. After sendblue setup ... --contact +15551234567, have that contact send any text to the printed Sendblue number, then run sendblue contacts to confirm verification.

Command Reference

Command Purpose
sendblue setup Create account, verify email, set company name, add first contact
sendblue login Log in to an existing account
sendblue send <number> <message> Send an iMessage
sendblue messages [--inbound|--outbound] [-n <number>] [-l <count>] List recent messages
sendblue add-contact <number> Register a contact
sendblue contacts List contacts and their verification status
sendblue status Account/plan info
sendblue whoami Show current credentials and verify validity

Examples

Example 1: Notify when a long task finishes

long_running_thing && sendblue send +15551234567 "✅ done: $(date)"

Example 2: Read recent inbound for a specific contact

sendblue messages -n +15551234567 --inbound --limit 50

Example 3: Verify creds are good before a batch send

sendblue whoami || sendblue login

Example 4: Wire to a Claude Code Stop hook

To text yourself at the end of every agent turn, register a Stop hook in settings.json that shells out to sendblue send. Defer the actual hook wiring to [[update-config]] and the trigger logic to [[sendblue-notify]] — this skill only owns the CLI invocation.

Best Practices

  • ✅ Use E.164 numbers everywhere. +15551234567, never 5551234567 or (555) 123-4567.
  • ✅ Run sendblue whoami before unattended batches to fail fast on stale or missing creds.
  • ✅ Re-run setup as the same OS user that owns ~/.sendblue/credentials.json.
  • ❌ Don't sudo — it writes creds to root's home and the next non-sudo run won't see them.
  • ❌ Don't embed creds in env vars when the CLI already reads them from the per-user credentials file.

Limitations

  • Outbound-first: there is no built-in webhook server for inbound. Use [[sendblue-api]] webhooks for full inbound handling.
  • The CLI does not expose send styles/effects, reactions, group messages, status callbacks, media uploads, or the contacts API beyond basic CRUD. Reach for the HTTP API for those.
  • Free-plan accounts require recipient verification before outbound sends succeed.

Security & Safety Notes

  • Credentials are written to ~/.sendblue/credentials.json with mode 600. Treat that file like an API key — do not commit it, do not copy it across machines without the same posture.
  • Treat every outbound send, contact setup, login, or account setup action as state-changing. Preview the recipient, message body, and account/email target, then wait for explicit user confirmation before running it.
  • Run the CLI as the OS user that owns the credentials file. sudo writes a separate copy under root's home and silently desyncs.
  • Outbound messages to phone numbers are not free of consequence — wire sendblue send into hooks or loops only after gating on duration or success conditions to avoid spamming the recipient.
  • Verification codes arrive by email; treat the address you registered with as a recovery factor for the account.

Common Pitfalls

  • E.164 only. 5551234567 or (555) 123-4567 will fail — always +15551234567.
  • Free-plan unverified contacts. Outbound to a contact that hasn't texted in first returns an error — have them text your Sendblue number once, then confirm with sendblue contacts.
  • Two-step setup in non-interactive mode. --email alone only sends the code; you must run a second invocation with --code and the rest of the flags to finish.
  • Credentials are per-user. ~/.sendblue/credentials.json is owner-only (600). Don't sudo and pollute root's home — re-running as the same user that ran setup is what works.

Related Skills

  • @sendblue-api — HTTP/JSON alternative for application code, webhooks, and features the CLI does not expose.
  • @sendblue-notify — Patterns and copy rules for "text me when X is done" workflows that sit on top of this CLI.
  • @update-config — Wires sendblue send into Claude Code hooks (Stop, Notification) without owning the message logic.

Links

04 同仓库更多 Skills

Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

testing-best-practices

Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.

★ 1
Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

tailwindcss-development

Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS.

★ 1
Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.

★ 1
Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

infer-conventions

Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai/rules`, resolve mixed or conflicting patterns (e.g. "are we using Form Requests or inline validation?"), or onboard agents and teammates to "how we do things here". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai/rules` files by hand.

★ 1
Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

inertia-react-development

Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.

★ 1
Hazek-dc
Hazek-dc/PresensiGuru_FaceNet_EMAR

deploying-to-cloud

Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.

★ 1