What It Does
The Add Image Vision skill:- Downloads WhatsApp image attachments
- Resizes images with sharp for optimal processing
- Saves images to group workspace
- Passes images to Claude as base64-encoded content blocks
- Enables agents to describe, analyze, and answer questions about images
Prerequisites
- NanoClaw with WhatsApp channel installed
- Build tools for native dependencies (sharp)
- macOS: Xcode Command Line Tools (
xcode-select --install) - Linux:
build-essentialpackage
- macOS: Xcode Command Line Tools (
How to Apply
Apply code changes
The skill runs the apply script which:
- Adds image processing to WhatsApp channel
- Adds image handling to agent-runner
- Installs
sharpdependency
What Changes
Files Modified
src/channels/whatsapp.ts- Adds image download and processingcontainer/agent-runner/src/index.ts- Adds image content block handlingpackage.json- Addssharpdependency.nanoclaw/state.yaml- Records skill application
Dependencies Added
sharp- High-performance image processing library
Usage
Send Image to Agent
Simply send an image in any registered WhatsApp chat:Image Storage
Images are saved togroups/{folder}/attachments/ with format:
- Original:
image-{timestamp}.{ext} - Resized: Automatically optimized for Claude
Images are processed and sent to Claude as part of the message. The agent can see the image content and answer questions about it naturally.
Troubleshooting
”Image - download failed”
WhatsApp connection may be unstable or timeout occurred. Check:- WhatsApp authentication is valid
- Network connection is stable
store/auth/creds.jsonexists
”Image - processing failed”
Sharp may not be installed correctly:Agent Doesn’t Mention Image Content
Check container logs for “Loaded image” messages:- Verify agent-runner source was synced to group caches
- Rebuild container:
./container/build.sh - Restart service