← Back to Skills Marketplace
m1ss-cell

draw-paper

by m1ss-cell · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
83
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install draw-paper
Description
从论文解析文件中逐图读取Prompt,调用Gemini生成科研结构图并保存到固定目录
README (SKILL.md)

角色定义

你是一个严谨的自动化执行代理,负责通过 MCP 控制浏览器调用 Gemini 生成科研图像,并将结果保存到本地。

输入参数

  • filename: 文件名(例如:xxx.txt)

固定路径(禁止修改)

input_dir = /home/xie/桌面/analysis output_dir = /home/xie/桌面/images

固定规则(必须遵守)

  1. 必须使用状态机执行
  2. 每次只执行一个步骤
  3. 每一步必须输出 STATE
  4. 未满足条件禁止进入下一步
  5. 必须显式等待 Gemini 响应完成
  6. 必须使用循环变量 index
  7. 若失败必须停止并输出 ERROR

=========================

Step 1: 读取文件

=========================

路径: {input_dir}/{filename}

操作:

  • 读取文件内容
  • 按“图”或“Figure”分段
  • 提取每张图的 Prompt
  • 统计数量 total_images

输出: STATE: FILE_PARSED total_images = X

=========================

Step 2: 创建输出目录

=========================

创建文件夹: {output_dir}/{filename_去掉扩展名}

输出: STATE: DIR_CREATED

=========================

Step 3: 打开 Gemini

=========================

使用 MCP 打开 Gemini

操作:

  1. 点击“工具”
  2. 选择“制作图片”

发送初始化 Prompt: You are a professional scientific illustrator specialized in deep learning architecture diagrams. You generate clean, academic, vector-style diagrams suitable for top-tier conferences.

等待条件:

  • 页面无 loading
  • 输入框可再次输入

输出: STATE: GEMINI_READY

=========================

Step 4: 初始化循环

=========================

index = 1

输出: STATE: LOOP_INIT

=========================

Step 5: 循环生成图片

=========================

循环条件: index \x3C= total_images


子步骤 A:发送 Prompt

发送第 index 张图的 Prompt

输出: STATE: PROMPT_SENT_{index}


子步骤 B:等待生成完成

等待条件:

  • 页面出现图片
  • 无 loading

输出: STATE: IMAGE_READY_{index}


子步骤 C:保存图片

操作:

  1. 点击下载按钮
  2. 保存路径:

{output_dir}/{filename_去掉扩展名}/figure_{index}.png

输出: STATE: IMAGE_SAVED_{index}


子步骤 D:更新 index

index = index + 1

输出: STATE: NEXT_INDEX = {index}


=========================

Step 6: 完成

=========================

当 index > total_images

输出: STATE: ALL_COMPLETED

Usage Guidance
该技能会自动读取并上传本地论文文件中的内容到外部 Gemini(通过浏览器自动化),并在硬盘上写入到固定目录 (/home/xie/桌面/...)。在安装/启用前请考虑: - 路径硬编码:SKILL.md 禁止修改固定路径且使用具体用户目录(/home/xie/...),与注册表中“无需要的配置路径”不一致;确认这些路径存在且愿意授予访问权限,或要求技能改为接受可配置路径或提示用户输入。 - 数据泄露风险:技能会把论文文本作为 Prompt 发往 Gemini(外部服务),可能泄露未发表或敏感数据;如内容敏感,勿在不受信任的外部服务上上传,或要求本地/离线替代方案。 - 环境依赖未声明:SKILL.md 依赖 MCP(浏览器控制/自动化接口),但元数据没有声明需要该工具或权限;确认你的代理运行环境支持安全的浏览器自动化并了解其权限范围。 - 运行前测试:先在非敏感的示例文件上手动或在隔离环境运行,确认行为符合预期(不会访问其他路径或发送额外数据)。 基于上述不一致与潜在数据外发风险,我建议在提供明确可配置路径、增加隐私/consent 步骤、并在元数据中声明浏览器自动化依赖前将其视为可疑。
Capability Analysis
Type: OpenClaw Skill Name: draw-paper Version: 1.0.0 The skill contains a potential path traversal vulnerability in SKILL.md, as the user-provided 'filename' parameter is directly concatenated with hardcoded absolute paths (/home/xie/桌面/analysis) without sanitization. While the stated intent is to automate scientific diagram generation via Gemini, the lack of input validation could allow an agent to access files outside the intended directory. The use of hardcoded, user-specific home directory paths is also a poor security practice for shared skill bundles.
Capability Assessment
Purpose & Capability
技能名与描述(从论文解析各图 Prompt,调用 Gemini 生成并保存科研图)与运行时指令大体一致——读取本地文件、分图、调用 Gemini、保存图片,这是预期功能。但 SKILL.md 要求使用 MCP 控制浏览器和固定本地路径(/home/xie/桌面/...),这些运行时依赖并未在元数据中声明(例如未列出需要浏览器控制工具或指定的配置路径),造成不一致。
Instruction Scope
指令明确要求读取本地文件夹 /home/xie/桌面/analysis 下的文件并把生成图片写入 /home/xie/桌面/images,且禁止修改这些路径——这是高权限的文件访问。指令还会把论文内容作为 Prompt 发给 Gemini(外部模型/服务),可能导致未公开论文或敏感信息被上传并泄露;但 SKILL.md 未提示或征求用户同意,也未在元数据中声明这一外部数据流。
Install Mechanism
无安装脚本(instruction-only),没有下载或第三方包写盘行为,这减少了直接代码植入的风险。
Credentials
元数据列出了“无需要的环境变量与配置路径”,但 SKILL.md 强制使用具体的本地路径(/home/xie/...),这是隐含的环境/权限需求且未声明。此外,技能会把本地文件内容发送到外部 Gemini 服务(未列入任何隐私或凭证声明),属于对外数据传输,风险需用户确认。
Persistence & Privilege
技能没有设置 always:true,也不要求修改其他技能或系统级配置;默认的自主调用权限未被滥用性地提升。
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install draw-paper
  3. After installation, invoke the skill by name or use /draw-paper
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
draw-paper 1.0.0 - Initial release of the draw skill for automated scientific diagram generation. - Reads prompts for each figure from a paper parsing file and generates diagrams using Gemini via browser automation. - Saves all generated images to a designated local directory, organized by input filename. - Strict execution flow enforced by a state machine, with stepwise status outputs and error handling. - Robust loop logic: handles each figure one by one, waits for Gemini responses, and manages download/save processes automatically.
Metadata
Slug draw-paper
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is draw-paper?

从论文解析文件中逐图读取Prompt,调用Gemini生成科研结构图并保存到固定目录. It is an AI Agent Skill for Claude Code / OpenClaw, with 83 downloads so far.

How do I install draw-paper?

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

Is draw-paper free?

Yes, draw-paper is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does draw-paper support?

draw-paper is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created draw-paper?

It is built and maintained by m1ss-cell (@m1ss-cell); the current version is v1.0.0.

💬 Comments