Source profileQuality 91/100

event4u-app/agent-config/src/skills/laravel-mail/SKILL.md

laravel-mail

Use when building Laravel emails — Mailables, Markdown templates, queued sending, attachments, previews — even when the user says 'send this as an email' without naming Mailables.

Source repository stars
7
Declared platforms
0
Static risk flags
0
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Use when building Laravel emails — Mailables, Markdown templates, queued sending, attachments, previews — even when the user says 'send this as an email' without naming Mailables.

Best for

  • Mailable classes with HTML/Blade or Markdown templates
  • Queued email sending
  • Attachments and inline images

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-mail"
Safe inspection promptEditorial

Inspect the Agent Skill "laravel-mail" from https://github.com/event4u-app/agent-config/blob/798a65522c7a73b90526641d6d1589fe0937cb5f/src/skills/laravel-mail/SKILL.md at commit 798a65522c7a73b90526641d6d1589fe0937cb5f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Procedure: Create a Mailable

    1. Inspect existing mailables — Review app/Mail/ for naming, base class, queueing convention, and the templates in resources/views/emails/ for the project's markdown style. 2. Generate class — php artisan make:mail InvoiceMail --markdown=emails.invoice. 3. Configure — Set subjec…

    Inspect existing mailables — Review app/Mail/ for naming, base class, queueing convention, and the templates in resources/views/emails/ for the project's markdown style.Generate class — php artisan make:mail InvoiceMail --markdown=emails.invoice.Configure — Set subject, from, attachments, queuing (ShouldQueue).
  2. 02

    When to use

    Use this skill when building email functionality: - Mailable classes with HTML/Blade or Markdown templates - Queued email sending - Attachments and inline images - Mail testing and previewing

    Mailable classes with HTML/Blade or Markdown templatesQueued email sendingAttachments and inline images
  3. 03

    Example

    Review the “Example” section in the pinned source before continuing.

    Review and apply the “Example” source section.
  4. 04

    Markdown templates

    blade {{-- resources/views/emails/invoice.blade.php --}}

    blade {{-- resources/views/emails/invoice.blade.php --}}
  5. 05

    Invoice {{ $invoice-getNumber() }}

    Thank you for your order. Here is your invoice summary:

    Always queue emails — implement ShouldQueue to avoid blocking requests.Use Markdown templates for consistent styling across email clients.Use Envelope + Content pattern (Laravel 11+) — not the old build() method.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars7SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/laravel-mail/SKILL.md
Commit
798a65522c7a73b90526641d6d1589fe0937cb5f
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

laravel-mail

When to use

Use this skill when building email functionality:

  • Mailable classes with HTML/Blade or Markdown templates
  • Queued email sending
  • Attachments and inline images
  • Mail testing and previewing

For simple notification emails (one-off messages), see laravel-notifications. Use Mailables when you need full control over the email template.

Procedure: Create a Mailable

  1. Inspect existing mailables — Review app/Mail/ for naming, base class, queueing convention, and the templates in resources/views/emails/ for the project's markdown style.
  2. Generate classphp artisan make:mail InvoiceMail --markdown=emails.invoice.
  3. Configure — Set subject, from, attachments, queuing (ShouldQueue).
  4. Create template — Markdown template in resources/views/emails/.
  5. Verify — Send test email, confirm rendering and delivery.

Example

php artisan make:mail InvoiceMail --markdown=emails.invoice
declare(strict_types=1);

namespace App\Mail;

use App\Models\Invoice;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class InvoiceMail extends Mailable implements ShouldQueue
{
    use Queueable;
    use SerializesModels;

    public function __construct(
        private readonly Invoice $invoice,
    ) {}

    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Invoice #' . $this->invoice->getNumber(),
            replyTo: ['[email protected]'],
        );
    }

    public function content(): Content
    {
        return new Content(
            markdown: 'emails.invoice',
            with: [
                'invoice' => $this->invoice,
                'url' => route('invoices.show', $this->invoice->getId()),
            ],
        );
    }

    /** @return array<int, \Illuminate\Mail\Mailables\Attachment> */
    public function attachments(): array
    {
        return [
            Attachment::fromPath('/path/to/invoice.pdf')
                ->as('invoice-' . $this->invoice->getNumber() . '.pdf')
                ->withMime('application/pdf'),
        ];
    }
}

Markdown templates

{{-- resources/views/emails/invoice.blade.php --}}
<x-mail::message>
# Invoice {{ $invoice->getNumber() }}

Thank you for your order. Here is your invoice summary:

<x-mail::table>
| Item | Amount |
|:-----|-------:|
@foreach ($invoice->getItems() as $item)
| {{ $item->getName() }} | {{ $item->getFormattedAmount() }} |
@endforeach
| **Total** | **{{ $invoice->getFormattedTotal() }}** |
</x-mail::table>

<x-mail::button :url="$url">
View Invoice
</x-mail::button>

Thanks,<br>
{{ config('app.name') }}
</x-mail::message>

Sending mail

// Send immediately
Mail::to($user)->send(new InvoiceMail($invoice));

// Queue for background sending (preferred)
Mail::to($user)->queue(new InvoiceMail($invoice));

// Send later
Mail::to($user)->later(now()->addMinutes(10), new InvoiceMail($invoice));

// Multiple recipients
Mail::to($users)
    ->cc($manager)
    ->bcc('[email protected]')
    ->send(new InvoiceMail($invoice));

Testing

// Assert mail was sent
Mail::fake();

// ... trigger action ...

Mail::assertSent(InvoiceMail::class, function (InvoiceMail $mail) use ($user) {
    return $mail->hasTo($user->getEmail());
});

Mail::assertNotSent(InvoiceMail::class);
Mail::assertNothingSent();
Mail::assertQueued(InvoiceMail::class);

Previewing in browser

// routes/web.php (local only)
Route::get('/mail-preview', function () {
    $invoice = Invoice::factory()->create();
    return new InvoiceMail($invoice);
});

Core rules

  • Always queue emails — implement ShouldQueue to avoid blocking requests.
  • Use Markdown templates for consistent styling across email clients.
  • Use Envelope + Content pattern (Laravel 11+) — not the old build() method.
  • Test with Mail::fake() — verify recipients, content, and queuing.
  • Keep Mailables focused — one Mailable per email type.

Output format

  1. Mailable class with envelope, content, and attachments
  2. Blade/Markdown email template
  3. Queued mail dispatch integration

Auto-trigger keywords

  • Mailable
  • email template
  • send mail
  • Mail::to
  • markdown email
  • mail attachment

Gotcha

  • Always queue emails (ShouldQueue) — synchronous sending blocks the request.
  • The model forgets that mail templates are Blade files — they need to be published/created.
  • Don't test email content with Mail::fake() alone — it doesn't render the template. Use Mail::assertSent() with closure.

Do NOT

  • Do NOT send emails synchronously in request lifecycle — always queue.
  • Do NOT use build() method — use envelope(), content(), attachments().
  • Do NOT hardcode email addresses — use config or environment variables.
  • Do NOT put HTML in Mailable classes — use Blade templates.

Alternatives

Compare before choosing

Computed 10042,968

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10023,781

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1004,922

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 100165

JasonColapietro/suede-creator-skills

suede-ab-testing

Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).