Mj Gallery

v1.0.0

MXAI MJ 图片生成 + 自动画廊展示技能。提交 MJ 文生图请求后,自动下载图片到本地、归档到画廊文件夹、部署网页并返回可访问链接。触发词:用MJ画、生成MJ图片、MJ文生图、MJ画廊

0· 102·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for tianheihei002/mj-gallery.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Mj Gallery" (tianheihei002/mj-gallery) from ClawHub.
Skill page: https://clawhub.ai/tianheihei002/mj-gallery
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: MX_AI_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install mj-gallery

ClawHub CLI

Package manager switcher

npx clawhub@latest install mj-gallery
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The skill asks only for MX_AI_API_KEY, which aligns with an image-generation service. It also requires writing files under /workspace and deploying a static site — these are coherent with the gallery purpose. Minor mismatch: the SKILL.md assumes a 'deploy' tool and a specific host pattern (https://{id}.space.minimaxi.com) but does not declare that tool or any additional credentials; verify that the agent runtime provides such a deploy capability.
Instruction Scope
Instructions are concrete and stay within the stated task: submit generation requests, poll status, download images to /workspace/mj_output, copy to /workspace/mj_gallery, update index.html, and deploy. The skill explicitly requires downloading files locally and deploying them publicly, which is expected for a gallery. It does not instruct reading unrelated system files or extra environment variables.
Install Mechanism
There is no install spec (instruction-only), so nothing is downloaded or written to disk by an installer. This minimizes install-time risk.
Credentials
Only MX_AI_API_KEY is required and declared as the primary credential — reasonable and proportional for an image-generation integration. No unrelated secrets or config paths are requested.
Persistence & Privilege
always is false and the skill does not request elevated or always-on privileges. It writes only to its workspace paths and deploys its own gallery. It does not modify other skills or system-wide configuration.
Assessment
This skill appears to do what it says: it will use your MX_AI_API_KEY to call the MJ image API, download generated images into the agent's workspace (/workspace/mj_output and /workspace/mj_gallery), update an index.html, and invoke a 'deploy' step that publishes the gallery to a public URL. Before installing, confirm: (1) you are comfortable that generated images (and any user-supplied reference images) will be publicly hosted; (2) the agent runtime actually provides the 'deploy' tool or equivalent and you understand where files are uploaded (the skill expects https://{id}.space.minimaxi.com); (3) the MX_AI_API_KEY has only the permissions you expect and can be revoked if needed. If you need stronger privacy, avoid deploying to a public host or sanitize/remove images before deployment. If you want higher assurance about what gets uploaded, request details from the skill author about the deploy implementation or test in an isolated environment first.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🎨 Clawdis
EnvMX_AI_API_KEY
Primary envMX_AI_API_KEY
latestvk97185ge4feqmhwz43r0bfrrqn855jr0
102downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

🎨 mj-gallery:MJ 图片生成 + 画廊展示技能

自动完成 MJ 图片生成的完整闭环:提交 → 轮询 → 下载 → 归档 → 部署 → 返回画廊链接


⛔ 强制规则

  1. 不得跳过轮询:提交后必须轮询到 status=2(完成)或 status=3(失败),禁止假设完成
  2. 图片必须下载到本地/workspace/mj_output/{serial}.webp,不得直接返回 CDN URL(含 auth_key 参数,渲染会异常)
  3. 必须归档到画廊:下载后同时复制到 /workspace/mj_gallery/,更新画廊 index.html
  4. 必须部署画廊:使用 deploy 工具部署 /workspace/mj_gallery/,返回可公开访问的网页链接
  5. 不得伪造结果:serial_no、image_urls、deployed_url 均必须来自真实 API 响应
  6. prompt 限制 100 字:MJ draw prompt 不能超过 100 个中文字符,超出时自动精简但不改变核心语义
  7. Prompt 仅用英文:MJ prompt 统一使用英文,中文 prompt 由技能内部翻译后提交

🔧 核心工作流

用户: "用MJ画一只凤凰"
  ↓
Step 1: 参数判断(自动)
  - model: 默认 MJ 6.1(MJ 7.0 暂不可用,勿传 model 参数)
  - aspect_ratio: 根据用户需求判断(竖版 9:16 / 横版 16:9 / 方形 1:1)
  - speed: 默认 fast
  - iw: 有参考图时 1.2~1.5,无参考图时省略
  ↓
Step 2: 提交 mj_draw
  - prompt 英文限 100 字
  - 告知用户:任务提交中,预计 30s~3min
  ↓
Step 3: 轮询 get_task_status
  - 间隔 5 秒一次
  - 超过 60 秒仍在生成中:告知用户耐心等待,继续轮询
  - 超过 5 分钟:告知用户生成时间较长,询问是否继续等待
  ↓
Step 4: 下载图片
  - 目录准备: /workspace/mj_output/ 和 /workspace/mj_gallery/
  - 下载到: /workspace/mj_output/{serial}.webp
  - 复制到: /workspace/mj_gallery/{serial}.webp
  ↓
Step 5: 更新画廊 index.html
  - 生成新条目加入画廊(最新在前)
  - 最多保留最近 20 条记录
  ↓
Step 6: 部署画廊
  - deploy /workspace/mj_gallery → https://{id}.space.minimaxi.com
  ↓
Step 7: 返回结果
  - 展示本地图片路径: /workspace/mj_output/{serial}.webp
  - 附上画廊链接: https://{id}.space.minimaxi.com

📐 参数决策规则

aspect_ratio 速查

用户需求aspect_ratio
横版、宽屏、Panorama16:9
竖版、头像、Porttrait9:16
方形、Square1:1
海报、Portrait Large3:4
电影感、Cinematic2:3
未指定(默认)16:9

speed 速查

速度积分适用场景
draft(仅MJ7.0)2积分草稿预览,MJ7.0不支持stylize
fast4积分默认,日常使用
turbo(仅MJ7.0)8积分极速,MJ7.0不支持stylize
未指定fast

注意:MJ 7.0 暂不可用,speed 参数不传,使用默认值 fast

iw 参考图权重速查

参考强度iw 值场景
弱参考0.5~0.8风格参考、色彩参考
中等参考1.0~1.25构图+风格参考(默认)
强参考1.5~2.0角色一致性、精确参考

🖼️ 画廊 HTML 模板

画廊路径:/workspace/mj_gallery/index.html

每条记录结构:

<div class="card">
  <a href="{serial}.webp" target="_blank">
    <img src="{serial}.webp" alt="{prompt摘要}">
  </a>
  <div class="info">
    <p class="prompt">{prompt中文摘要}</p>
    <p class="meta">任务: {serial} · MJ 6.1 · {aspect_ratio} · {时间}</p>
  </div>
</div>

画廊样式要求:深色主题(#0a0a0f背景),图片全宽,圆角,阴影,简洁无冗余元素。


🚨 错误处理

错误类型处理方式
prompt 超 100 字自动精简核心词,保留主语+动作+风格关键词
API 返回错误展示完整错误信息,告知用户
图片 URL 获取失败用 thumbnail_path(缩略图)兜底
轮询超时告知用户 serial_no,用户可凭编号稍后查询
部署失败返回本地路径 /workspace/mj_gallery/ 并告知

📁 目录结构

/workspace/
  mj_output/              ← 下载缓存(按 serial 归档)
    {serial}.webp
  mj_gallery/              ← 画廊网站(deploy 部署目录)
    index.html
    {serial}.webp          ← 每张图都复制到这里

💡 使用示例

用户输入: 「用MJ画一只赛博朋金风格的机械凤凰,横版」

技能执行:

  1. 判断:aspect_ratio=16:9,英文 prompt,精简到 100 字内
  2. 提交 → serial: 2041350580286263296
  3. 轮询 11 次(约 55s)→ status=2 完成
  4. 下载到 /workspace/mj_output/2041350580286263296.webp
  5. 复制到 /workspace/mj_gallery/2041350580286263296.webp
  6. 更新 index.html 加入新条目
  7. 部署 → https://xxxx.space.minimaxi.com
  8. 回复:
    • MEDIA: /workspace/mj_output/2041350580286263296.webp
    • 画廊链接

版本

  • v1.0.0(2026-04-07):初版,修正 CDN URL 渲染异常问题,自动下载+部署画廊

Comments

Loading comments...