360 Secure SkillHub
360 安全技能中心

Giphy Multi

跨平台动图技能:根据关键词调用 Giphy 检索反应动图,按当前消息渠道(Telegram、WhatsApp、Discord、Signal 等)转换并输出 GIF 文件,交由宿主发送;支持 natural/on_request 两种使用模式、渠道自动发现、评分过滤与缓存清理,需配置 GIPHY_API_KEY。

chdlc
chdlc
热度 16.02
最近更新 2026-05-19 07:42:14
分类:创作依赖:代码执行 / 读写文件 / 第三方 API应用场景:社交媒体 / 图像生成 / API 集成 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add giphy-multi
Metadata
name
giphy-multi
description
Search and send reaction GIFs from Giphy on any messaging platform (Telegram, WhatsApp, Discord, Signal, etc). Auto-detects your enabled channels.
version
1.0.0
author
chdlc
license
MIT-0
metadata
{"openclaw":{"requires":{"bins":["python3","ffmpeg","curl"]},"primaryEnv":"GIPHY_API_KEY"}}

Giphy Multi — Cross-platform GIF skill

Search Giphy and send animated GIFs optimized for your current messaging channel.

Initial setup

1. Get a Giphy API Key https://developers.giphy.com → "Create an App" → API (free, 1,000 req/day)

2. Configure it

  • Via openclaw.json (recommended):
    { "skills": { "entries": { "giphy-multi": { "env": { "GIPHY_API_KEY": "your_key" } } } } }
    
  • Or in ~/.openclaw/.env:
    echo 'GIPHY_API_KEY=your_key' >> ~/.openclaw/.env
    

3. Verify everything is ready

python3 {baseDir}/scripts/giphy_multi.py --check

Daily workflow

  1. Detect channel from inbound metadata (channel field in session context).
  2. Verify config: if missing or current channel not listed, run: python3 {baseDir}/scripts/giphy_multi.py --discover
    • First time ever (no config): after --discover, briefly tell the user the skill is ready (one sentence).
    • New channel detected: --discover adds it silently. Casually mention it works here too if natural.
    • Missing API key: --check shows setup instructions; relay them to the user.
  3. Search and convert: python3 {baseDir}/scripts/giphy_multi.py "<query>" --channel <channel>
  4. Send the output file with message(action=send, media=<path>).
  5. Clean up: exec(rm <path>) after sending.

The --discover only runs once per new channel — after that, the channel stays in config and discovery is skipped.

Each search gets a unique timestamp, so concurrent channels, topics, or threads never collide. Orphan files >10 min are cleaned automatically.

Usage mode

The config's "mode" field controls when GIFs are sent:

  • natural (default) — spontaneous, like emoji reactions. The agent uses its judgment to send GIFs when the conversation flows.
  • on_request — only when the user explicitly asks ("send a gif of...", "reaction gif").

Change mode:

python3 {baseDir}/scripts/giphy_multi.py --mode natural
python3 {baseDir}/scripts/giphy_multi.py --mode on_request

The user can also say it in conversation: "stop sending GIFs without asking" → switches to on_request. "feel free to send GIFs naturally" → switches to natural.

Notes

  • Output is JSON with path to the file in .giphy_cache/.
  • Config is stored at <workspace>/giphy-multi-config.json (survives skill updates).
  • Rating defaults to g; override with --rating pg|pg-13|r.
  • Giphy free limit: 1,000 requests/day.
  • If the API key is missing, the script returns instructions in the help field.