wp-email-templates

wp-email-templates is a skill for Claude Code from mralaminahamed/wp-dev-skills. It costs 258 tokens per session (1,291 once invoked), scanned A, original, MIT.

A WordPress-plugin method for storing transactional email content in reusable PHP templates instead of inline strings. Transactional emails are automatic messages such as receipts, password resets, or notifications.

In plain words
What is it for?
Use it when a WordPress plugin sends HTML email with wp_mail() and needs reusable templates, shared styling, safe variables, and tests.
Why use it?
It reduces duplicated email markup and keeps messages consistent through a shared branded layout. It also makes adding or changing an email content file more straightforward.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the wp-dev-skills plugin — 19 skills, 1 command shipped together

Good fit Use it when a WordPress plugin sends HTML email with wp_mail() and needs reusable templates, shared styling, safe variables, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mralaminahamed/wp-dev-skills/wp-email-templates
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mralaminahamed/wp-dev-skills --skill wp-email-templates
Clone the repo
git clone --depth 1 https://github.com/mralaminahamed/wp-dev-skills

Made for: Claude Code.

Or install wp-dev-skills, the plugin that ships this one along with the rest of its 19 skills, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-email-templates

README.md
[![agentmods](https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-email-templates/github.svg)](https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-email-templates)
Your own site
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-email-templates"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-email-templates/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-email-templates

Your own site · 80×15
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-email-templates"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-email-templates.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 258 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00258 $0.01291
Opus 5 $0.00129 $0.00646
Sonnet 5 $0.00052 $0.00258
Haiku 4.5 $0.00026 $0.00129

Measured 11d ago against content hash 0216909ab4d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

wp-email-templates scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/wp-email-templates/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reusable HTML Email Templates (WordPress plugin)

Model note: Mechanical refactoring — extract strings, create template files, wire wp_mail(). haiku handles end-to-end.

Move email bodies out of inline PHP strings into templates/emails/, where every message reuses one branded shell. Adding a new email = adding one content file.

When to use

  • "Move email content to templates", "branded/HTML emails", "reuse an email template".
  • Any plugin building messages inline with wp_mail() heredocs.

Not for: REST API webhooks, push notifications, or Slack integrations. Transactional email in themes — this skill targets plugin-delivered mail only.

Structure

templates/emails/
  base.php          shared shell: header, body slot ($content), footer
  <name>.php        per-email content (greeting, copy, CTA button)
  • base.php — table-based, inline-CSS responsive shell (email clients ignore <style>/external CSS). Receives $subject, $preheader, $content, $site_name, $site_url. Echoes $content raw (// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped — content templates escape their own values).
  • content templates — escape every variable (esc_html, esc_url); wrap copy in __()/esc_html__() with the text domain; use _n() for plurals. Guard each $var = $var ?? default; so the file is robust if rendered standalone.

Render helpers (in your Helpers class)

public static function render_template( string $path, array $vars = [] ): string {
    if ( ! is_readable( $path ) ) return '';
    // phpcs:ignore WordPress.PHP.DontExtract.extract_extract -- controlled template vars
    extract( $vars, EXTR_SKIP );
    ob_start();
    include $path;
    return (string) ob_get_clean();
}

public static function render_email( string $template, array $vars = [] ): string {
    $dir = (string) plugin_config( 'templates' ) . 'emails/';   // your assets/templates path helper
    $vars['content']   = self::render_template( $dir . $template . '.php', $vars );
    $vars['site_name'] = $vars['site_name'] ?? get_bloginfo( 'name' );
    $vars['site_url']  = $vars['site_url'] ?? home_url( '/' );
    return self::render_template( $dir . 'base.php', $vars );   // always wrap in the shell
}

Read the full file on GitHub · 89 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 89 lines · 258 tokens per session scan A 0216909ab4d5

Subscribe to this mod's changes

wp-email-templates is a skill published in the GitHub repository mralaminahamed/wp-dev-skills (27 stars, last pushed 1mo ago), licensed MIT. It adds 258 tokens to every session and 1,291 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

woocommerce-plugin-development

Create custom WooCommerce plugins using action/filter hooks, the Settings API, and REST API extensions to add features without modifying core.

finsilabs/awesome-ecommerce-skills · 28 tokens

wp-performance-review

WordPress performance code review and optimization analysis. Use when reviewing WordPress PHP code for performance issues, auditing themes/plugins for scalability, optimizing WPQuery, analyzing caching strategies, checking code before launch, or detecting anti-patterns, or when user mentions "performance review"…

elvismdev/claude-wordpress-skills · 122 tokens

add-matrix

Add Matrix channel integration via Chat SDK. Works with any Matrix homeserver.

nanocoai/nanoclaw · 19 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

cognito

AWS Cognito user authentication and authorization service. Use when setting up user pools, configuring identity pools, implementing OAuth flows, managing user attributes, or integrating with social identity providers.

itsmostafa/aws-agent-skills · 38 tokens