openclaw-whatsapp-gif
简介
openclaw-whatsapp-gif
原始描述
Source and send relevant reaction GIFs in WhatsApp chats using safe filters and deterministic ranking. Use when the user asks for a GIF/meme/reaction, or whe...
通过你的 Agent 添加
安装目录:openclaw-whatsapp-gif/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: openclaw-whatsapp-gif
description: Source and send relevant reaction GIFs in WhatsApp chats using safe filters and deterministic ranking. Use when the user asks for a GIF/meme/reaction, or when a short visual reaction is better than plain text for celebration, humor, acknowledgment, empathy, or agreement.
WhatsApp GIF
Source safe, context-matching GIFs and send exactly one high-quality result to WhatsApp.
Workflow
- Decide if GIF is appropriate.
- Build concise search query from user intent (2-5 words).
- Run
scripts/find_gif.py to fetch and rank candidates.
- Send top result with
message tool to WhatsApp (prefer local-file payload mode).
- If send fails, retry once with next candidate.
- If still failing or no results, send concise fallback text.
Decision rules
scripts/find_gif.py to fetch and rank candidates.message tool to WhatsApp (prefer local-file payload mode).Prefer GIF when:
- The user explicitly asks for GIF/meme/reaction.
- A brief emotional signal is enough.
- Tone benefits from a visual response.
Avoid GIF when:
- Topic is serious/sensitive (medical, legal, conflict, grief).
- Group context is formal or unclear.
- User asked for text-only response.
Script usage
Use these deterministic helpers:
python3 skills/openclaw-whatsapp-gif/scripts/find_gif.py "congrats celebration" --limit 5 --json
python3 skills/openclaw-whatsapp-gif/scripts/find_gif.py "great job" --limit 3 --json --target "+1234567890"
python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "great job celebration" --json
python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "great job celebration" --delivery-mode local --json
python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "great job celebration" --payload-only
Behavior:
- Reads
TENOR_API_KEYand/orGIPHY_API_KEY. - Applies safe filtering (
contentfilter=low/rating=g+ blocklist). - Uses retry + backoff for network fetches.
- Ranks by keyword overlap + lightweight preference.
- If no API keys or no provider results, first tries no-key Tenor web scraping, then built-in safe fallback catalog.
- Expands intent queries using common reaction aliases.
- Deduplicates repeated URLs across providers.
- Returns URL only (default) or candidate list (
--json). - With
--target, prints a ready-to-send WhatsAppmessagepayload in JSON. - With
send_gif.py --payload-only, prints only the final message payload for direct tool handoff. send_gif.pyvalidates media size/type, retries next candidates when a URL is bad, and writes telemetry logs (/tmp/openclaw-whatsapp-gif/send.log).- Runtime policy is configurable in
references/policy.json.
WhatsApp send pattern
Use message with:
action: "send"channel: "whatsapp"target: <chat id/recipient>media: <gif/mp4 url>caption: <optional short line>gifPlayback: true
If provider rejects .gif, retry using next candidate URL (prefer MP4).
Fallback
If no suitable GIF or delivery fails twice:
- Send concise text preserving intent.
- Do not keep retrying in a loop.
References
- Provider notes:
references/providers.md
- Execution checklist:
references/tasks.md
references/providers.mdreferences/tasks.md正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。