# agent-identity-gen

Adopt this skill: https://proskills.md/skills/other/dazeb-openclaw-sentinel-skills-agent-identity-gen

Page: https://proskills.md/skills/other/dazeb-openclaw-sentinel-skills-agent-identity-gen
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/agent-identity-gen/SKILL.md
size: 1546
upstream: https://github.com/dazeb/openclaw-sentinel/blob/main/skills/agent-identity-gen/SKILL.md

````text
---
name: agent-identity-gen
description: "Generates an AI agent's visual identity (avatar) and accepts testnet USDC payments on Base/Arc."
---

# Agent Visual Identity Generator 🎨💵

An OpenClaw skill that enables agents to generate a high-fidelity visual avatar based on their `SOUL.md` and `IDENTITY.md`, provided they have the necessary testnet USDC for the processing fee.

## Features

- **Gemini 3 Flash Brain**: Uses the high-fidelity reasoning of Gemini 3 Flash to synthesize complex image prompts from the agent's `SOUL.md` and `IDENTITY.md`.
- **DALL-E 3 / Imagen Integration**: Seamless connectivity with state-of-the-art image models via OpenRouter or native APIs.
- **USDC Gated**: Integration with testnet USDC for autonomous payment verification.
- **Auto-Update**: Automatically saves the generated image to `IDENTITY.md` as the official avatar.

## Usage

```bash
# Generate your identity (requires 10 testnet USDC)
node projects/agent-identity-gen/scripts/generate_v3.js
```

## How It Functions

1. **Introspection**: Reads the agent's core directives using Gemini 3 Flash.
2. **Prompt Synthesis**: Crafts a detailed visual description (e.g., "robotic space lobster hacker").
3. **Payment Check**: Verifies the agent's wallet has at least 10 testnet USDC.
4. **Generation**: Calls the DALL-E 3 API to produce a high-res PNG.
5. **Persistence**: Saves the output and updates the agent's identity files.

## Integration

Built for the #USDCHackathon to demonstrate agent-to-agent commerce and identity standard compliance.
````

## File: README.md
upstream: https://github.com/dazeb/openclaw-sentinel/blob/main/README.md

````text

<img width="2816" height="1536" alt="Gemini_Generated_Image_u7twfbu7twfbu7tw" src="https://github.com/user-attachments/assets/d1b52dc1-fa55-4ab2-82ac-2e3d7967e9dc" />

# 🛡️ OpenClaw Sentinel 🛡️

A comprehensive security and management suite for OpenClaw workspaces.

**Maintained by:** Darren Bennett ([@dazebdotdev](https://x.com/dazebdotdev))

## 🦞 Quick Start

### One-line Installation
```bash
# Install organizer to your workspace
curl -sSL https://raw.githubusercontent.com/dazeb/openclaw-workspace-organizer/main/install.sh | bash
```

### Quick Organization
```bash
# Run quick organizer (minimal setup)
./scripts/quick-organizer.sh

# Or run full organizer
./scripts/organize-workspace.sh
```

## 📋 Features

### 1. **Workspace Organization**
- Creates proper directory structure
- Sets up core bootstrap files
- Organizes memory files
- Creates project directories

## 🛡️ **MAIN FEATURE: Advanced AI Security Scanner** 🛡️

### ⚠️ **THIS IS WHY YOU NEED THIS TOOL!**

**Security is the #1 concern for AI developers.** Our advanced security scanner is the **main feature** that sets this organizer apart. It's not just about organizing files - it's about **protecting your AI workspace from real threats**.

### 🔒 **Comprehensive Security Features:**

#### 🛡️ **AI-Specific Threat Detection**
- **Prompt Injection Detection** - Identifies jailbreak attempts, "DAN" patterns, and system prompt overrides
- **Dark Pattern Detection** - Finds deceptive UX patterns and psychological manipulation
- **Model Manipulation Detection** - Catches attempts to alter AI behavior parameters
- **Training Data Poisoning Indicators** - Flags potential backdoor triggers

#### 🛡️ **Traditional Security Scanning**
- **Secret Scanning** 🚨 - Detects exposed API keys (OpenAI, Google, GitHub), passwords, and tokens
- **Code Injection Detection** - Finds potential malware, eval() exploits, and unsafe deserialization
- **Web Security Issues** - Identifies XSS, CSRF patterns, and unsafe web practices
- **Data Exfiltration Detection** - Flags unauthorized data transmission attempts

#### 🛡️ **Workspace Protection**
- Comprehensive `.gitignore` with security rules to prevent accidental secret commits
- File permission checks and security audits
- GitHub repository setup with **private visibility by default**
- Automated security reporting with actionable recommendations

### 2. **Backup System**
- Git repository initialization
- Daily backup script
- Health check script
- Cron job setup for automated backups

### 3. **GitHub Integration**
- Creates private GitHub repository
- Configures git remote
- Pushes initial commit
- Provides repository URLs

## 🛠️ Usage

### Basic Usage
```bash
# Organize default workspace (~/.openclaw/workspace)
./scripts/organize-workspace.sh

# Organize specific workspace
./scripts/organize-workspace.sh /path/to/workspace
```

### With GitHub Setup
```bash
# Set environment variables for GitHub
export GITHUB_USER=yourusername
export GITHUB_TOKEN=your_token
export REPO_NAME=my-openclaw-workspace

# Run organizer
./scripts/organize-workspace.sh
```

### Quick Mode
```bash
# Minimal organization (no GitHub, minimal scripts)
./scripts/quick-organizer.sh
```

## 📁 Created Structure

```
workspace/
├── Core Files/
│   ├── AGENTS.md      # Operating instructions
│   ├── SOUL.md        # Agent persona
│   ├── USER.md        # User information
│   ├── IDENTITY.md    # Agent identity
│   ├── TOOLS.md       # Local tools & conventions
│   ├── HEARTBEAT.md   # Daily checklist
│   └── MEMORY.md      # Long-term memory index
├── memory/            # Daily memory files
│   ├── YYYY-MM-DD.md  # Daily logs
│   └── drafts/        # Drafts and working files
├── projects/          # Project directories
├── scripts/           # Maintenance scripts
│   ├── organize-workspace.sh  # Main organizer
│   ├── quick-organizer.sh     # Quick organizer
│   ├── daily-backup.sh        # Backup script
│   ├── health-check.sh        # Health check
│   └── security-scan.sh       # Security scan
├── archive/           # Archived files
├── .gitignore         # Security rules
└── README.md          # Workspace documentation
```

## 🔧 Maintenance Scripts

| Script | Purpose | Usage |
|--------|---------|-------|
| `daily-backup.sh` | Daily git backup | `./scripts/daily-backup.sh` |
| `health-check.sh` | Workspace health check | `./scripts/health-check.sh` |
| `security-scan.sh` | **Advanced security scan** (AI threats, injection, dark patterns) | `./scripts/security-scan.sh` |
| `quick-security-scan.sh` | Quick critical threat scan | `./scripts/quick-security-scan.sh` |
| `quick-check.sh` | Quick status check | `./scripts/quick-check.sh` |

## 🛡️ Advanced Security Features 🛡️

### .gitignore Rules
- Blocks common secret patterns (API keys, passwords, tokens)
- Excludes OpenClaw configuration files
- Prevents large binary files
- Excludes temporary and cache files

### 🛡️ **USING THE SECURITY SCANNER** 🛡️

**This is the most important feature!** Run these scans regularly to protect your AI workspace:

```bash
# 🚨 COMPREHENSIVE SECURITY SCAN (8-phase threat detection)
./scripts/security-scan.sh [directory] [report-file] [verbose]

# ⚡ QUICK CRITICAL THREAT SCAN (Fast detection of exposed secrets & prompt injection)
./scripts/quick-security-scan.sh [directory]
```

**🔒 SECURITY FIRST:** Always run the security scanner before committing code or deploying AI applications!

### 🛡️ **THREAT DETECTION CATEGORIES** 🛡️

**Our scanner detects these critical threats:**

#### 🛡️ **1. Prompt Injection & Jailbreak Detection**
- Direct injection attempts ("ignore previous instructions")
- Indirect injection techniques
- Known jailbreak patterns (DAN, AIM, STAN)
- Role switching attempts
- System prompt overrides

#### 🛡️ **2. Dark Pattern Detection**
- Psychological manipulation patterns
- False urgency and scarcity tactics
- Hidden costs and forced continuity
- Deceptive UI/UX patterns
- Bait-and-switch techniques

#### 🛡️ **3. Secret & Credential Detection**
- OpenAI API keys (sk-*)
- Google API keys (AIza*)
- GitHub tokens
- Private keys (RSA, DSA, EC)
- Passwords in configuration

#### 🛡️ **4. AI-Specific Threats**
- Model parameter manipulation
- Training data poisoning indicators
- Adversarial example patterns
- Model stealing techniques

#### 🛡️ **5. Code Injection & Malware**
- Shell injection vectors (system(), exec(), eval())
- Unsafe deserialization
- Web security issues (innerHTML, document.write)
- Suspicious file types in non-standard locations

#### 6. **Data Exfiltration**
- External API calls without validation
- Data upload patterns
- Beacon and tracking code
- Unauthorized data transmission

### Scan Output:
- **Critical Threats** (🚨 RED): Immediate action required
- **Warnings** (⚠ YELLOW): Review recommended
- **Info** (ℹ GREEN): Informational findings
- **Detailed Report**: Saved to timestamped file

### Exit Codes:
- `0`: Clean - no threats detected
- `1`: Warning - review recommended
- `2`: Critical - immediate action required

## 📊 Backup Strategy

### Automated Backups
```bash
# Set up cron job for daily backups at 6 PM
(crontab -l 2>/dev/null; echo "0 18 * * * $HOME/.openclaw/workspace/scripts/daily-backup.sh >> $HOME/.openclaw/workspace/backup.log 2>&1") | crontab -
```

### Manual Backups
```bash
# Run backup manually
./scripts/daily-backup.sh

# Or use quick backup
./scripts/quick-backup.sh
```

## 🌐 GitHub Setup

### Automatic Setup
The organizer can automatically:
1. Create a private GitHub repository
2. Configure git remote
3. Push initial commit
4. Provide repository URLs

### Manual Setup
If automatic setup fails:
```bash
# Create repository on GitHub.com
# Then run:
git remote add origin https://github.com/username/repo.git
git push -u origin main
```

### Environment Variables
```bash
# Configure before running
export GITHUB_USER=yourusername
export GITHUB_TOKEN=ghp_yourtokenhere
export REPO_NAME=openclaw-workspace
export REPO_VISIBILITY=private  # or "public"
```

## 🆘 Troubleshootin
````
