← Back to Skills Marketplace
honestqiao

Clawra Selfie (MiniMax)

by HonestQiao · GitHub ↗ · v1.2.0
cross-platform ⚠ suspicious
713
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install clawra-selfie-minimax
Description
Generate AI images using MiniMax or fal.ai (Grok Imagine) and send to messaging channels via OpenClaw
README (SKILL.md)

Clawra Selfie

Generate AI images using either MiniMax or xAI's Grok Imagine model and distribute them across messaging platforms (WhatsApp, Telegram, Discord, Slack, etc.) via OpenClaw.

💡 Tip: The enhanced script automatically detects which API key is available (MiniMax takes priority by default).

Reference Image

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

https://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.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 Clawra to appear in a specific outfit, location, or situation

Quick Reference

Required Environment Variables

Option 1: fal.ai (Grok Imagine)

FAL_KEY=your_fal_api_key          # Get from https://fal.ai/dashboard/keys

Option 2: MiniMax (Recommended - usually faster/more reliable)

MINIMAX_API_KEY=your_minimax_api_key  # Get from https://platform.minimaxi.com

Common:

OPENCLAW_GATEWAY_TOKEN=your_token  # From: openclaw doctor --generate-gateway-token

⚠️ Security Note: Never hardcode API keys in scripts. Use environment variables.

Workflow

  1. Get user prompt for how to edit the image
  2. Edit image via fal.ai Grok Imagine Edit 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: "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 Request Auto-Select Mode
outfit, wearing, clothes, dress, suit, fashion mirror
cafe, restaurant, beach, park, city, location direct
close-up, portrait, face, eyes, smile direct
full-body, mirror, reflection mirror

Step 2: Generate Image

You have two options for image generation:

Option A: MiniMax API (Recommended)

# Set API key
export MINIMAX_API_KEY="your_minimax_api_key"

# Call the enhanced script
/home/honestqiao/.openclaw/workspace/skills/clawra-selfie/scripts/clawra-selfie-enhanced.sh \
  "A girl wearing a red dress, smiling, at a beach sunset" \
  "telegram" \
  "Beach vibes! 🌊" \
  "minimax"

MiniMax API Details:

  • Endpoint: https://api.minimaxi.com/v1/image_generation
  • Model: image-01
  • Response: Base64 encoded image
  • Aspect ratios supported: 1:1, 3:4, 4:3, 9:16, 16:9, 21:9

Option B: fal.ai (Grok Imagine)

REFERENCE_IMAGE="https://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.png"

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

# Mode 2: Direct Selfie
PROMPT="a close-up selfie taken by herself at \x3CUSER_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 with jq (handles escaping properly)
JSON_PAYLOAD=$(jq -n \
  --arg image_url "$REFERENCE_IMAGE" \
  --arg prompt "$PROMPT" \
  '{image_url: $image_url, prompt: $prompt, num_images: 1, output_format: "jpeg"}')

curl -X POST "https://fal.run/xai/grok-imagine-image/edit" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d "$JSON_PAYLOAD"

Response Format:

{
  "images": [
    {
      "url": "https://v3b.fal.media/files/...",
      "content_type": "image/jpeg",
      "width": 1024,
      "height": 1024
    }
  ],
  "revised_prompt": "Enhanced prompt text..."
}

Step 3: Send Image via OpenClaw

Use the OpenClaw messaging API to send the edited image:

openclaw message send \
  --action send \
  --channel "\x3CTARGET_CHANNEL>" \
  --message "\x3CCAPTION_TEXT>" \
  --media "\x3CIMAGE_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": "\x3CTARGET_CHANNEL>",
    "message": "\x3CCAPTION_TEXT>",
    "media": "\x3CIMAGE_URL>"
  }'

Complete Script Example

#!/bin/bash
# grok-imagine-edit-send.sh

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

# Fixed reference image
REFERENCE_IMAGE="https://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.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 \x3Cuser_context> \x3Cchannel> [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 jq for proper JSON escaping)
JSON_PAYLOAD=$(jq -n \
  --arg image_url "$REFERENCE_IMAGE" \
  --arg prompt "$EDIT_PROMPT" \
  '{image_url: $image_url, prompt: $prompt, num_images: 1, output_format: "jpeg"}')

RESPONSE=$(curl -s -X POST "https://fal.run/xai/grok-imagine-image/edit" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d "$JSON_PAYLOAD")

# Extract image URL
IMAGE_URL=$(echo "$RESPONSE" | jq -r '.images[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://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.png";

interface GrokImagineResult {
  images: Array\x3C{
    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\x3Cstring> {
  // 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:

Platform Channel Format Example
Discord #channel-name or channel ID #general, 123456789
Telegram @username or chat ID @mychannel, -100123456
WhatsApp Phone number (JID format) [email protected]
Slack #channel-name #random
Signal Phone number +1234567890
MS Teams Channel reference (varies)

Grok Imagine Edit Parameters

Parameter Type Default Description
image_url string required URL of image to edit (fixed in this skill)
prompt string required Edit instruction
num_images 1-4 1 Number of images to generate
output_format enum "jpeg" jpeg, png, webp

Setup Requirements

1. Install fal.ai client (for Node.js usage)

npm install @fal-ai/client

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

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

Tips

  1. Mirror mode context examples (outfit focus):

    • "wearing a santa hat"
    • "in a business suit"
    • "wearing a summer dress"
    • "in streetwear fashion"
  2. Direct mode context examples (location/portrait focus):

    • "a cozy cafe with warm lighting"
    • "a sunny beach at sunset"
    • "a busy city street at night"
    • "a peaceful park in autumn"
  3. Mode selection: Let auto-detect work, or explicitly specify for control

  4. Batch sending: Edit once, send to multiple channels

  5. Scheduling: Combine with OpenClaw scheduler for automated posts

Usage Guidance
This skill appears to implement its stated feature, but take these precautions before installing or running it: - Verify the source: the package lists a GitHub repo but the 'Source' and 'Homepage' fields are unknown/empty. Prefer installing from a trusted repo or inspect the package contents first. - Inspect files yourself: the installer (bin/cli.js) will copy files into ~/.openclaw, update openclaw.json, write IDENTITY.md, and inject persona text into SOUL.md. If you accept those changes, review openclaw.json and SOUL.md afterward. - Protect API keys: the installer prompts for FAL_KEY and will write it into openclaw.json (persisting the secret). Instead, consider setting FAL_KEY / MINIMAX_API_KEY and OPENCLAW_GATEWAY_TOKEN as environment variables in a secure way and avoid storing long-lived keys in plaintext config files. - Principle of least privilege: if possible, use an API key with minimal scope/quotas for this skill and rotate keys regularly. - Run in a sandbox first: if you want to be safe, install into a separate OpenClaw profile or test environment to observe what files change and how the agent behavior is modified. - If you need metadata accuracy, ask the publisher to update registry metadata to declare required env vars and to document exactly what the installer modifies. Given the mismatch between declared metadata and actual requirements plus the installer modifying agent identity/config files and persisting keys, proceed only after manual review and limiting credential exposure.
Capability Analysis
Type: OpenClaw Skill Name: clawra-selfie-minimax Version: 1.2.0 The skill contains multiple critical shell injection vulnerabilities across `scripts/clawra-selfie-enhanced.sh`, `scripts/clawra-selfie.sh`, and `scripts/clawra-selfie.ts`. User-controlled inputs for image prompts, target channels, and message captions are directly interpolated into shell commands (e.g., `openclaw message send`, `curl`) without proper escaping. This allows for arbitrary command execution on the host system if a malicious user provides specially crafted input. While the skill's stated purpose is benign (image generation and sending), these vulnerabilities could be exploited for unauthorized actions, data exfiltration, or system compromise. The `SKILL.md` also requests broad `Bash(npm:*)` and `Bash(npx:*)` permissions, which could exacerbate the impact of these vulnerabilities.
Capability Assessment
Purpose & Capability
Name/description match the implementation: scripts call MiniMax or fal.ai to generate images and then send them via OpenClaw. However the registry metadata claims no required environment variables while SKILL.md and the scripts clearly require FAL_KEY or MINIMAX_API_KEY and (optionally) OPENCLAW_GATEWAY_TOKEN. The CLI/installer also expects the OpenClaw CLI and jq/curl — these are reasonable for the stated purpose, but the metadata omission is an incoherence that could mislead users about required secrets.
Instruction Scope
Runtime instructions stay within the stated purpose (generate/edit an image and send it). But the included installer (bin/cli.js) and skill files perform additional actions beyond sending images: they write files into ~/.openclaw (install skill files), inject persona text into SOUL.md, create IDENTITY.md, and update openclaw.json to enable the skill and populate env fields. These file writes and persona injections change agent identity/behavior and are not obvious from the short description — a scope-expansion worth flagging.
Install Mechanism
There is no external 'download and execute arbitrary archive' install URL — the package is distributed as an npm-style package (has bin/cli.js and scripts). The installer copies files into ~/.openclaw and modifies local OpenClaw config. The skill references a reference image on jsDelivr (a common CDN). No obviously malicious external download hosts or URL shorteners are used, but the npx/installer flow will write to disk and change local agent files.
Credentials
The package requires credentials that are proportional to its function (FAL_KEY or MINIMAX_API_KEY for image generation, OPENCLAW_GATEWAY_TOKEN for sending). However those required env vars are not declared in the registry metadata (metadata lists none) — an important inconsistency. Additionally, the installer will write the provided FAL_KEY into openclaw.json (apiKey/env fields) which persists the secret to disk; storing API keys in a config file may increase exposure risk and the installer does this by default.
Persistence & Privilege
The skill does not request 'always: true', but the installer grants persistent presence by enabling the skill in openclaw.json, copying the skill into ~/.openclaw/skills, injecting persona text into SOUL.md, and writing IDENTITY.md. Those changes persist across agent runs and alter agent behavior and identity—reasonable for a feature add, but high-impact and should be made explicit to users and reviewed before installation.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clawra-selfie-minimax
  3. After installation, invoke the skill by name or use /clawra-selfie-minimax
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
Clawra Selfie 1.2.0 - Adds support for both MiniMax and fal.ai (Grok Imagine) AI image generation models, with auto-detection of available API keys (MiniMax prioritized by default) - Introduces dynamic prompt modes: "mirror selfie" for outfit/fashion and "direct selfie" for portraits or locations, with auto-selection based on user intent - Provides detailed, step-by-step guidance on required environment variables, input handling, and sending images to multiple platforms via OpenClaw - Includes sample scripts and usage examples, plus best practices for API key security - Expands quick-reference tables and usage scenarios for improved usability
Metadata
Slug clawra-selfie-minimax
Version 1.2.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Clawra Selfie (MiniMax)?

Generate AI images using MiniMax or fal.ai (Grok Imagine) and send to messaging channels via OpenClaw. It is an AI Agent Skill for Claude Code / OpenClaw, with 713 downloads so far.

How do I install Clawra Selfie (MiniMax)?

Run "/install clawra-selfie-minimax" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Clawra Selfie (MiniMax) free?

Yes, Clawra Selfie (MiniMax) is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Clawra Selfie (MiniMax) support?

Clawra Selfie (MiniMax) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Clawra Selfie (MiniMax)?

It is built and maintained by HonestQiao (@honestqiao); the current version is v1.2.0.

💬 Comments