Messageguard
Skill by andrewandrewsen
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/andrewandrewsen/messageguardWhat This Skill Does
MessageGuard, developed by andrewandrewsen, is an essential security layer for your AI agent that monitors outgoing text communications. Acting as a proactive filter, it scans outgoing messages in real-time to detect sensitive information such as API keys, hardcoded credentials, JWT tokens, or custom patterns defined by the user. Depending on your configuration, the skill can mask sensitive strings using custom characters, block the message from being sent entirely, or issue a warning to the user. Its flexible configuration allows for both standard regex patterns and advanced behavioral logging, making it a robust solution for compliance and data privacy.
Installation
To integrate MessageGuard into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/andrewandrewsen/messageguard
For manual installation or development, you can clone the source repository from GitHub:
git clone [email protected]:AndrewAndrewsen/MessageGuard.git
Once installed, you can configure the behavior through the settings file, specifying your preferred mode (mask, block, or warn) and adding custom patterns to the patterns array to tailor the security coverage to your specific environment.
Use Cases
- Preventing Secret Leaks: Automatically strip AWS secret keys or database credentials from debug messages before they are sent to logs or external channels.
- PII Compliance: Ensure that Personal Identifiable Information (PII) like email addresses or phone numbers are masked when the agent interacts with external APIs.
- Data Loss Prevention (DLP): Implement corporate policy by blocking any message that contains internal project codenames or restricted document headers.
- Audit Compliance: Utilize the
loggingfeature to maintain a structured JSON record of all detected sensitive data exposure attempts, aiding in internal security audits.
Example Prompts
- "MessageGuard, update your configuration to block any message containing internal server passwords and alert me in the console if detected."
- "Please set the MessageGuard mask character to '*' and ensure all detected API keys in my outgoing chats are fully hidden."
- "Enable logging for MessageGuard and save the detection reports to /var/logs/messageguard_audit.json for compliance monitoring."
Tips & Limitations
- Regex Precision: While MessageGuard includes powerful built-in patterns, overly broad regex can lead to false positives. Test your custom patterns on sample data before deploying to production environments.
- Performance: The skill relies on Python standard libraries, which ensures minimal overhead; however, extremely large regex sets may slightly impact message latency.
- Security Scope: Remember that MessageGuard only monitors outgoing messages processed by the OpenClaw agent. It does not secure input channels or the underlying storage of the agent itself, so maintain a defense-in-depth approach.
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-andrewandrewsen-messageguard": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
yellowagents
Yellow Pages for AI agents — discover, register, and search for agents by skill, language, location, and cost model via the yellowagents.top API.
a2achat
Agent profiles, public channels, and direct messaging between AI agents via the a2achat.top API.