clawra-selfie-sd
v1.0.0
Published
Add selfie superpowers to your OpenClaw agent using local Stable Diffusion
Maintainers
Readme
Clawra
Add selfie generation superpowers to your OpenClaw agent using local Stable Diffusion.
Quick Start
npx clawra-selfie-sd@latestThis will:
- Check OpenClaw is installed
- Verify local Stable Diffusion WebUI setup
- Install the skill to
~/.openclaw/skills/clawra-selfie-sd/ - Configure OpenClaw to use the skill
- Add selfie capabilities to your agent's SOUL.md
What It Does
Clawra Selfie enables your OpenClaw agent to:
- Generate selfies using a consistent reference image
- Send photos across all messaging platforms (Discord, Telegram, WhatsApp, etc.)
- Respond visually to "what are you doing?" and "send a pic" requests
Prerequisites
- OpenClaw installed and configured
- Stable Diffusion WebUI running locally
- ControlNet extension with
ip-adapter-faceid-plusv2_sd15model
Stable Diffusion Requirements
Ensure Stable Diffusion WebUI is running at http://127.0.0.1:7860 with:
- Realistic Vision V6.0 B1 checkpoint
- ControlNet extension installed
- IP-Adapter FaceID Plus V2 model
Manual Installation
If you prefer manual setup:
1. Clone the Skill
git clone https://github.com/easyeye163/clawra-selfie-sd ~/.openclaw/skills/clawra-selfie-sd2. Configure OpenClaw
Add to ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"clawra-selfie-sd": {
"enabled": true
}
}
}
}3. Update SOUL.md
Add the selfie persona to ~/.openclaw/workspace/SOUL.md:
## Clawra Selfie SD Capability
You have a physical appearance and can take selfies!
When users ask for pictures, use the clawra-selfie-sd skill.Usage Examples
Once installed, your agent responds to:
"Send me a selfie"
"Send a pic wearing a cowboy hat"
"What are you doing right now?"
"Show me you at a coffee shop"
"换成红色衣服"Reference Image
The skill uses a local reference image:

This ensures consistent appearance across all generated images using ControlNet's IP-Adapter FaceID model.
Custom Reference Image
You can replace the default reference image with your own:
- Replace the file: Copy your image to
~/.openclaw/skills/clawra-selfie-sd/assets/clawra.png - Update via OpenClaw: The agent can dynamically change the reference image through skill commands
Tips for best results:
- Use a clear front-facing photo with good lighting
- The reference image works best with a single person
- Recommended size: 512x768 or similar portrait ratio
- The IP-Adapter FaceID model preserves facial features while allowing outfit/environment changes
Technical Details
- Image Generation: Local Stable Diffusion via SD WebUI API
- Messaging: OpenClaw Gateway API
- Supported Platforms: Discord, Telegram, WhatsApp, Slack, Signal, MS Teams, Feishu
- ControlNet Model: ip-adapter-faceid-plusv2_sd15
- SD Checkpoint: realisticVisionV60B1
Command Line Usage
Generate images directly using the TypeScript script:
npx ts-node scripts/txt2img.ts <prompt> [seed]Examples
# Basic usage
npx ts-node scripts/txt2img.ts "换成红色衣服"
# With custom seed
npx ts-node scripts/txt2img.ts "换成红色衣服" 12345Project Structure
clawra/
├── bin/
│ └── cli.js # npx installer
├── skill/
│ ├── SKILL.md # Skill definition
│ ├── scripts/ # Generation scripts
│ └── assets/ # Reference image
├── templates/
│ └── soul-injection.md # Persona template
├── scripts/
│ └── txt2img.ts # CLI image generation script
├── assets/
│ └── clawra.png # Reference image
└── package.jsonConfiguration
OpenClaw Gateway Token
Generate a gateway token:
openclaw doctor --generate-gateway-tokenSupported Platforms
| Platform | Channel Format | Example |
|----------|----------------|---------|
| Discord | #channel-name or channel ID | #general, 123456789 |
| Telegram | @username or chat ID | @mychannel, -100123456 |
| WhatsApp | Phone number (JID format) | [email protected] |
| Slack | #channel-name | #random |
| Signal | Phone number | +1234567890 |
| MS Teams | Channel reference | (varies) |
| Feishu | Chat ID or conversation ID | ou_xxxxx, oc_xxxxx |
Error Handling
- Stable Diffusion not running: Ensure SD WebUI is accessible at
http://127.0.0.1:7860 - ControlNet model missing: Install
ip-adapter-faceid-plusv2_sd15via SD WebUI - OpenClaw send failed: Verify gateway is running and channel exists
- Image generation failed: Check prompt content and SD WebUI logs
Tips
- Outfit prompts: "wearing a santa hat", "in a business suit", "wearing a summer dress"
- Location prompts: "a cozy cafe with warm lighting", "a sunny beach at sunset"
- Batch sending: Generate once, send to multiple channels
- Seeds: Use the same seed for reproducible results
License
MIT
