email-security

Sanitize inbound email content and block injection, phishing, and malicious attachments.

2|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/chunkydotdev/email-skills --skill email-security-chunkydotdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-security
Source: https://github.com/chunkydotdev/email-skills/tree/main/skills/compliance/email-security
Command: npx skills add https://github.com/chunkydotdev/email-skills --skill email-security-chunkydotdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Email is a high-risk attack surface for both traditional systems and AI-powered workflows, with threats like prompt injection, phishing, business email compromise, and header manipulation that can lead to data loss, financial fraud, and compromised agent behavior.

Core Features & Use Cases

  • AI Agent Prompt Injection Defense: Weighted scoring system to detect and block hidden instructions that hijack AI agent behavior when processing inbound email.
  • Content & Header Sanitization: Allowlist-based HTML sanitization, invisible Unicode stripping, and header injection prevention to stop content manipulation and SMTP abuse.
  • Phishing & BEC Detection: Pattern matching for credential theft, executive impersonation, and lookalike domains, correlated with email authentication results for higher accuracy.
  • Link & Attachment Safety: URL validation with redirect chain analysis, and blocking of dangerous file types and macro-enabled documents.
  • Use Case: A customer support team using an AI agent to process inbound user emails can use this skill to sanitize all incoming content, block phishing attempts, and prevent attackers from manipulating the agent into sending fraudulent responses or exfiltrating customer data.

Quick Start

Use the email-security skill to scan all inbound customer support emails for prompt injection, phishing, and malicious attachments before your AI agent processes any content or takes action.

Frequently Asked Questions about email-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I protect my AI agent from prompt injection attacks in inbound emails?

To protect AI agents from prompt injection in inbound emails, you need a defense system that applies weighted scoring to detect hidden instructions attempting to hijack agent behavior. This prevents attackers from manipulating the agent into sending fraudulent responses or exfiltrating data.

What is the best way to prevent business email compromise and phishing in user-submitted contact forms?

The best way to prevent business email compromise and phishing in contact forms is implementing pattern matching for credential theft and executive impersonation, correlated with email authentication results. This approach stops lookalike domains and content manipulation before processing.

How do I sanitize inbound HTML emails to stop header injection and SMTP abuse?

To sanitize inbound HTML emails and stop header injection, you should use an allowlist-based approach that strips invisible Unicode characters and prevents SMTP abuse. This blocks content manipulation attempts while preserving safe email formatting.

Can I detect outbound data exfiltration from compromised email workflows?

Yes, you can detect outbound data exfiltration from compromised email workflows by using canary token-based monitoring. This method identifies when an AI agent or compromised account attempts to send sensitive data to external recipients.

Does URL validation with redirect chain analysis stop phishing links in email pipelines?

URL validation with redirect chain analysis stops phishing links in email pipelines by following redirects to uncover the final destination. This detects malicious URLs hiding behind seemingly safe links before they reach the user.

How do I block dangerous file types and macro-enabled attachments in email processing?

To block dangerous file types and macro-enabled attachments in email processing, you need a threat blocking mechanism that screens inbound files. This prevents malicious documents from executing macros or delivering payloads through your email infrastructure.