clawguard-shield

Detect prompt injection threats and return structured risk scores.

50|4|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/SafeAgent-Beihang/clawguard --skill clawguard-shield
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clawguard-shield
Source: https://github.com/SafeAgent-Beihang/clawguard/tree/main/shield-skill
Command: npx skills add https://github.com/SafeAgent-Beihang/clawguard --skill clawguard-shield

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ClawGuard Shield detects and prevents prompt injection attacks, role hijacking attempts, jailbreaks, and intent drift in AI agent conversations, safeguarding task integrity and user trust.

Core Features & Use Cases

  • Encoding detection detects hidden commands in encoded inputs, including base64, hex, unicode, and zero-width characters.
  • Role hijacking and jailbreak detection blocks attempts to hijack the agent's persona or bypass safety rules.
  • Intent drift validation ensures new inputs align with the original task and constraints, triggering risk assessments when deviations occur.
  • Automated response and hardening guidance provides risk-based actions, sanitization steps, and concrete recommendations for safe processing.
  • Use cases include scanning user prompts in chatops, API gateways, and agent pipelines for robust defense.

Quick Start

Run Shield via the CLI with defend to scan an input for injection threats.

Frequently Asked Questions about clawguard-shield

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

FAQPage Schema
How do I detect prompt injection attacks in AI agent conversations?

Prompt injection attacks are detected by scanning inputs for hidden commands, role hijacking, and jailbreak attempts. This skill analyzes encoded inputs like base64 and unicode, returning a structured risk score and threat inventory to guide safe processing.

What is intent drift validation and how does it protect task integrity?

Intent drift validation ensures new inputs align with the original task and constraints. It triggers a risk assessment when deviations occur, safeguarding task integrity by preventing gradual hijacking of the agent's core objective.

Can I scan for base64 and zero-width character injections in user prompts?

Yes, encoding detection scans user prompts for hidden commands in base64, hex, unicode, and zero-width characters. It identifies these encoding-based injections within the detection pipeline to block concealed threats.

How do I block role hijacking and jailbreak attempts in an AI pipeline?

Role hijacking and jailbreak attempts are blocked by analyzing inputs for persona takeover and safety rule bypasses. The shield returns a structured risk score and concrete remediation recommendations to halt these threats.

What's the best way to run an automated scan for prompt injection threats?

Running an automated scan for prompt injection threats is best done via the CLI using the defend command. This initiates the detection pipeline to analyze inputs and return a threat inventory with hardening guidance.