Agent skill

Email Service

by cohen-liel in cohen-liel/hivemind

Email sending patterns for transactional and marketing emails.

Apache-2.0Auto-check passedBackend & APIs

Install Email Service

skills CLI
$ npx skills add cohen-liel/hivemind --skill email-service -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cohen-liel/hivemind email-service --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cohen-liel/hivemind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/email-service .claude/skills/email-service && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
email-service
GitHub stars
110
Token cost
~1.8k tokens
SKILL.md length
127 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
Apache-2.0

At a glance

Email sending patterns for transactional and marketing emails.

  • Implementing email sending
  • SKILL.md covers Setup (Resend — recommended), Setup (SendGrid), HTML Email Templates (React… and Common Email Types, plus 4 more sections
  • Needs RESEND_API_KEY and SENDGRID_API_KEY
  • SMTP configuration

What it does

Email Service is an agent skill from cohen-liel/hivemind. Email sending patterns for transactional and marketing emails. Use when implementing email sending, templates, SMTP configuration, or email services like SendGrid, Resend, or Mailgun.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Transactional email. It works with SendGrid. The repository describes itself as: One prompt. A full AI engineering team. Go lie on the couch. 🧠. The licence is Apache-2.0.

When your agent uses it

  • Implementing email sending
  • SMTP configuration
  • Email services like SendGrid

Example prompts

  • “/email-service”

Requirements

  • Python 3
  • A credential in RESEND_API_KEY
  • A credential in SENDGRID_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 918dd9b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, typescript and html).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • RESEND_API_KEY
    • SENDGRID_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Email Service loads about 1.8k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 127 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cohen-liel/hivemind at commit 918dd9b, republished under its Apache-2.0 licence (© cohen-liel). 127 words, ~1,758 tokens.

Download SKILL.mdSave it as .claude/skills/email-service/SKILL.md (or your agent's skills folder).
name
email-service
description
Email sending patterns for transactional and marketing emails. Use when implementing email sending, templates, SMTP configuration, or email services like SendGrid, Resend, or Mailgun.

Email Service Patterns

python
# email.py
import resend

resend.api_key = settings.RESEND_API_KEY

async def send_email(
    to: str | list[str],
    subject: str,
    html: str,
    from_email: str = "noreply@yourdomain.com",
) -> str:
    """Send transactional email, return message ID."""
    params = resend.Emails.SendParams(
        from_=from_email,
        to=[to] if isinstance(to, str) else to,
        subject=subject,
        html=html,
    )
    email = resend.Emails.send(params)
    return email["id"]
typescript
// lib/email.ts
import { Resend } from 'resend'
const resend = new Resend(process.env.RESEND_API_KEY)

export async function sendEmail(params: {
  to: string | string[]
  subject: string
  html: string
  from?: string
}) {
  const { data, error } = await resend.emails.send({
    from: params.from ?? 'noreply@yourdomain.com',
    to: Array.isArray(params.to) ? params.to : [params.to],
    subject: params.subject,
    html: params.html,
  })
  if (error) throw new Error(error.message)
  return data
}

Setup (SendGrid)

python
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail

def send_email_sendgrid(to: str, subject: str, html: str):
    message = Mail(
        from_email="noreply@yourdomain.com",
        to_emails=to,
        subject=subject,
        html_content=html,
    )
    client = SendGridAPIClient(settings.SENDGRID_API_KEY)
    response = client.send(message)
    return response.status_code

HTML Email Templates (React Email)

tsx
// emails/WelcomeEmail.tsx
import { Html, Head, Body, Container, Text, Button, Hr } from '@react-email/components'

interface WelcomeEmailProps {
  username: string
  verifyUrl: string
}

export function WelcomeEmail({ username, verifyUrl }: WelcomeEmailProps) {
  return (
    <Html>
      <Head />
      <Body style={{ fontFamily: 'Arial, sans-serif', backgroundColor: '#f4f4f4' }}>
        <Container style={{ maxWidth: '600px', margin: '0 auto', padding: '20px' }}>
          <Text style={{ fontSize: '24px', fontWeight: 'bold', color: '#333' }}>
            Welcome, {username}! 👋
          </Text>
          <Text style={{ color: '#666', lineHeight: '1.6' }}>
            Thanks for signing up. Please verify your email address to get started.
          </Text>
          <Button
            href={verifyUrl}
            style={{
              backgroundColor: '#3b82f6',
              color: '#fff',
              padding: '12px 24px',
              borderRadius: '6px',
              textDecoration: 'none',
              display: 'inline-block',
            }}
          >
            Verify Email
          </Button>
          <Hr />
          <Text style={{ color: '#999', fontSize: '12px' }}>
            If you didn't create an account, you can safely ignore this email.
          </Text>
        </Container>
      </Body>
    </Html>
  )
}

// Render to HTML for sending
import { render } from '@react-email/render'
const html = render(<WelcomeEmail username="Alice" verifyUrl="https://..." />)

Common Email Types

python
# email_service.py
from .templates import render_template

async def send_welcome_email(user_email: str, username: str, verify_token: str):
    verify_url = f"{BASE_URL}/verify?token={verify_token}"
    html = render_template("welcome.html", username=username, verify_url=verify_url)
    await send_email(user_email, f"Welcome to MyApp, {username}!", html)

async def send_password_reset(email: str, reset_token: str):
    reset_url = f"{BASE_URL}/reset-password?token={reset_token}"
    html = render_template("password_reset.html", reset_url=reset_url)
    await send_email(email, "Reset your password", html)

async def send_invoice(email: str, invoice_data: dict):
    html = render_template("invoice.html", **invoice_data)
    await send_email(email, f"Invoice #{invoice_data['invoice_number']}", html)

async def send_notification(email: str, title: str, message: str):
    html = f"""
    <div style="font-family: Arial; padding: 20px;">
      <h2>{title}</h2>
      <p>{message}</p>
    </div>
    """
    await send_email(email, title, html)

Jinja2 Templates (Python)

python
from jinja2 import Environment, FileSystemLoader

env = Environment(loader=FileSystemLoader("templates/emails"))

def render_template(template_name: str, **context) -> str:
    template = env.get_template(template_name)
    return template.render(**context)
html
<!-- templates/emails/welcome.html -->
<!DOCTYPE html>
<html>
<body style="font-family: Arial; background: #f4f4f4; padding: 20px;">
  <div style="max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 8px;">
    <h1 style="color: #1a1a1a;">Welcome, {{ username }}! 👋</h1>
    <p style="color: #666;">Click below to verify your email:</p>
    <a href="{{ verify_url }}"
       style="background: #3b82f6; color: white; padding: 12px 24px; border-radius: 6px; text-decoration: none;">
      Verify Email
    </a>
    <p style="color: #999; font-size: 12px; margin-top: 20px;">
      This link expires in 24 hours.
    </p>
  </div>
</body>
</html>

Email Queue (Background with Celery)

python
from celery import Celery

celery = Celery("tasks", broker=settings.REDIS_URL)

@celery.task(bind=True, max_retries=3, default_retry_delay=60)
def send_email_task(self, to: str, subject: str, html: str):
    try:
        send_email_sync(to, subject, html)
    except Exception as exc:
        raise self.retry(exc=exc)

# Usage — don't block the request
send_email_task.delay(user.email, "Welcome!", welcome_html)

SMTP (nodemailer / standard SMTP)

typescript
import nodemailer from 'nodemailer'

const transporter = nodemailer.createTransport({
  host: process.env.SMTP_HOST,
  port: 587,
  secure: false,
  auth: {
    user: process.env.SMTP_USER,
    pass: process.env.SMTP_PASS,
  },
})

export async function sendEmail(to: string, subject: string, html: string) {
  await transporter.sendMail({
    from: '"MyApp" <noreply@myapp.com>',
    to,
    subject,
    html,
  })
}

Rules

  • Use a transactional email service (Resend, SendGrid, Mailgun) — NEVER raw SMTP in production
  • Always queue emails (Celery/background task) — never send synchronously in request handler
  • Verify sender domain with SPF, DKIM, DMARC records (deliverability)
  • Never build HTML emails with f-strings with user input (XSS in email clients)
  • Include unsubscribe link in marketing emails (CAN-SPAM / GDPR)
  • Test email rendering with Litmus or Email on Acid before launch
  • Rate limit: max 1 email per minute per recipient to avoid spam classification
  • Use separate API keys for transactional vs marketing emails
  • Log email send attempts (ID, recipient, template, status) in your DB

© cohen-liel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/email-service of cohen-liel/hivemind.

Open the folder on GitHubat commit 918dd9b

Compare with similar skills

Email Service next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Email Service compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Email Service this skillcohen-liel/hivemind110—~1.8kAutomated safety check: PassApache-2.0
Deliverability Checkerguia-matthieu/clawfu-skills150—~1.1kAutomated safety check: PassMIT
Email Connectorericrisco/rsc-harness180—~3.1kAutomated safety check: PassMIT
Emailmagnus919/agent-skills115—~2.4kAutomated safety check: PassMIT
Converting Email Templatesaiskillstore/marketplace433—~1.8kAutomated safety check: PassNone
Lifecycle Messagingavelikiy/great_cto102—~1.3kAutomated safety check: PassMIT

Similar skills

  • Deliverability Checker

    guia-matthieu/clawfu-skills

    Check email deliverability and DNS configuration. An agent skill from guia-matthieu/clawfu-skills.

    150 GitHub stars~1.1k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed
  • Email Connector

    ericrisco/rsc-harness

    A skill your agent uses when wiring server code to send transactional or bulk email via Resend, SendGrid, or Postmark: a provider-agnostic sendEmail() seam, idempotent retries, 100-cap batches with…

    180 GitHub stars~3.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Email

    magnus919/agent-skills

    Send and diagnose transactional email through Twilio SendGrid from a terminal or agent: send messages, check deliverability (bounces and spam reports), and verify Signed Event Webhook signatures…

    115 GitHub stars~2.4k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Converting Email Templates

    aiskillstore/marketplace

    A skill your agent uses when converting or migrating email templates from another provider (SendGrid, Mailgun, Mandrill, Postmark, Brevo, Amazon SES) to Mailtrap-compatible Handlebars syntax.

    433 GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Lifecycle Messaging

    avelikiy/great_cto

    Email/SMS lifecycle and deliverability framework for SMB Product-Builder products that send transactional or lifecycle messages (booking reminders, CRM sequences, receipts, win-back).

    102 GitHub stars~1.3k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Mail Time

    veliovgroup/mail-time

    A skill your agent uses when building, wiring, reviewing, or debugging MailTime and ostrio:mailer email queues for horizontally scaled Node.js, Bun, or Meteor apps.

    143 GitHub stars~1k tokensUpdated 3 days ago
    DatabasesAuto-check passed

More from cohen-liel/hivemind

All 33 skills in this repo
  • API Design

    cohen-liel/hivemind

    REST API design principles and best practices. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~857 tokensUpdated 5 mo ago
    Auto-check passed
  • Async Python

    cohen-liel/hivemind

    Python asyncio patterns for high-performance async code. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~992 tokensUpdated 5 mo ago
    Auto-check passed
  • Celery Tasks

    cohen-liel/hivemind

    Celery background task patterns for Python apps. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.1k tokensUpdated 5 mo ago
    Auto-check passed
  • Docker Deployment

    cohen-liel/hivemind

    Docker, docker-compose, and deployment configuration best practices.

    110 GitHub stars~674 tokensUpdated 5 mo ago
    Auto-check passed
  • E2E Testing

    cohen-liel/hivemind

    End-to-end testing patterns with Playwright. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Article Writing

    cohen-liel/hivemind

    Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance.

    110 GitHub starsUsed in 8 repos~786 tokens
    Auto-check passed

Works with

Categories

Questions about Email Service

What does Email Service do?

Email sending patterns for transactional and marketing emails. Email Service is an agent skill from cohen-liel/hivemind. Email sending patterns for transactional and marketing emails.

When should I use Email Service?

Email Service fits situations like: implementing email sending; SMTP configuration; email services like SendGrid.

How do I install Email Service in Claude Code?

Run `npx skills add cohen-liel/hivemind --skill email-service -a claude-code`. Or copy the skill folder (.claude/skills/email-service in cohen-liel/hivemind) into .claude/skills/email-service in your project. Claude Code loads it when a task matches its description.

How do I install Email Service in Codex?

Run `npx skills add cohen-liel/hivemind --skill email-service -a codex`. Or copy the skill folder (.claude/skills/email-service in cohen-liel/hivemind) into .agents/skills/email-service in your project. Codex loads it when a task matches its description.

Can I use Email Service in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cohen-liel/hivemind --skill email-service -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/email-service, .gemini/skills/email-service, .github/skills/email-service and .opencode/skills/email-service in your project.

What does Email Service need to run?

Going by SKILL.md and its folder, Email Service needs credentials named RESEND_API_KEY and SENDGRID_API_KEY. Our summary lists: Python 3; A credential in RESEND_API_KEY; A credential in SENDGRID_API_KEY.

Does Email Service access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Email Service safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Email Service use?

Email Service is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Email Service use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Email Service?

Skills that share tags, products or a category with Email Service: Deliverability Checker (guia-matthieu/clawfu-skills, 150 stars), Email Connector (ericrisco/rsc-harness, 180 stars), Email (magnus919/agent-skills, 115 stars) and Converting Email Templates (aiskillstore/marketplace, 433 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Email Service?

cohen-liel (a GitHub user) maintains it in cohen-liel/hivemind, which has 110 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on April 18, 2026.

Source: cohen-liel/hivemind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.