← All skills
Tencent SkillHub Β· AI

Counterclaw Core

Defensive interceptor for prompt injection and basic PII masking.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Defensive interceptor for prompt injection and basic PII masking.

⬇ 0 downloads β˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
README.md, SKILL.md, email_protector.py, pyproject.toml, send_protected_email.sh, src/counterclaw/__init__.py

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

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.

Upgrade existing

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.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.1.1

Documentation

ClawHub primary doc Primary doc: SKILL.md 13 sections Open source page

CounterClaw 🦞

Defensive security for AI agents. Snaps shut on malicious payloads.

⚠️ Security Notice

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

Installation

claw install counterclaw

Quick Start

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}}

Features

πŸ”’ 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

Required Environment Variable

# 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"

Runtime Configuration

# Option 1: Via environment variable (recommended) # Set TRUSTED_ADMIN_IDS before running interceptor = CounterClawInterceptor() # Option 2: Direct parameter interceptor = CounterClawInterceptor(admin_user_id="123456789")

Security Notes

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

Files Created

PathPurpose~/.openclaw/memory/Directory created on first run~/.openclaw/memory/MEMORY.mdViolation logs with PII masked

License

MIT - See LICENSE file

Running Tests Locally

python3 tests/test_scanner.py

Linting

pip install ruff ruff check src/

Publishing to ClawHub

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

Category context

Agent frameworks, memory systems, reasoning layers, and model-native orchestration.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
3 Scripts2 Docs1 Files
  • SKILL.md Primary doc
  • README.md Docs
  • email_protector.py Scripts
  • send_protected_email.sh Scripts
  • src/counterclaw/__init__.py Scripts
  • pyproject.toml Files