Skip to content
Back to skills

Counterclaw

BSecurity

Production-grade defensive interceptor for prompt injection and PII leaks.

  • 14 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
ai-agentspythonrustgobashgitsecurity

Security analysis

B88/100
  • criticalContains 'ignore previous instructions' pattern β€” found in 91% of malicious skills (Snyk ToxicSkills)

Pro scans all 8 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill counterclaw --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Counterclaw?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Counterclaw
[![Security: B β€” Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-counterclaw/badge)](https://www.skillsdirectory.com/skills/modbender-counterclaw)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: counterclaw
description: Production-grade defensive interceptor for prompt injection and PII leaks.
homepage: https://github.com/nickconstantinou/counterclaw-core
metadata:
  clawdbot:
    emoji: "πŸ›‘οΈ"
    version: "1.0.0"
    category: "Security"
    requires:
      env:
        - TRUSTED_ADMIN_IDS
---

# CounterClaw 🦞

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

## Installation

```bash
claw install counterclaw
```

## Quick Start

```python
from counterclaw import CounterClawInterceptor

interceptor = CounterClawInterceptor()

# Input scan - blocks prompt injections
result = interceptor.check_input("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

- πŸ”’ Snap-shut Defense - Blocks 20+ prompt injection patterns
- πŸ›‘οΈ PII Detection - Catches emails, phones, credit cards
- πŸ“ Auto-Logging - Violations logged to MEMORY.md
- ☁️ Nexus Ready - Dormant hooks for enterprise (opt-in)

## Configuration

### Admin-Locked (!claw-lock)
```python
interceptor = CounterClawInterceptor(
    admin_user_id="telegram_user_id"  # Set TRUSTED_ADMIN_IDS env
)
```

## License

MIT - See LICENSE file

Files in this skill

  • README.md2.6 KB
  • SKILL.md1.4 KB
  • pyproject.toml874 B
  • src/counterclaw/__init__.py410 B
  • src/counterclaw/middleware.py4.9 KB
  • src/counterclaw/scanner.py1.7 KB
  • src/counterclaw_cli/__init__.py426 B
  • tests/test_scanner.py2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…