← 返回 Skills 市场
lanxianghua

萤火蓝二维码工具

作者 lanxianghua · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
122
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install fireflylan-qr-code
功能描述
生成包含文本、URL或WiFi信息的二维码,支持自定义尺寸、颜色及保存路径,默认保存到桌面。
使用说明 (SKILL.md)

\r ---\r name: fireflylan-qr-code\r description: 生成二维码/条形码,支持文本、URL、WiFi 配置等内容,可自定义尺寸、颜色并指定保存路径\r version: 1.0.0\r author: lanxianghua\r permissions: 文件写入权限(用于保存二维码图片)\r ---\r \r

Generate QR Code Skill(生成二维码技能)\r

\r

1. Description\r

当用户需要将文本、URL、WiFi 信息等转换为可视化二维码时,使用此技能生成二维码图片,并保存到指定路径(默认保存到桌面),支持自定义尺寸和颜色。\r \r

2. When to use\r

  • 用户说:“帮我把 https://openclaw.ai 生成二维码”\r
  • 用户说:“生成一个包含 WiFi 信息的二维码,名称:MyWiFi,密码:12345678”\r
  • 用户说:“生成黑色二维码,内容是‘Hello OpenClaw’,保存到 D 盘根目录”\r
  • 用户说:“帮我做一个 400px 大小的二维码,内容是我的手机号 13800138000”\r \r

3. How to use\r

  1. 从用户消息中提取核心参数:\r
    • 必选:生成内容(文本/URL/WiFi 信息,WiFi 格式需为“WIFI:S:名称;T:类型;P:密码;;”);\r
    • 可选:尺寸(默认 300px)、颜色(默认黑色)、保存路径(默认桌面);\r
  2. 若用户未指定可选参数,使用默认值;\r
  3. 调用 agent.py 中的 generate_qr 函数执行生成操作;\r
  4. 返回结果:告知用户二维码保存路径,若生成失败,说明具体原因(如路径无权限、内容为空)。\r \r

4. Implementation(代码关联说明)\r

  • 依赖库:qrcode(生成二维码)、Pillow(图片处理);\r
  • 核心函数:async def generate_qr(text: str, size: int = 300, color: str = "black", save_path: str = None);\r
  • 参数说明:\r
    • text:二维码内容(必选);\r
    • size:二维码尺寸(单位 px,默认 300);\r
    • color:填充颜色(默认 black,支持英文颜色名或十六进制色值,如 #FF0000);\r
    • save_path:保存路径(默认桌面,文件名:qr_code.png)。\r \r

5. Edge cases\r

  • 内容为空:回复“请提供需要生成二维码的内容(如文本、URL、WiFi 信息)”;\r
  • 保存路径无权限:回复“指定路径无写入权限,请更换保存路径(如桌面)”;\r
  • 未安装依赖库:自动尝试安装 qrcode 和 Pillow,若安装失败,提示用户手动执行“pip install qrcode pillow”;\r
  • 特殊字符内容:自动过滤无效字符,确保二维码可正常识别。
安全使用建议
This skill appears to do only QR generation and saving, but consider the following before installing: (1) The code auto-installs Python packages via pip at runtime which will contact PyPI—if you require strict offline or audited installs, install dependencies yourself and/or remove the auto-install; (2) The skill writes files to your filesystem (default: Desktop) — ensure you are comfortable with that path or specify a different save location with appropriate permissions; (3) The source and homepage are unknown — if you prefer, review the included scripts/agent.py locally or run the skill in an isolated environment (virtualenv/VM/container) before granting it use in a production agent; (4) If you have corporate policy about third-party packages, preinstall qrcode and Pillow from approved mirrors and disable the auto-install behavior.
功能分析
Type: OpenClaw Skill Name: fireflylan-qr-code Version: 1.0.0 The skill provides QR code generation functionality but contains risky implementation patterns in `scripts/agent.py`. Specifically, it automatically executes `pip install` via `subprocess` to install dependencies at runtime and lacks sanitization for the `save_path` parameter, which could allow an agent to overwrite arbitrary files (e.g., configuration files) with PNG image data if manipulated via prompt injection.
能力评估
Purpose & Capability
The name/description (生成二维码/条形码) matches the SKILL.md and the code. The code implements generate_qr(text,size,color,save_path) and saves an image file; no extraneous permissions, binaries, or credentials are requested.
Instruction Scope
SKILL.md instructs extracting content/size/color/save_path and calling generate_qr. The implementation follows that and only performs QR generation, image resizing, directory creation, and file writes. It does not read unrelated files or exfiltrate data. Note: the skill will attempt to install Python packages at runtime (network activity to PyPI).
Install Mechanism
There is no formal install spec, but scripts/agent.py runs install_dependencies() at import time and invokes pip via subprocess to install 'qrcode' and 'pillow'. These are well-known PyPI packages (expected for this task), but runtime pip installs cause network activity and execute code fetched from the public package index—this is a moderate operational risk to be aware of.
Credentials
The skill declares no required env vars or credentials. The code reads USERPROFILE (Windows) to compute a default desktop path, which is proportionate to its stated behavior. No secrets, tokens, or unrelated environment variables are requested or accessed.
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide agent settings. It only writes image files to the filesystem (user-specified or desktop) and does not request persistent elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fireflylan-qr-code
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fireflylan-qr-code 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of fireflylan-qr-code. - Generate QR codes/barcodes for text, URLs, and WiFi configurations. - Supports custom size, color, and save path for QR code images. - Automatically saves the generated image, default location is the desktop. - Handles edge cases such as missing content, path permissions, and library dependencies. - Notifies user of the result and errors (e.g., invalid path, missing data).
元数据
Slug fireflylan-qr-code
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

萤火蓝二维码工具 是什么?

生成包含文本、URL或WiFi信息的二维码,支持自定义尺寸、颜色及保存路径,默认保存到桌面。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 122 次。

如何安装 萤火蓝二维码工具?

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

萤火蓝二维码工具 是免费的吗?

是的,萤火蓝二维码工具 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

萤火蓝二维码工具 支持哪些平台?

萤火蓝二维码工具 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 萤火蓝二维码工具?

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

💬 留言讨论