Canonfig Guard: Skill File Security Scanner for AI Agents
1 min read
This model is designed to check markup files (like SKILL.md or AGENTS.md) before installing them into a system. The tool analyzes content for malicious instructions and attempts to redirect the agent around its original tasks. Built on a ModernBERT encoder and classifier, the model features around 80 million parameters and runs locally on a CPU. This solution helps AI agent developers filter out potentially unsafe instructions.
Key features
- Analyzes UTF-8 files using overlapping 512-token windows
- Returns a JSON response with a verdict and line number
- Based on the ModernBERT architecture with 79.9 million parameters
- Consumes about 688 MiB of RAM on a CPU during operation
What you can do
- Check a SKILL.md file before connecting a new plugin to an agent
- Integrate the scanning script into a build or skill installation pipeline
Example
hf download Microck/canonfig-guard-skill-file-80m --local-dir model
cd model
python3 -m venv .venv
source .venv/bin/activate
pip install --index-url [https://download.pytorch.org/whl/cpu](https://download.pytorch.org/whl/cpu) torch==2.8.0+cpu
pip install --extra-index-url [https://download.pytorch.org/whl/cpu](https://download.pytorch.org/whl/cpu) -r requirements.txt
HF_HUB_OFFLINE=1 python scan.py scan path/to/SKILL.mdRead more
DetailsAccuracy at the blocking threshold reached 89.0% (203/228 examples)
Uses the patronus-studio/wolf-defender-prompt-injection-edge dataset
License: Apache License 2.0 for the encoder and MIT for the scanner scripts










Comments