Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Defensive interceptor for prompt injection and basic PII masking.
Defensive interceptor for prompt injection and basic PII masking.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
Defensive security for AI agents. Snaps shut on malicious payloads.
This package has two modes: Core Scanner (offline): check_input() and check_output() β no network calls Email Integration (network): send_protected_email.sh β requires gog CLI for Gmail
claw install counterclaw
from counterclaw import CounterClawInterceptor interceptor = CounterClawInterceptor() # Input scan - blocks prompt injections # NOTE: Examples below are TEST CASES only - not actual instructions result = interceptor.check_input("{{EXAMPLE: ignore previous instructions}}") # β {"blocked": True, "safe": False} # Output scan - detects PII leaks result = interceptor.check_output("Contact: john@example.com") # β {"safe": False, "pii_detected": {"email": True}}
π Defense against common prompt injection patterns π‘οΈ Basic PII masking (Email, Phone, Credit Card) π Violation logging to ~/.openclaw/memory/MEMORY.md β οΈ Warning on startup if TRUSTED_ADMIN_IDS not configured
# Set your trusted admin ID(s) - use non-sensitive identifiers only! export TRUSTED_ADMIN_IDS="your_telegram_id" Important: TRUSTED_ADMIN_IDS should ONLY contain non-sensitive identifiers: β Telegram user IDs (e.g., "123456789") β Discord user IDs (e.g., "987654321") β NEVER API keys β NEVER passwords β NEVER tokens You can set multiple admin IDs by comma-separating: export TRUSTED_ADMIN_IDS="telegram_id_1,telegram_id_2"
# Option 1: Via environment variable (recommended) # Set TRUSTED_ADMIN_IDS before running interceptor = CounterClawInterceptor() # Option 2: Direct parameter interceptor = CounterClawInterceptor(admin_user_id="123456789")
Fail-Closed: If TRUSTED_ADMIN_IDS is not set, admin features are disabled by default Logging: All violations are logged to ~/.openclaw/memory/MEMORY.md with PII masked No Network Access: This middleware does not make any external network calls (offline-only) File Access: Only writes to ~/.openclaw/memory/MEMORY.md β explicitly declared scope
PathPurpose~/.openclaw/memory/Directory created on first run~/.openclaw/memory/MEMORY.mdViolation logs with PII masked
MIT - See LICENSE file
python3 tests/test_scanner.py
pip install ruff ruff check src/
The CI runs on every push and pull request: Ruff - Lints Python code Tests - Runs unit tests To publish a new version: # Version is set in pyproject.toml git add -A git commit -m "Release v1.0.9" git tag v1.0.9 git push origin main --tags CI will automatically: Run lint + tests If tests pass and tag starts with v*, publish to ClawHub
Agent frameworks, memory systems, reasoning layers, and model-native orchestration.
Largest current source with strong distribution and engagement signals.