← 返回 Skills 市场
yqxu

Leewow Custom Gifts

作者 yqxu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
82
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install custom-gifts-leewow
功能描述
Browse and create custom gifts — personalized bags, mugs, phone cases, apparel and more. Upload any image to generate an AI-powered product mockup. Includes...
使用说明 (SKILL.md)

Custom Gift — Leewow

Create personalized gifts and custom products powered by AI. This skill provides:

Tool Purpose
browse_templates Discover customizable product templates (bags, accessories, home decor, apparel, etc.)
generate_preview Upload a design image and trigger AI generation
get_status Check generation status and download preview image

When to Use

  • User wants to send a gift or create something personalized
  • User says "browse products", "show me what I can customize", "gift ideas"
  • User provides an image and wants to turn it into a product
  • User says "make this into a mug/bag/shirt", "customize this design"

CRITICAL: Images Must Be Sent via Media, NOT Markdown

Feishu / chat platforms cannot render ![image](local_path) markdown. To show images to the user you MUST send them as media attachments using whatever message/media mechanism your platform provides (e.g. the message tool with a media parameter on OpenClaw/Feishu).

Tool outputs include a localImagePath (workspace file) for every image. Use that path as the media attachment. Showing images is mandatory, not optional.

Generator Output Format (MUST FOLLOW)

This skill uses a two-step generator pattern.

Step 1: Browse — Show Templates

After calling browse_templates, the tool returns JSON with a list of templates. Each template has localImagePath (cover image downloaded to workspace).

For every template you MUST:

  1. Send the cover image as a media attachment using the localImagePath
  2. Include a text caption with: name, price, templateId

Example message flow:

[send image: /Users/.../.openclaw/workspace/template_images/template_3_xxx.jpg]
1. 男士卫衣 (Men's Hoodie) — 💰 $29.9 USD — 模板ID: 3

[send image: /Users/.../.openclaw/workspace/template_images/template_12_xxx.jpg]
2. 帆布手提袋 (Canvas Tote Bag) — 💰 $19.9 USD — 模板ID: 12

...

告诉我你想选哪个,我来帮你生成效果图!

Rules for Step 1:

  • MUST send each template's cover image as media — do NOT skip images
  • MUST include price and templateId in text
  • Images are at localImagePath in the JSON — already in workspace
  • If sending all images at once is supported, do that; otherwise send one by one

Step 2: Generation Complete — Show Preview + Purchase Link

After get_generation_status returns COMPLETED, the JSON contains:

  • localImagePath — preview image in workspace
  • purchaseUrl — signed purchase/order page link

You MUST:

  1. Send the preview image as a media attachment using localImagePath
  2. Send the purchase link in the text message

Example:

[send image: /Users/.../.openclaw/workspace/previews/leewow_preview_task_xxx.jpg]

你的定制效果图出来啦 🎉
🛒 点击下单购买: https://leewow.com/h5/preview?taskId=xxx&skid=...&sig=...

喜欢吗?如果想调整或者试试其他产品,告诉我!

Rules for Step 2:

  • MUST send the preview image as media — this is the whole point
  • MUST include the purchase link (it's pre-signed with skid/sig)
  • Do NOT just describe the product in text — the user needs to SEE the image

Common Mistakes to AVOID

❌ Using ![image](path) markdown — Feishu can't render local paths this way ❌ Just saying "完成啦!" and describing the product in text without sending the image ❌ Omitting the purchase/order link ❌ Sending a table/list instead of actual images ❌ Saying "图片已下载到本地" without actually sending the image to the user

Prerequisites

  • CLAW_SK — Leewow Secret Key (format: sk-leewow-{keyId}-{secret})
  • CLAW_BASE_URL — API base URL (default: https://leewow.com)
  • CLAW_PATH_PREFIX — Path prefix (default: /v2 for leewow.com)
  • LEEWOW_API_BASE — Base URL for COS STS credentials (default: https://leewow.com)
  • Python 3.10+ with requests and cos-python-sdk-v5

Configuration

Environment variables are loaded from ~/.openclaw/.env:

CLAW_SK=sk-leewow-xxxx-xxxx
CLAW_BASE_URL=https://leewow.com
CLAW_PATH_PREFIX=/v2
LEEWOW_API_BASE=https://leewow.com

Image Requirements (IMPORTANT)

For Input Images (User Upload)

  • Must be in workspace directory: ~/.openclaw/workspace/
  • Supported formats: JPG, PNG, WebP
  • Recommended: Clear, well-lit images for best results

For Preview Images (Generated Output)

  • Automatically saved to: ~/.openclaw/workspace/previews/
  • Filename format: leewow_preview_{taskId}.{ext}
  • The agent can directly display these images to users

COS Presigned URLs

For private COS buckets, you may need to generate presigned URLs for accessing images:

# Generate presigned URL for a COS image
python3 scripts/cos_presign.py "https://bucket.cos.region.myqcloud.com/key.png" --json

# With custom expiration (e.g., 1 hour = 3600 seconds)
python3 scripts/cos_presign.py "COS_URL" --expired 3600

# Use with get_status to get presigned preview URL
python3 scripts/get_status.py {taskId} --presign --json

Note: Most Leewow COS buckets are public, so presigned URLs are optional.

Typical Flow (Generator Pattern)

  1. Browse (Step 1) — Call browse_templates → get JSON with localImagePath for each template → send each cover image as media + text caption (name, price, ID) → ask user to pick
  2. Upload — User provides an image (must be in workspace ~/.openclaw/workspace/)
  3. Generate — Call generate_preview → get taskId → immediately proceed to step 4
  4. Poll — Call get_generation_status with poll=true → wait for COMPLETED
  5. Display (Step 2)Send preview image as media (localImagePath) + text with PURCHASE LINK (purchaseUrl)

Tool Reference

browse_templates

Browse available product templates.

python3 scripts/browse.py --count 3 --json

Options:

  • --category: Filter by category (bag, accessory, home, apparel)
  • --count: Number of results (1-5, default 3)
  • --json: Output JSON format (includes image URLs)

generate_preview

Upload image and trigger generation.

python3 scripts/generate.py --image-path ./workspace/my_design.png --template-id 3 --json

Options:

  • --image-path: Required. Path to design image (must be in workspace)
  • --template-id: Required. Product template ID from browse_templates
  • --design-theme: Optional style description
  • --aspect-ratio: Image ratio (3:4, 1:1, 4:3, default 3:4)
  • --json: Output JSON format

Returns: Task ID for status polling. Generation is async (~30-60s).

get_status

Check generation status and download preview image.

python3 scripts/get_status.py {taskId} --poll

Options:

  • task_id: Task ID from generate_preview
  • --poll: Wait until generation completes
  • --timeout: Poll timeout in seconds (default 120)
  • --no-download: Skip downloading preview image
  • --json: Output JSON format

Returns: Generation status and local image path (if completed).

Safety Rules

  • Never expose or log the CLAW_SK value. When confirming configuration, only show the last 4 characters.
  • Input images must be in workspace directory for the agent to access them
  • Preview images are automatically saved to workspace/previews/
  • Limit browse results to 20 templates maximum per request

Examples

User: "I want to make a custom gift for my friend"
→ browse_templates → for each template: send cover image as media + text caption
→ user picks → generate_preview → get_generation_status --poll
→ send preview image as media + purchaseUrl in text

User: "Turn this photo into a phone case"
→ browse_templates --category phone → send images as media → user picks
→ generate_preview → get_generation_status --poll
→ send preview image as media + purchaseUrl in text

User: "Show me what products I can customize"
→ browse_templates → send ALL template images as media with captions

Output Structure

browse_templates

[
  {
    "index": 1,
    "templateId": 3,
    "name": "Men's Hoodie",
    "price": "**$29.9 USD**",
    "localImagePath": "/Users/.../.openclaw/workspace/template_images/template_3_xxx.jpg",
    "remoteImageUrl": "https://...",
    "skuType": "hoodie"
  }
]

→ Agent sends localImagePath as media attachment + text caption per template.

generate_preview --json

{
  "taskId": "task_xxx",
  "status": "PENDING",
  "estimatedSeconds": 45,
  "templateId": 3,
  "_success": true
}

get_status --json (completed)

{
  "taskId": "task_xxx",
  "status": "COMPLETED",
  "purchaseUrl": "https://leewow.com/h5/preview?taskId=xxx&skid=...&sig=...",
  "localImagePath": "/Users/.../.openclaw/workspace/previews/leewow_preview_task_xxx.jpg"
}

→ Agent sends localImagePath as media attachment + purchaseUrl in text.

安全使用建议
Before installing, verify the following: - Metadata vs runtime: The registry entry lists no required env vars but the skill requires a CLAW_SK secret and reads ~/.openclaw/.env — confirm the author and trust the source before providing secrets. - CLAW_SK is powerful: the secret is used to HMAC-sign preview/purchase URLs. Only provide it if you trust the skill and the Leewow endpoints (defaults to https://leewow.com). Rotate the key if you later remove the skill. - Local file access: the scripts will read ~/.openclaw/.env and write images to ~/.openclaw/workspace and previews/. Inspect that .env to ensure it contains only intended keys and no unrelated secrets. - Network behavior: the skill uploads images to a COS bucket and fetches images from remote URLs. If you have data leakage concerns, do not upload sensitive images or run this skill in a restricted environment. - Dependencies: you must install the Python dependencies (requests and the Tencent COS SDK) securely; the package does not auto-install them. If you want higher assurance, ask the publisher to: (1) correct the registry metadata to declare CLAW_SK and other env vars; (2) provide a vetted homepage/source; (3) sign the code or host it on a known repository so you can review changes. If you cannot verify the publisher, treat the skill as untrusted and avoid supplying secrets or sensitive images.
功能分析
Type: OpenClaw Skill Name: custom-gifts-leewow Version: 1.0.1 The skill bundle provides tools for browsing and creating custom AI-generated gift mockups via the Leewow service. The scripts (browse.py, generate.py, get_status.py) implement standard API interactions, including HMAC-SHA256 signing for authentication and secure file uploads to Tencent Cloud Object Storage (COS) using temporary STS credentials. Notably, generate.py includes a security check to ensure uploaded images are restricted to the designated workspace directory (~/.openclaw/workspace), and SKILL.md contains explicit instructions for the agent to protect the secret key (CLAW_SK).
能力评估
Purpose & Capability
The skill implements browse/generate/status flows and requires a Leewow secret (CLAW_SK) to sign requests and preview/purchase URLs — that is coherent with a storefront/generation integration. However, the registry metadata lists no required env vars while SKILL.md and the scripts clearly require CLAW_SK and optional base-URL variables. This metadata/instruction mismatch is an incoherence that should be corrected.
Instruction Scope
SKILL.md and the scripts confine actions to the described product flows: calling Leewow APIs, uploading images to COS, downloading template/preview images into ~/.openclaw/workspace, and instructing the agent to send images as media. The scripts do automatically read ~/.openclaw/.env for config and write image files into the workspace — expected for this skill but worth noting because it accesses a user config file and writes files to disk.
Install Mechanism
No install spec (instruction-only skill) — the runtime uses included Python scripts and standard HTTP/SDK libraries. No remote archive downloads or unusual install sources are used. The user will need Python dependencies (requests, qcloud_cos/cos SDK) which are documented but not automatically installed.
Credentials
The scripts require CLAW_SK and optional CLAW_BASE_URL/LEEWOW_API_BASE variables; requesting a single Leewow API secret is proportionate to signing requests. The concern is that the registry metadata did not declare these required env vars while runtime will silently load ~/.openclaw/.env — this reads a local file that may contain other secrets and could unexpectedly pick up credentials. Also, CLAW_SK is used to HMAC-sign preview/purchase URLs: ensure you only provide a secret to trusted code.
Persistence & Privilege
The skill does not request permanent platform-level privileges (always:false) and does not modify other skills or system-wide configs. It writes image files to ~/.openclaw/workspace and previews/ (expected behavior) but does not appear to persist beyond that or require elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install custom-gifts-leewow
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /custom-gifts-leewow 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release - AI-powered custom gift preview
元数据
Slug custom-gifts-leewow
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Leewow Custom Gifts 是什么?

Browse and create custom gifts — personalized bags, mugs, phone cases, apparel and more. Upload any image to generate an AI-powered product mockup. Includes... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。

如何安装 Leewow Custom Gifts?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install custom-gifts-leewow」即可一键安装,无需额外配置。

Leewow Custom Gifts 是免费的吗?

是的,Leewow Custom Gifts 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Leewow Custom Gifts 支持哪些平台?

Leewow Custom Gifts 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Leewow Custom Gifts?

由 yqxu(@yqxu)开发并维护,当前版本 v1.0.1。

💬 留言讨论