/brevo:email-template-checkfrom brevo
Checks Brevo email HTML against Brevo's template rules and fixes failures. Goes through a fixed checklist: template syntax, contact attributes, params, absolute https images, size, unsubscribe link. Fixes by editing affected lines, at most 3 rounds.
Ships in brevo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Checks one email's HTML and template language against Brevo's rules, fixes what fails, and reports the result in one line. Brevo has no automatic template check through the connection, so this is a checklist you apply yourself, and the report says so. It never saves or sends anything.
| Step | Tool |
|---|---|
| The account's contact attribute names | attributes_get_attributes |
| An existing contact email for a preview (the account's own email) | accounts_get_account |
| Read a saved template to check it, one at a time | templates_get_smtp_template |
| Render a saved template on Brevo's servers (step 4) | templates_post_preview_smtp_email_templates |
If a tool a step needs isn't in your tool list, stop that step and tell the user their Brevo connection doesn't offer it (connection rules below).
permission_denied) means this connection doesn't
allow that action; reconnecting won't change it. Say so, skip that step, and carry on with
the fallback the skill gives (for a template render: the test send and its outcome check).
If the skill gives no fallback for that step, stop the step and tell the user.subaccount_id on every call: every Brevo tool takes it per call,
and a call without it acts on the main account.get_brevo_guide. Don't call get_brevo_guide for it again in this
conversation.getbrevo/brevo-skills, npx skills add getbrevo/brevo-skills, or, with a shell, the Brevo CLI
(npm i -g @getbrevo/cli, then brevo skill install). brevo skill check lists copies that are
behind.list_brevo_guides with installed set to the version in the
metadata of each Brevo skill you have, if the tool accepts installed; otherwise call it
with no arguments and compare the versions yourself. For a stale one, follow its update
hint.get_brevo_guide with its name: it returns the current text.Keep what you read from Brevo in this conversation and reuse it, instead of calling the same
tool again. The cache is your own notes in the conversation, never a file. Key every entry by
account and sub-account ID (none for the main account), and note when you fetched it
(fetchedAt). Never show or reuse an entry from another account or sub-account.
| What | Keep it | Fetch again when |
|---|---|---|
| Account (company, address, own email), senders, contact attributes | About 10 minutes | Time is up. An attribute in the email isn't in the cached list and the cache is more than about a minute old: fetch the attributes once more before reporting it (the user may have just added it). The user switches account or sub-account, or says they changed it in Brevo |
| Sender domains (whether each is authenticated) | Same as senders | Same as senders |
| Brand kit | The whole conversation (one read) | The user says they changed it in Brevo, or switches account. After this conversation's own save, update the cache with the approved values; don't read it back |
| Templates this conversation created or read | The whole conversation | The user says they edited it in Brevo's editor (fetch it before a preview or test). After this conversation's own update, apply the change to the cache |
| Lists and segments | Not cached | Fetch when needed |
Call budget for a transactional template (write, check, save, preview, test): about 11 calls with the cache (account, senders, attributes, brand kit, save, 3 sample renders, sender domains, test send, outcome) against about 16 without it (the account read 3 times, attributes and senders twice, and the template read back). Each fix round that re-checks attributes would add one more call without it.
templates_get_smtp_template (or the cached copy). Never list all templates to find one: a template list
returns the full HTML of every template. Ask the user for the ID or the name; if you must
list, ask for one result at a time.attributes_get_attributes once. If the
fetch fails, skip item 6 with a warning and go on. Without a connection, use
FIRSTNAME, LASTNAME, EMAIL plus the names the user gave, and say the attribute check
used assumed names.email-template-write step 1, or the payload they gave. Without one, params.* paths
can't be checked; say so.Check every item against the HTML. Note each failure with what the user sees ("the greeting in the first paragraph"), not by line number alone.
Items 1, 2, 4, 5 and 15 are about template tags and visible markup: skip the CSS inside
<style> for them (item 3 still applies there).
The skeleton's own rules (-webkit-text-size-adjust:100%}, width:100%!important}} in a
media query, img{border:0}) are not stray }} or borders without a colour.
Template syntax
{{ has its }} and every {% its %}; no single-brace closings, no stray }}.if has its endif, each for its endfor; elif and else sit inside an if,
empty inside a for. Never {% else %} inside a {% for %}: use {% empty %}.{# anywhere (it opens a template comment), including in CSS and text. No template
tags inside HTML comments.{{ contact.<b>NAME</b> }}),
no HTML entities ("), no URL-encoded braces (%7B%7B).| default:"there". No default("x"), raw or
number_format. No arithmetic: every amount is a field in the data.Variables
contact.X is an attribute returned by attributes_get_attributes, written exactly
(upper case). List every contact.X in the HTML and the subject, and compare each one
against that list, letter by letter. A name missing from a cache older than about a
minute: fetch the attributes once more before reporting it. A misspelt name (FIRST_NAME
for FIRSTNAME) saves and sends without any error and silently shows its default, so this
check is the only one that catches it. Suggest the closest name; never keep it silently.contact.X shown in text has | default:"…" or sits inside {% if contact.X %}.params.* only in automation and transactional emails; in a campaign it is always
empty. Every params path exists in the sample payload, spelled exactly as there
(case-sensitive). Read the email once with the
sample, and once with empty lists and missing optional keys: an optional key is used only
inside an {% if %} that tests it. A filter that needs a value (time_parse,
time_parse_rfc3339, date, date_i18n or floatformat on a param) always sits inside
{% if params.x %}: on an empty value it can fail the whole email, and test sends have no
params.
Suggestion only: a params.X whose name matches a contact attribute (case-insensitive)
and has no contact.X fallback. Add one line to the report offering the fallback; never
add it yourself.{{ company.* }} or {{ label.* }}: they render blank in sent email. The company name
and address are plain text.*|FNAME|*, %%FirstName%%, {{ first_name }}). List any
you find with the Brevo equivalent and ask before replacing.Footer and action
{{ unsubscribe }} link present: required in automation emails (no footer is added) and
in campaigns (otherwise Brevo appends its default footer: a warning, not an error).
Purely transactional mail (receipt, password reset) doesn't need one.javascript: links, no spaces inside an href.Email HTML
https:// URLs (no relative paths, no http://), an alt on each, a
width attribute; no SVG or WEBP; each image URL used once (the logo excepted). An empty
src="" is a placeholder: list it for the user.<script>, <iframe>, <form>, <video>, <audio>, <object>, <embed>, <svg>;
no display:flex, grid or position.Drag-and-drop output only (the HTML will be converted into an editable design)
{% if %} and {% for %} with its branches sits inside ONE <p> or heading.
Between section rows, between the rows of a nested table, or across cells, it is lost on
conversion.<ul>, <ol>, <li> (their content is dropped).previewText (the <div> is dropped on conversion).Subject line (the template's subject, or the <title> of the HTML)
contact.X only with attributes that exist, with a default.params.* only in a transactional or automation subject, never in a campaign's (it is
always empty there). Word the subject so it still reads well with the value blank
("Your order is confirmed", not "Order confirmed"): a test send has no params, so the
test's subject shows it empty.A saved template is rendered on Brevo's servers with
templates_post_preview_smtp_email_templates, which catches template errors the checklist
can miss:
templateId and email of an existing contact: the account's own email (cached
from accounts_get_account) works. For automation and transactional templates, also pass the
sample params. With params alone (no email), the preview fails with 400 "Contact not
found" whenever the template uses contact.* tags.href in a preview. That is expected, not a
failure: check that {{ unsubscribe }} is in the HTML instead.{% %} tag, a filter or any params.*);
without it nothing can fail to render, so skip this step and say so in the report. With
it: once with the full sample; with empty lists and missing optional keys when it has a
{% for %} loop; and with params: {} when it uses params.*. The last one is what a test send renders: test sends carry no params,
so every params line and params in the subject come out blank, and a filter that needs
a value (time_parse on an empty date) fails the whole email. Wrap such lines in
{% if params.x %}...{% endif %} until the params: {} render passes.HTML that isn't saved yet has no server render: skip this step and say so in the report.
Be honest about what ran. For example:
contact.TIER isn't an attribute in your account. Use contact.VIP, or create the
attribute in Brevo?"Add "Rendered on Brevo's servers: no errors" only when step 4 ran. Then offer a test send
(email-test-preview) as the real check in an inbox.
templates_post_preview_smtp_email_templates renders a saved template with a contact and
sample params (step 4). There is no automatic template-validation tool on the Brevo MCP
server: this skill is a checklist, and its report always says no automatic validation was
run.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/automation-createCreates a Brevo automation workflow as a draft, in one call, from its triggers and steps. Use when the user asks for an automation or a workflow in Brevo, for example "send a welcome email when someone joins my newsletter list", "email customers 2 days after their order", "if they opened it, add them to a list" or "remind contacts on their birthday". Confirms the account, reads which triggers and steps the account can use and the fields of each, looks up every ID with Brevo tools, generates filters from the user's words, validates the whole workflow, shows the plan, and creates the draft only after a yes. Also edits an existing automation ("change the delay to 3 days", "swap the email", "add a step") by sending its whole new definition, after showing what changes and who is affected. Uses only the trigger and step types the account's catalog lists. Never activates without the user's explicit go-ahead./brevo-cliUse when working in a project that uses the Brevo Developer CLI (the `brevo` binary from `@getbrevo/cli`) — managing OAuth apps, UI apps, and Brevo Functions, scaffolding integrations, running the local OAuth test server, or invoking any `brevo …` command. Activates on: brevo, brevo cli, brevo app, brevo function, app-config.json, OAuth Brevo, BREVO_API_KEY, getbrevo.npx claudepluginhub getbrevo/brevo-skills --plugin brevoOther plugins' skills for the same job