← 返回 Skills 市场
279458179

grok_image_generate

作者 xiaohuozi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
1447
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install grok-image-generate
功能描述
通过 Grok Imagine 生成用户描述的图片,并指导保存及发送至飞书的完整流程。
使用说明 (SKILL.md)

images_generate_grok

使用 Grok Imagine 生成图片的技能。

触发条件

用户要求:

  • "用 Grok 生成图片"
  • "生成一张图片"
  • "帮我画个图"
  • "生成 xxx 图片"

使用流程

1. 打开 Grok Imagine 页面

// 使用 browser 工具打开 Grok Imagine 页面
playwright({
  action: "open",
  profile: "openclaw",
  url: "https://grok.com/imagine"
})

2. 输入提示词并生成

等待页面加载后,在输入框中输入提示词,然后点击提交按钮生成图片。

// 输入提示词
playwright({
  action: "act",
  request: { "kind": "type", "ref": "输入框ref", "text": "用户想要生成的内容" }
})

// 点击提交按钮
playwright({
  action: "act", 
  request: { "kind": "click", "ref": "提交按钮ref" }
})

等待图片生成完成(约 8-10 秒)。

3. 获取图片并下载

图片生成后,需要保存到本地。有两种方式:

方式一:使用 Desktop Control 技能保存(推荐)

使用 desktop-control 技能通过鼠标操作保存图片:

步骤1:移动鼠标到图片上并右键点击

# 获取屏幕尺寸
uvx desktop-agent screen size

# 移动鼠标到图片位置(根据屏幕尺寸调整坐标)
uvx desktop-agent mouse move \x3Cx> \x3Cy>

# 右键点击
uvx desktop-agent mouse right-click

步骤2:选择"图片另存为"

# 使用键盘选择菜单选项(通常按向下键然后回车)
uvx desktop-agent keyboard press down --presses 2
uvx desktop-agent keyboard press return

步骤3:点击存储

# 在保存对话框中点击存储
uvx desktop-agent keyboard press return

完整示例:

# 假设图片在屏幕中心区域
uvx desktop-agent mouse move 720 400
uvx desktop-agent mouse right-click
sleep 1
uvx desktop-agent keyboard press down --presses 2
uvx desktop-agent keyboard press return
sleep 1
uvx desktop-agent keyboard press return

步骤4:找到保存的图片

# 查看下载文件夹中最新的文件
ls -lat ~/Downloads/ | head -10

4. 发送图片到飞书

图片保存到本地后,可以使用 message 工具发送到飞书:

方式一:从下载目录发送

# 查看保存的图片
ls -lat ~/Downloads/*.jpg | head -5

# 发送图片到飞书
message({
  action: "send",
  filePath: "/Users/xiaohuozi/Downloads/图片文件名.jpg",
  message: "图片描述"
})

方式二:从图片目录发送(如果是截图)

// 先复制到图片目录
cp ~/Downloads/图片文件名.jpg ~/.openclaw/workspace/images/描述.jpg

// 然后发送
message({
  action: "send",
  filePath: "/Users/xiaohuozi/.openclaw/workspace/images/描述.jpg",
  message: "图片描述"
})

飞书发送图片正确姿势

  1. 将图片保存到 ~/.openclaw/workspace/images/ 目录
  2. 使用 message 工具直接发送图片
  3. 工具会自动处理图片上传和发送

保存路径建议

  • 推荐保存到 ~/.openclaw/workspace/images/ 目录
  • 文件名建议:描述关键词.jpg 或带时间戳:peacock_king.jpg
  • 如果需要发送到飞书,直接使用该路径即可

注意事项

  • Grok Imagine 免费用户可能有生成次数限制
  • 生成的图片是 AI 生成的,可能需要等待加载
  • 如果页面元素有变化,需要根据实际情况调整 DOM 选择器
安全使用建议
This skill appears to do what it says: automate Grok to generate images, save them locally, then send via Feishu. Before installing, confirm your environment has the required automation tools (playwright/browser automation, desktop-control/uvx, and the platform message tool) and that you are comfortable allowing a skill to: (1) use a browser profile (which may expose logged-in sessions/cookies), (2) control your mouse/keyboard and interact with dialogs, and (3) read files from ~/Downloads and write to ~/.openclaw/workspace/images. If you want to reduce risk, avoid providing or using an account-specific browser profile, review and change any hard-coded paths, and require explicit user confirmation before performing desktop actions or sending files.
功能分析
Type: OpenClaw Skill Name: grok-image-generate Version: 1.0.0 The skill bundle provides instructions for an AI agent to generate images using Grok and send them to Feishu. While it utilizes high-privilege desktop automation (mouse and keyboard control via uvx desktop-agent) and contains hardcoded local file paths (e.g., /Users/xiaohuozi/), these appear to be functional examples or remnants of the developer's environment rather than indicators of malice. The behavior is consistent with the stated purpose of the skill.
能力评估
Purpose & Capability
Name/description (generate images with Grok and guide saving/sending to Feishu) align with the runtime instructions: open Grok imagine page, enter prompt, save image, and send via message tool. Use of browser automation (playwright), desktop-control (uvx desktop-agent), and message tool are coherent for this purpose. Minor oddity: SKILL.md uses a hard-coded example path (/Users/xiaohuozi) which is just an example but should be adjusted for each user.
Instruction Scope
Instructions explicitly perform browser automation, UI-level desktop control (mouse/keyboard), list and copy files in ~/Downloads and ~/.openclaw, and send files via the message tool. These actions are within the skill's stated goal but do require access to your local GUI, filesystem, and any logged-in browser profile. That capability is sensitive (can read/send files and interact with other apps) — the spec does not constrain or limit which files are accessed beyond examples.
Install Mechanism
Instruction-only skill with no install spec or external downloads — lowest install risk. Nothing is written to disk by the skill bundle itself.
Credentials
Skill declares no required env vars or credentials, which is consistent. However, it depends on existing platform tools and a browser profile ('profile: "openclaw"') and the message/desktop-control capabilities; those may reuse existing logged-in sessions or platform-managed credentials to access Grok or Feishu. This reliance is proportionate to the task but is an important privacy/credential consideration.
Persistence & Privilege
always:false (good). The skill can be invoked autonomously (platform default) and would then be able to control the desktop and send files if allowed by the platform. Autonomous invocation combined with desktop-control and messaging capabilities increases the practical risk surface; this is not a fault of the skill itself but worth considering when enabling it.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install grok-image-generate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /grok-image-generate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Removed web and X (Twitter) search functionality using the Grok API. - Added new skill for generating images with Grok Imagine based on user prompts. - Provided detailed step-by-step instructions (in Chinese) for opening the Grok Imagine page, entering prompts, generating, downloading, and sending AI-generated images. - Included sample code and recommended workflows for saving images locally and sharing them via Feishu. - Noted requirements, typical issues, and best practices for image saving, naming, and automation workflows.
元数据
Slug grok-image-generate
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

grok_image_generate 是什么?

通过 Grok Imagine 生成用户描述的图片,并指导保存及发送至飞书的完整流程。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1447 次。

如何安装 grok_image_generate?

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

grok_image_generate 是免费的吗?

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

grok_image_generate 支持哪些平台?

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

谁开发了 grok_image_generate?

由 xiaohuozi(@279458179)开发并维护,当前版本 v1.0.0。

💬 留言讨论