Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

suhesuhe 图像

Agent Skill

suhe 用于处理图像、截图、视觉识别或图片素材相关工作,适合在 OpenClaw 中需要让 Agent 分析图片、整理视觉素材或辅助图像流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,421

周安装

104

GitHub Stars

公开资料未说明

下载量

849
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:suhe(suhe 图像)
来源仓库:https://github.com/lilozhao/suhe
安装命令:
openclaw skills install suhe
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install suhe

简介

使用通义万相编辑suhe的参考图像,并通过OpenClaw将自拍照发送到消息通道

SKILL.md

name
suhe-selfie
description
Edit suhe's reference image with Tongyi Wanxiang (通义万相) and send selfies to messaging channels via OpenClaw
allowed-tools
Bash(npm:*) Bash(npx:*) Bash(openclaw:*) Bash(curl:*) Read Write WebFetch

suhe Selfie

Edit a fixed reference image using Alibaba's Tongyi Wanxiang model and distribute it across messaging platforms (WhatsApp, Telegram, Discord, Slack, etc.) via OpenClaw.

Reference Image

The skill uses a fixed reference image hosted on jsDelivr CDN:

http://pic.lilozkzy.top/reference/suhe-portrait.png

When to Use

  • User says "send a pic", "send me a pic", "send a photo", "send a selfie"
  • User says "send a pic of you...", "send a selfie of you..."
  • User asks "what are you doing?", "how are you doing?", "where are you?"
  • User describes a context: "send a pic wearing...", "send a pic at..."
  • User wants suhe to appear in a specific outfit, location, or situation

Quick Reference

Required Environment Variables

DASHSCOPE_API_KEY=your_dashscope_key  # Get from https://dashscope.console.aliyun.com/
OPENCLAW_GATEWAY_TOKEN=your_token     # From: openclaw doctor --generate-gateway-token

Workflow

  1. Get user prompt for how to edit the image
  2. Edit image via DashScope Tongyi Wanxiang API with fixed reference
  3. Extract image URL from response
  4. Send to OpenClaw with target channel(s)

Step-by-Step Instructions

Step 1: Collect User Input

Ask the user for:

  • User context: What should the person in the image be doing/wearing/where?
  • Mode (optional): mirror or direct selfie style
  • Target channel(s): Where should it be sent? (e.g., #general, @username, channel ID)
  • Platform (optional): Which platform? (discord, telegram, whatsapp, slack)

Prompt Modes

Mode 1: Mirror Selfie (default)

Best for: outfit showcases, full-body shots, fashion content

make a pic of this person, but [user's context]. the person is taking a mirror selfie

Example (with Chinese cultural context): "wearing a traditional qipao" →

make a pic of this person, but wearing a traditional qipao. the person is taking a mirror selfie

Example: "wearing a santa hat" →

make a pic of this person, but wearing a santa hat. the person is taking a mirror selfie

Mode 2: Direct Selfie

Best for: close-up portraits, location shots, emotional expressions

a close-up selfie taken by herself at [user's context], direct eye contact with the camera, looking straight into the lens, eyes centered and clearly visible, not a mirror selfie, phone held at arm's length, face fully visible

Example: "a cozy cafe with warm lighting" →

a close-up selfie taken by herself at a cozy cafe with warm lighting, direct eye contact with the camera, looking straight into the lens, eyes centered and clearly visible, not a mirror selfie, phone held at arm's length, face fully visible

Mode Selection Logic

Keywords in RequestAuto-Select Mode
outfit, wearing, clothes, dress, suit, fashionmirror
cafe, restaurant, beach, park, city, locationdirect
close-up, portrait, face, eyes, smiledirect
full-body, mirror, reflectionmirror

Step 2: Edit Image with Tongyi Wanxiang

Use the DashScope API to edit the reference image:

REFERENCE_IMAGE="https://pic.lilozkzy.top/reference/suhe-portrait.png"

# Mode 1: Mirror Selfie
PROMPT="make a pic of this person, but <USER_CONTEXT>. the person is taking a mirror selfie"

# Mode 2: Direct Selfie
PROMPT="a close-up selfie taken by herself at <USER_CONTEXT>, direct eye contact with the camera, looking straight into the lens, eyes centered and clearly visible, not a mirror selfie, phone held at arm's length, face fully visible"

# Build JSON payload for Tongyi Wanxiang Edit
JSON_PAYLOAD=$(jq -n \
  --arg prompt "$PROMPT" \
  --arg ref_url "$REFERENCE_IMAGE" \
  '{
    model: "wanx-v1-edit",
    input: {
      prompt: $prompt,
      reference_image_url: $ref_url
    },
    parameters: {
      n: 1,
      size: "1024*1024"
    }
  }')

curl -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$JSON_PAYLOAD"

Response Format:

{
  "output": {
    "results": [
      {
        "url": "https://dashscope-result.oss-cn-shanghai.aliyuncs.com/..."
      }
    ]
  },
  "usage": {
    "image_count": 1
  },
  "request_id": "..."
}

Step 3: Send Image via OpenClaw

Use the OpenClaw messaging API to send the edited image:

openclaw message send \
  --action send \
  --channel "<TARGET_CHANNEL>" \
  --message "<CAPTION_TEXT>" \
  --media "<IMAGE_URL>"

Alternative: Direct API call

curl -X POST "http://localhost:18789/message" \
  -H "Authorization: Bearer $OPENCLAW_GATEWAY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "send",
    "channel": "<TARGET_CHANNEL>",
    "message": "<CAPTION_TEXT>",
    "media": "<IMAGE_URL>"
  }'

Complete Script Example

#!/bin/bash
# tongyi-wanxiang-edit-send.sh

# Check required environment variables
if [ -z "$DASHSCOPE_API_KEY" ]; then
  echo "Error: DASHSCOPE_API_KEY environment variable not set"
  exit 1
fi

# Fixed reference image
REFERENCE_IMAGE="https://pic.lilozkzy.top/reference/suhe-portrait.png"

USER_CONTEXT="$1"
CHANNEL="$2"
MODE="${3:-auto}"  # mirror, direct, or auto
CAPTION="${4:-Edited with Grok Imagine}"

if [ -z "$USER_CONTEXT" ] || [ -z "$CHANNEL" ]; then
  echo "Usage: $0 <user_context> <channel> [mode] [caption]"
  echo "Modes: mirror, direct, auto (default)"
  echo "Example: $0 'wearing a cowboy hat' '#general' mirror"
  echo "Example: $0 'a cozy cafe' '#general' direct"
  exit 1
fi

# Auto-detect mode based on keywords
if [ "$MODE" == "auto" ]; then
  if echo "$USER_CONTEXT" | grep -qiE "outfit|wearing|clothes|dress|suit|fashion|full-body|mirror"; then
    MODE="mirror"
  elif echo "$USER_CONTEXT" | grep -qiE "cafe|restaurant|beach|park|city|close-up|portrait|face|eyes|smile"; then
    MODE="direct"
  else
    MODE="mirror"  # default
  fi
  echo "Auto-detected mode: $MODE"
fi

# Construct the prompt based on mode
if [ "$MODE" == "direct" ]; then
  EDIT_PROMPT="a close-up selfie taken by herself at $USER_CONTEXT, direct eye contact with the camera, looking straight into the lens, eyes centered and clearly visible, not a mirror selfie, phone held at arm's length, face fully visible"
else
  EDIT_PROMPT="make a pic of this person, but $USER_CONTEXT. the person is taking a mirror selfie"
fi

echo "Mode: $MODE"
echo "Editing reference image with prompt: $EDIT_PROMPT"

# Edit image using Tongyi Wanxiang Edit API
JSON_PAYLOAD=$(jq -n \
  --arg prompt "$EDIT_PROMPT" \
  --arg ref_url "$REFERENCE_IMAGE" \
  '{
    model: "wanx-v1-edit",
    input: {
      prompt: $prompt,
      reference_image_url: $ref_url
    },
    parameters: {
      n: 1,
      size: "1024*1024"
    }
  }')

RESPONSE=$(curl -s -X POST "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$JSON_PAYLOAD")

# Extract image URL
IMAGE_URL=$(echo "$RESPONSE" | jq -r '.output.results[0].url')

if [ "$IMAGE_URL" == "null" ] || [ -z "$IMAGE_URL" ]; then
  echo "Error: Failed to edit image"
  echo "Response: $RESPONSE"
  exit 1
fi

echo "Image edited: $IMAGE_URL"
echo "Sending to channel: $CHANNEL"

# Send via OpenClaw
openclaw message send \
  --action send \
  --channel "$CHANNEL" \
  --message "$CAPTION" \
  --media "$IMAGE_URL"

echo "Done!"

Node.js/TypeScript Implementation

import { fal } from "@fal-ai/client";
import { exec } from "child_process";
import { promisify } from "util";

const execAsync = promisify(exec);

const REFERENCE_IMAGE = "https://pic.lilozkzy.top/reference/suhe-portrait.png";

interface GrokImagineResult {
  images: Array<{
    url: string;
    content_type: string;
    width: number;
    height: number;
  }>;
  revised_prompt?: string;
}

type SelfieMode = "mirror" | "direct" | "auto";

function detectMode(userContext: string): "mirror" | "direct" {
  const mirrorKeywords = /outfit|wearing|clothes|dress|suit|fashion|full-body|mirror/i;
  const directKeywords = /cafe|restaurant|beach|park|city|close-up|portrait|face|eyes|smile/i;

  if (directKeywords.test(userContext)) return "direct";
  if (mirrorKeywords.test(userContext)) return "mirror";
  return "mirror"; // default
}

function buildPrompt(userContext: string, mode: "mirror" | "direct"): string {
  if (mode === "direct") {
    return `a close-up selfie taken by herself at ${userContext}, direct eye contact with the camera, looking straight into the lens, eyes centered and clearly visible, not a mirror selfie, phone held at arm's length, face fully visible`;
  }
  return `make a pic of this person, but ${userContext}. the person is taking a mirror selfie`;
}

async function editAndSend(
  userContext: string,
  channel: string,
  mode: SelfieMode = "auto",
  caption?: string
): Promise<string> {
  // Configure fal.ai client
  fal.config({
    credentials: process.env.FAL_KEY!
  });

  // Determine mode
  const actualMode = mode === "auto" ? detectMode(userContext) : mode;
  console.log(`Mode: ${actualMode}`);

  // Construct the prompt
  const editPrompt = buildPrompt(userContext, actualMode);

  // Edit reference image with Grok Imagine
  console.log(`Editing image: "${editPrompt}"`);

  const result = await fal.subscribe("xai/grok-imagine-image/edit", {
    input: {
      image_url: REFERENCE_IMAGE,
      prompt: editPrompt,
      num_images: 1,
      output_format: "jpeg"
    }
  }) as { data: GrokImagineResult };

  const imageUrl = result.data.images[0].url;
  console.log(`Edited image URL: ${imageUrl}`);

  // Send via OpenClaw
  const messageCaption = caption || `Edited with Grok Imagine`;

  await execAsync(
    `openclaw message send --action send --channel "${channel}" --message "${messageCaption}" --media "${imageUrl}"`
  );

  console.log(`Sent to ${channel}`);
  return imageUrl;
}

// Usage Examples

// Mirror mode (auto-detected from "wearing")
editAndSend(
  "wearing a cyberpunk outfit with neon lights",
  "#art-gallery",
  "auto",
  "Check out this AI-edited art!"
);
// → Mode: mirror
// → Prompt: "make a pic of this person, but wearing a cyberpunk outfit with neon lights. the person is taking a mirror selfie"

// Direct mode (auto-detected from "cafe")
editAndSend(
  "a cozy cafe with warm lighting",
  "#photography",
  "auto"
);
// → Mode: direct
// → Prompt: "a close-up selfie taken by herself at a cozy cafe with warm lighting, direct eye contact..."

// Explicit mode override
editAndSend("casual street style", "#fashion", "direct");

Supported Platforms

OpenClaw supports sending to:

PlatformChannel FormatExample
Discord#channel-name or channel ID#general, 123456789
Telegram@username or chat ID@mychannel, -100123456
WhatsAppPhone number (JID format)1234567890@s.whatsapp.net
Slack#channel-name#random
SignalPhone number+1234567890
MS TeamsChannel reference(varies)

Tongyi Wanxiang Edit Parameters

ParameterTypeDefaultDescription
modelstring"wanx-v1-edit"Model to use: "wanx-v1" (generate) or "wanx-v1-edit" (edit)
input.promptstringrequiredEdit instruction
input.reference_image_urlstringoptionalURL of reference image for editing
parameters.n1-41Number of images to generate
parameters.sizestring"1024*1024"Image size format: "width*height"

Setup Requirements

1. Get DashScope API Key

Visit https://dashscope.console.aliyun.com/ to create your API key.

2. Configure Environment Variables

export DASHSCOPE_API_KEY=your_api_key_here

2. Install OpenClaw CLI

npm install -g openclaw

3. Configure OpenClaw Gateway

openclaw config set gateway.mode=local
openclaw doctor --generate-gateway-token

4. Start OpenClaw Gateway

openclaw gateway start

Error Handling

  • DASHSCOPE_API_KEY missing: Ensure the API key is set in environment
  • Image edit failed: Check prompt content and API quota at DashScope Console
  • OpenClaw send failed: Verify gateway is running and channel exists
  • Rate limits: DashScope has rate limits; implement retry logic if needed

Pricing Information

Tongyi Wanxiang offers:

Tips

  1. Mirror mode context examples (outfit focus):

- "wearing a traditional qipao with golden embroidery" - "in a hanfu with flowing sleeves" - "wearing a modern cheongsam" - "in traditional Chinese dress"

  1. Direct mode context examples (location/portrait focus):

- "a traditional tea house in Hangzhou" - "West Lake in spring with cherry blossoms" - "a quiet bamboo garden" - "an ancient Chinese temple"

  1. Mode selection: Let auto-detect work, or explicitly specify for control
  2. Batch sending: Edit once, send to multiple channels
  3. Scheduling: Combine with OpenClaw scheduler for automated posts

Chinese Cultural Context

For best results with Tongyi Wanxiang, consider using prompts with:

  • Traditional clothing keywords: qipao (旗袍), hanfu (汉服), cheongsam
  • Cultural settings: tea house (茶馆), garden (园林), temple (寺庙), West Lake (西湖)
  • Traditional elements: lantern (灯笼), fan (扇子), brush pen (毛笔), guqin (古琴)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.89%
按下载量换算840

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills