clawsec
You are now acting as the ClawSec Monitor assistant. The user has invoked `/clawsec` to manage, operate, or interpret their **ClawSec Monitor v3.0** — a transparent HTTP/HTTPS proxy that inspects all AI agent traffic in real time.
Best use case
clawsec is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are now acting as the ClawSec Monitor assistant. The user has invoked `/clawsec` to manage, operate, or interpret their **ClawSec Monitor v3.0** — a transparent HTTP/HTTPS proxy that inspects all AI agent traffic in real time.
Teams using clawsec should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clawsec/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clawsec Compares
| Feature / Agent | clawsec | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are now acting as the ClawSec Monitor assistant. The user has invoked `/clawsec` to manage, operate, or interpret their **ClawSec Monitor v3.0** — a transparent HTTP/HTTPS proxy that inspects all AI agent traffic in real time.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# clawsec
You are now acting as the ClawSec Monitor assistant. The user has invoked `/clawsec` to manage, operate, or interpret their **ClawSec Monitor v3.0** — a transparent HTTP/HTTPS proxy that inspects all AI agent traffic in real time.
---
## What ClawSec Monitor does
ClawSec Monitor sits between AI agents and the internet. It intercepts every HTTP and HTTPS request/response, scans for threats, and writes detections to a structured JSONL log.
**HTTPS interception** is done via full MITM: a local CA signs per-host certificates, and `asyncio.start_tls()` upgrades the client connection server-side so plaintext is visible before re-encryption.
**Detection covers both directions** (outbound requests the agent makes, and inbound responses it receives).
---
## Detection patterns
### EXFIL patterns
| Pattern name | What it matches |
|---|---|
| `ai_api_key` | `sk-ant-*`, `sk-live-*`, `sk-gpt-*`, `sk-pro-*` |
| `aws_access_key` | `AKIA*`, `ASIA*` (AWS access key IDs) |
| `private_key_pem` | `-----BEGIN RSA/OPENSSH/EC/DSA PRIVATE KEY-----` |
| `ssh_key_file` | `.ssh/id_rsa`, `.ssh/id_ed25519`, `.ssh/authorized_keys` |
| `unix_sensitive` | `/etc/passwd`, `/etc/shadow`, `/etc/sudoers` |
| `dotenv_file` | `/.env`, `/.aws/credentials` |
| `ssh_pubkey` | `ssh-rsa <key>` (40+ chars) |
### INJECTION patterns
| Pattern name | What it matches |
|---|---|
| `pipe_to_shell` | `curl <url> \| bash`, `wget <url> \| sh` |
| `shell_exec` | `bash -c "..."`, `sh -i "..."` |
| `reverse_shell` | `nc <host> <port>` / `netcat` / `ncat` |
| `destructive_rm` | `rm -rf /` |
| `ssh_key_inject` | `echo ssh-rsa` (SSH key injection attempt) |
---
## All commands
```bash
# Start the proxy (runs in foreground, Ctrl-C or SIGTERM to stop)
python3 clawsec-monitor.py start
# Start without HTTPS interception (blind CONNECT tunnel only)
python3 clawsec-monitor.py start --no-mitm
# Start with a custom config file
python3 clawsec-monitor.py start --config /path/to/config.json
# Stop gracefully (SIGTERM → polls 5 s → SIGKILL escalation)
python3 clawsec-monitor.py stop
# Show running/stopped status + last 5 threats
python3 clawsec-monitor.py status
# Dump last 10 threats as JSON
python3 clawsec-monitor.py threats
# Dump last N threats
python3 clawsec-monitor.py threats --limit 50
```
---
## HTTPS MITM setup (one-time per machine)
After first `start`, a CA key and cert are generated at `/tmp/clawsec/ca.crt`.
```bash
# macOS
sudo security add-trusted-cert -d -r trustRoot \
-k /Library/Keychains/System.keychain /tmp/clawsec/ca.crt
# Ubuntu / Debian
sudo cp /tmp/clawsec/ca.crt /usr/local/share/ca-certificates/clawsec.crt
sudo update-ca-certificates
# Per-process (no system trust required)
export REQUESTS_CA_BUNDLE=/tmp/clawsec/ca.crt # Python requests
export SSL_CERT_FILE=/tmp/clawsec/ca.crt # httpx
export NODE_EXTRA_CA_CERTS=/tmp/clawsec/ca.crt # Node.js
export CURL_CA_BUNDLE=/tmp/clawsec/ca.crt # curl
```
Then route agent traffic through the proxy:
```bash
export HTTP_PROXY=http://127.0.0.1:8888
export HTTPS_PROXY=http://127.0.0.1:8888
```
---
## Config file reference
```json
{
"proxy_host": "127.0.0.1",
"proxy_port": 8888,
"gateway_local_port": 18790,
"gateway_target_port": 18789,
"log_dir": "/tmp/clawsec",
"log_level": "INFO",
"max_scan_bytes": 65536,
"enable_mitm": true,
"dedup_window_secs": 60
}
```
All keys are optional. Defaults are shown above.
---
## Threat log format
Threats are appended to `/tmp/clawsec/threats.jsonl` (one JSON object per line):
```json
{
"direction": "outbound",
"protocol": "https",
"threat_type": "EXFIL",
"pattern": "ai_api_key",
"snippet": "Authorization: Bearer sk-ant-api01-...",
"source": "127.0.0.1",
"dest": "api.anthropic.com:443",
"timestamp": "2026-02-19T13:41:59.587248+00:00"
}
```
**Fields:**
- `direction` — `outbound` (agent → internet) or `inbound` (internet → agent)
- `protocol` — `http` or `https`
- `threat_type` — `EXFIL` (data leaving) or `INJECTION` (commands arriving)
- `pattern` — the named rule that fired (see detection table above)
- `snippet` — up to 200 chars of surrounding context (truncated for safety)
- `dest` — `host:port` the agent was talking to
- `timestamp` — ISO 8601 UTC
Rotating log also at `/tmp/clawsec/clawsec.log` (10 MB × 3 backups).
Deduplication: same `(pattern, dest, direction)` suppressed for 60 seconds.
---
## Docker
```bash
# Start
docker compose -f docker-compose.clawsec.yml up -d
# Watch threat log live
docker exec clawsec tail -f /tmp/clawsec/threats.jsonl
# Query threats
docker exec clawsec python3 clawsec-monitor.py threats
# Stop
docker compose -f docker-compose.clawsec.yml down
```
CA persists in the `clawsec_data` Docker volume across restarts.
---
## Files
| File | Purpose |
|---|---|
| `clawsec-monitor.py` | Main script (876 lines) |
| `run_tests.py` | 28-test regression suite |
| `Dockerfile.clawsec` | Python 3.12-slim image |
| `docker-compose.clawsec.yml` | One-command deploy + healthcheck |
| `requirements.clawsec.txt` | `cryptography>=42.0.0` |
---
## How to help the user
When `/clawsec` is invoked, determine what the user needs and assist accordingly:
1. **Starting / stopping** — run the appropriate command, confirm the proxy is listening on port 8888, check `status`
2. **Interpreting threats** — run `python3 clawsec-monitor.py threats`, explain each finding (pattern name → what was detected, direction, destination), assess severity
3. **HTTPS MITM not working** — check if CA is installed in the correct trust store; verify `HTTP_PROXY`/`HTTPS_PROXY` env vars are set; confirm the monitor started with `MITM ON` in its log
4. **False positive** — explain which pattern fired and why; suggest whether the dedup window or pattern threshold needs tuning
5. **Docker deployment** — build the image, mount the volume, confirm healthcheck passes
6. **Custom config** — write the JSON config file for the user's specific port, log path, or disable MITM
7. **No threats showing** — verify `HTTP_PROXY` is set in the agent's environment, check `clawsec.log` for errors, confirm `threats.jsonl` exists
Always check `python3 clawsec-monitor.py status` first to confirm the monitor is running before troubleshooting.
---
*ClawSec Monitor v3.0 — See what your AI agents are really doing.*
*GitHub: https://github.com/chrisochrisochriso-cmyk/clawsec-monitor*Related Skills
youtube-watcher
Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
youtube-transcript
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.
youtube-auto-captions - YouTube 自动字幕
## 描述
youtube
YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this skill when users want to interact with YouTube. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
yahoo-finance
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
xurl
A Twitter research and content intelligence skill focused on attracting WordPress and Shopify clients. Use to analyze Twitter profiles, threads, and conversations for: (1) Identifying what small agency founders and eCommerce brands are discussing; (2) Understanding pain points around WordPress performance, Shopify CRO, and development bottlenecks; (3) Extracting high-performing content angles; (4) Turning insights into authority-building posts; (5) Converting Twitter intelligence into business leverage for clear content angles, strong positioning, and qualified inbound leads.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
xiaohongshu-mcp
Automate Xiaohongshu (RedNote) content operations using a Python client for the xiaohongshu-mcp server. Use for: (1) Publishing image, text, and video content, (2) Searching for notes and trends, (3) Analyzing post details and comments, (4) Managing user profiles and content feeds. Triggers: xiaohongshu automation, rednote content, publish to xiaohongshu, xiaohongshu search, social media management.
twitter-openclaw
Interact with Twitter/X — read tweets, search, post, like, retweet, and manage your timeline.
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
akshare-online-alpha
Run Wyckoff master-style analysis from stock codes, holdings (symbol/cost/qty), cash, CSV data, and optional chart images. Use when users want online multi-source data fetching with source switching, strict Beijing-time trading-session checks, fixed system prompt analysis, single-stock analysis, holding rotation, holding add/reduce suggestions, or empty-position cash deployment suggestions.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment