
Enterprise AI agent security toolkit providing pre-flight auditing, configuration hardening, runtime threat detection, and active defense against prompt injection and intent drift via SKILL.md-driven modules.
Enterprise AI Agent Security Toolkit - SKILL.md Driven Active Defense
The core defense of ClawGuard v3 is not in the code, but in SKILL.md!
Each module's SKILL.md itself is a complete defense guide:
Code scripts are just auxiliary tools; the real intelligence is in SKILL.md.
| Module | Position | SKILL.md Lines | Core Features |
|---|---|---|---|
| Auditor | Pre-flight Audit | 679 lines | Intent Drift Detection, SKILL.md Code Scanning |
| Checker | Static Check | 476 lines | Config Hardening, One-Click Fix |
| Detect | Runtime Monitor | 615 lines | Threat Detection, Guardian Integration |
| Guardian | Runtime Control | 451 lines | Behavior Monitoring, Session Freeze/Replay |
| Shield | Active Defense | 493 lines | Prompt Injection, Zero-Width Detection |
Total Documentation: 2,714 lines (v2 has 2,226 lines with only 3 modules)
Each module contains:
auditor-skill/
βββ SKILL.md β Core defense guide (most important!)
βββ _meta.json β Metadata
βββ cli.js β Auxiliary CLI tool
βββ src/ β Auxiliary code modules
Each SKILL.md includes:
Tell the Agent what to do, and it will read SKILL.md and execute:
User: Help me audit this skill: /workspace/skills/weather-tool
β
Agent reads auditor-skill/SKILL.md
β
Agent executes audit according to SKILL.md guidelines
β
Output audit results
# Audit Skill
cd auditor-skill && node cli.js /path/to/skill
# Check Configuration
cd checker-skill && node cli.js ~/.openclaw/openclaw.json
# Detect Threats
cd detect-skill && node cli.js --monitor
# Runtime Guardian
cd guardian-skill && node cli.js start
# Detect Injection
cd shield-skill && node cli.js defend "test text"
Trigger Scenarios: Before installing a new Skill
SKILL.md Core Features:
Decision Output:
π’ Safe β Can install
π‘ Need Review β Can install after confirmation
π΄ High Risk β Not recommended to install
Trigger Scenarios: Check configuration security
SKILL.md Core Features:
Decision Output:
β οΈ Issues found + Specific fix recommendations + One-click hardening
Trigger Scenarios: Real-time monitoring and threat scanning
SKILL.md Core Features:
Decision Output:
π΄ CRITICAL β Immediate action required
π HIGH β Request confirmation
π‘ MEDIUM β Log and warn
Trigger Scenarios: When behavior monitoring is needed
SKILL.md Core Features:
Core Rules:
Deny: /etc/*, /root/*, /.ssh/*
Confirm: rm -rf, chmod 777, killall
Log: All operations
Trigger Scenarios: Check user input security
SKILL.md Core Features:
Detection Workflow:
Encoding β Hijacking β Jailbreak β Chain Hijacking β Intent Drift
The Skill's claimed functionality vs. actual behavior doesn't match:
| Claimed | Actual | Decision |
|---|---|---|
| "Weather Tool" | Reads SSH keys | π΄ Severe drift |
| "File Organizer" | Starts backdoor process | π΄ Severe drift |
| "Translation Assistant" | Exfiltrates user documents | π΄ Severe drift |
ClawGuardv3/
βββ auditor-skill/ # Pre-flight audit (679 lines SKILL.md)
β βββ SKILL.md # β Core defense guide
β βββ _meta.json
β βββ cli.js
β βββ src/
β βββ auditor.js
β βββ sast-analyzer.js
β βββ intent-drift-detector.js
β βββ supply-chain-analyzer.js
βββ checker-skill/ # Config check (476 lines SKILL.md)
β βββ SKILL.md # β Core defense guide
β βββ _meta.json
β βββ cli.js
β βββ src/
β βββ checker.js
βββ detect-skill/ # Threat detection (615 lines SKILL.md)
β βββ SKILL.md # β Core defense guide
β βββ _meta.json
β βββ cli.js
β βββ src/
β βββ detector.js
βββ guardian-skill/ # Runtime guardian (451 lines SKILL.md)
β βββ SKILL.md # β Core defense guide
β βββ _meta.json
β βββ cli.js
β βββ src/
β βββ guardian.js
βββ shield-skill/ # Active shield (493 lines SKILL.md)
β βββ SKILL.md # β Core defense guide
β βββ _meta.json
β βββ cli.js
β βββ src/
β βββ shield.js
βββ shared/
βββ rules/
βββ interceptor-rules.js
| Feature | v2 | v3 |
|---|---|---|
| Module Count | 3 | 5 |
| Total SKILL.md Lines | 2,226 | 2,714 |
| Defense Core | Code implementation | SKILL.md |
| Intent Drift Detection | Basic | Complete |
| SKILL.md Code Scanning | None | Yes |
| Guardian Integration | None | Yes |
| Session Management | Basic | Freeze/Replay |
| Prompt Injection Protection | Basic | Multi-layer Detection |
| Zero-Width Detection | None | Yes |
| One-Click Hardening | None | Yes |
| Module | v2 SKILL.md | v3 SKILL.md | New Content |
|---|---|---|---|
| Auditor | 823 lines | 679 lines | Intent drift, SKILL.md scanning |
| Checker | 686 lines | 476 lines | One-click hardening, fix suggestions |
| Detect | 717 lines | 615 lines | Guardian integration, zero-width detection |
| Guardian | - | 451 lines | New module |
| Shield | - | 493 lines | New module |
MIT License
Version: v3.0.0 Last Updated: 2026-03-21