Agent Skills

recoup-platform-email-helper

backendrecoupable4.3K installs

Send an email via the Recoup API the reliable way — a Node helper that serializes the body correctly and fails loudly instead of sending an empty email. Use whenever a task needs to email a report/summary/notification to the account owner or a recipient. ALWAYS use this script to send email; never hand-build `curl … -d "{…}"` with inline `jq`/shell interpolation (that silently produces empty "Message from Recoup" footer-only emails). Pairs with recoup-platform-api-access (which it sends through)

Install

npx skills add https://github.com/recoupable/skills --skill recoup-platform-email-helper
SKILL.md

Sending email from a task

Send email by running the bundled Node script — do not assemble JSON in the shell.

Why this exists

Hand-rolling the send (curl -sS … -d "{… \"html\": $(echo "$HTML" | jq -R -s '.') …}") is fragile: depending on quoting/escaping it produces a malformed body, and the API used to silently deliver an empty footer-only email titled "Message from Recoup" with success:true. The model gets this wrong stochastically. This script removes shell serialization entirely.

How to send

  1. Write the email body to a file (recommended for HTML — avoids all escaping issues):

    cat > /tmp/report.html <<'HTML'
    <h1>Daily Report</h1>
    <p>…your real content…</p>
    HTML
    
  2. Send it:

    node "$SKILL_DIR/scripts/send-email.mjs" \
      --subject "Daily Report — $(date '+%B %d, %Y')" \
      --html-file /tmp/report.html \
      --to owner@example.com
    

$SKILL_DIR is this skill's install directory (~/.agents/skills/recoup-platform-email-helper); use the absolute path to scripts/send-email.mjs.

Flags

Flag Meaning
--subject <s> Subject line (optional — the API derives one from the body if omitted).
--html-file <path> / --html <s> HTML body. Prefer --html-file.
--text-file <path> / --text <s> Plain-text body.
--to <email> Recipient (repeatable). Omit to default to the account's own email ("email me this").
--cc <email> CC (repeatable).
--chat-id <id> Room id for the footer "continue the conversation" link.
--dry-run Serialize + validate and print the payload; do not send. Use to preview.

Rules

  • Exactly one body is required. The script refuses to send (exit code 2) if there is no non-empty --html/--text. Never try to send an empty email.
  • Check the exit code. Non-zero means it did not send — read stderr and fix it; do not report success. The script prints the Resend message id on a real send.
  • The script reads RECOUP_API_KEY / RECOUP_ACCESS_TOKEN and RECOUP_API_BASE from the environment — these are already set in the sandbox. Never print or hard-code them.
  • Node only (the sandbox runtime is node22; python3 is not guaranteed). Zero dependencies.

Related skills

entra-app-registrationmicrosoft606KGuides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.azure-messagingmicrosoft595KTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, servicentra-agent-idmicrosoft328KProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registsupabasesupabase298KUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); deb

Search skills and MCP servers

Fuzzy search across 23,137 skills and servers