Install
openclaw skills install @songhonglei/agent-avatar-managerManage your OpenClaw Agent's avatar. Send an image/URL directly, or describe a style and let Freepik vector search pick candidates for you. Auto-saves to the workspace avatars/ directory and updates IDENTITY.md. 当用户说「换头像」「找一张头像」「更新头像」「给我换个头像」「change avatar」时使用。 Requires a free Freepik API Key for auto-search mode (direct image/URL mode works without it). OpenClaw-only — relies on `openclaw agents set-identity`, `IDENTITY.md`, and `TOOLS.md` conventions.
openclaw skills install @songhonglei/agent-avatar-manageropenclaw agents set-identity + IDENTITY.md/TOOLS.md)Search vector avatars from Freepik, preview candidates, then replace your OpenClaw Agent's avatar in one flow. Also supports direct image/URL upload when you already have one.
A. User sends an image or URL (no API Key needed) The user sends an image file or image URL → jump straight to step 5.
B. Freepik API auto search (needs a free API Key)
Read the API key from TOOLS.md, field name Freepik API Key.
If found, run the search flow starting at step 2.
C. No API Key → guide the user
When TOOLS.md has no key and the user did not provide an image, prompt:
Two ways to change the avatar:
- Send an image directly: drop an image file or paste an image URL, I'll handle the rest
- Auto search: needs a free Freepik API Key
- Get one at https://www.freepik.com/developers/dashboard/api-key (free Freepik account required)
- Paste the key here and I'll save it for next time
Which do you prefer?
Read the current agent's IDENTITY.md and extract:
Ashley)openclaw agents set-identity, e.g. main, zhima)Agent id inference:
main agent → mainzhima agent → zhimaCombine IDENTITY.md info + the user's description, translated to English.
High-quality query templates (use these first):
avatar professional woman cartoonbusinesswoman portrait vector flatfemale character office flat designavatar young man cartoon portraitmale character professional flatPrefer avatar as the leading word; if zero hits, retry with portrait.
curl -s "https://api.freepik.com/v1/resources?locale=en&page=1&limit=10&order=relevance&term={QUERY}&filters%5Bcontent_type%5D%5Bvector%5D=1&filters%5Blicense%5D%5Bfree%5D=1" \
-H "x-freepik-api-key: {API_KEY}" \
-H "Accept: application/json"
From the returned data array pick 4 random items and record each:
id (resource id)titleimage.source.url (preview URL)If fewer than 4 returned, show them all.
Save the 4 previews to /tmp/avatar_candidate_{1-4}.jpg:
curl -sL -o /tmp/avatar_candidate_1.jpg "{url1}"
curl -sL -o /tmp/avatar_candidate_2.jpg "{url2}"
curl -sL -o /tmp/avatar_candidate_3.jpg "{url3}"
curl -sL -o /tmp/avatar_candidate_4.jpg "{url4}"
Then use the read tool to load each image one by one and display them
inline in the chat with numbered labels:
Here are 4 candidates, tell me which one you like (1/2/3/4), or say "none, search again" 🙂
Wait for the user reply.
User sends an image file: save to /tmp/avatar_input.jpg
User sends an image URL: curl -sL -o /tmp/avatar_input.jpg "{URL}"
Verify, then jump to step 5.
After the user chooses:
ls ~/.openclaw/workspace/avatars/ 2>/dev/null | grep -oE "^{AgentName}([0-9]+)\.(jpg|png)$" | grep -oE "[0-9]+" | sort -n | tail -1
Take the largest number + 1; new filename = {AgentName}{N}.jpg.
If avatars/ is empty or missing, start from 1.
mkdir -p ~/.openclaw/workspace/avatars
curl -sL -o ~/.openclaw/workspace/avatars/{FILENAME} "{CHOSEN_URL}"
Verify the download: file ~/.openclaw/workspace/avatars/{FILENAME} —
confirm JPEG or PNG.
openclaw agents set-identity --agent {AGENT_ID} --avatar "avatars/{FILENAME}"
Set the **Avatar:** field to the new path:
**Avatar:** avatars/{FILENAME}
Showing candidates:
Found 4 candidates 👇 tell me which one (1-4), or "none" to search again ~
On success:
✅ Avatar updated to Ashley22.jpg! Refresh to see your new look 🦋
TOOLS.md
(Freepik API Key: xxx) and tell the user "saved, will reuse next time"file to detect format; if it's
PNG, change the filename extension to .pngportrait prefix, or ask the user for
a simpler English descriptionIDENTITY.md or the
current runtime contextopenclaw agents set-identity and
expects the OpenClaw workspace layout (~/.openclaw/workspace/avatars/,
IDENTITY.md, TOOLS.md). Other agents (Claude Code / Codex / Cursor)
are not supported in v1.0