agent-mail-guard
Sanitize email and calendar content before it reaches your AI agent's context window. Blocks prompt injection, markdown image exfiltration, invisible unicode, homoglyph attacks, base64 payloads, and fake conversation turns. Zero dependencies (Python 3.11+ stdlib only). Use when your agent reads email, processes calendar events, or handles any untrusted text input that could contain injection attempts. Outputs clean JSON with sender trust tiers, suspicion flags, and truncated bodies safe for LLM consumption.
Why use this skill?
Neutralize prompt injection and malicious payloads in email and calendar data. Protect your AI agent with AgentMailGuard's zero-dependency security layer.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/discodaddy/agent-mail-guardWhat This Skill Does
AgentMailGuard is a robust sanitization middleware designed specifically to protect AI agents from malicious input vectors hidden within emails and calendar events. It acts as a security buffer between your external communication sources and the agent's context window. The skill systematically neutralizes complex threats, including prompt injection attempts, markdown-based image exfiltration, homoglyph character spoofing, and hidden unicode characters designed to confuse or exploit Large Language Models (LLMs). By operating as a zero-dependency Python tool, it ensures high performance and reliability, returning structured, safe-to-read JSON outputs that your agent can process without risk.
Installation
To integrate this security layer, run the following command in your terminal:
clawhub install openclaw/skills/skills/discodaddy/agent-mail-guard
After installation, edit the contacts.json file in the skill directory to whitelist your trusted senders, ensuring your agent correctly categorizes incoming messages based on established trust tiers.
Use Cases
AgentMailGuard is essential for any autonomous agent that monitors email inboxes or manages scheduling. It is particularly valuable for:
- Automated Customer Support: Preventing injection attacks when clients reply to agent-managed threads.
- Virtual Assistants: Safely reading meeting requests and calendar invites that may contain malicious links.
- Enterprise Security: Reducing the attack surface of internal communication tools used by AI workflows.
Example Prompts
- "Check my inbox for urgent messages from my manager, summarize the main points, and let me know if any are flagged as suspicious."
- "Process my latest calendar invitations and add any confirmed meetings to my schedule, but skip any emails from unknown senders that trigger the security guard."
- "Summarize the last three emails I received from known clients, ensuring that no malicious markdown or exfiltration attempts are included in the output."
Tips & Limitations
- Strict Adherence: Always respect the
suspicious: trueflag; if this flag is present, treat the content as compromised and do not execute any logic based on its body. - Trust Tiers: Properly configuring your
contacts.jsonis critical. Using wildcards (*@yourdomain.com) helps manage scale, but be cautious with broad permissions. - Summary-First Approach: Always instruct your agent to paraphrase rather than quote content, as this mitigates residual risk. Note that this skill is not a replacement for traditional anti-spam filters; it is an additional layer of security focused on model-centric injection threats.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-discodaddy-agent-mail-guard": {
"enabled": true,
"auto_update": true
}
}
}