← Back to Skills Marketplace
amzulin

我的二维码生成技能

by amzulin · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
419
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install generate-qr-code-amzulin
Description
生成包含文本、URL或WiFi信息的二维码图片,支持自定义尺寸、颜色并保存到指定路径。
README (SKILL.md)

\r ---\r name: generate-qr-code\r description: 生成二维码/条形码,支持文本、URL、WiFi 配置等内容,可自定义尺寸、颜色并指定保存路径\r version: 1.0.0\r author: 二码大神\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
  • 特殊字符内容:自动过滤无效字符,确保二维码可正常识别。\r
Usage Guidance
This skill appears to do exactly what it says: generate and save QR images. Before installing or running it: (1) be aware the code will run pip install at import time — run it in a virtual environment or isolated container to avoid changing your global Python environment; (2) when supplying a save_path, avoid system directories or running the agent with elevated privileges to prevent accidental overwrites; (3) note SKILL.md claims special-character filtering but the code only strips whitespace — validate or sanitize input yourself if you expect untrusted content; (4) on non-Windows systems the code relies on ~/Desktop, and on Windows it uses USERPROFILE without fallback (may raise an error if that env var is missing). If these caveats are acceptable, the skill is coherent with its description.
Capability Analysis
Type: OpenClaw Skill Name: generate-qr-code-amzulin Version: 1.0.0 The skill is classified as suspicious due to the use of `subprocess.check_call` in `agent.py` for installing dependencies. While currently used for legitimate, hardcoded packages (`qrcode`, `pillow`), this mechanism introduces a capability for arbitrary command execution (RCE) if the agent's input handling or the list of packages were to be compromised. This represents a significant vulnerability, even though no malicious intent is directly observed in the provided code.
Capability Assessment
Purpose & Capability
Name/description (generate QR codes with custom size/color/save path) align with the included agent.py and SKILL.md. The code implements generate_qr, uses the qrcode and Pillow libraries, and saves images to the requested path.
Instruction Scope
SKILL.md and agent.py are generally aligned: both describe auto-installing qrcode/Pillow and saving images. Two small mismatches: SKILL.md claims '自动过滤无效字符' (automatic filtering of special characters) but agent.py only calls text.strip() and does not perform further sanitization; SKILL.md mentions default desktop path which the code implements, but the code directly writes to any save_path provided by the user (expected for this skill but worth noting because a maliciously chosen path could overwrite files if the agent is given elevated rights).
Install Mechanism
No install spec in registry, but agent.py performs runtime installation via subprocess.check_call([sys.executable, "-m", "pip", "install", package]) for 'qrcode' and 'pillow'. This is coherent with the stated behavior but implies network activity and modification of the Python environment at import time — a reasonable tradeoff for an instruction-only skill but a moderate operational risk (use a virtualenv/container).
Credentials
The skill requests no credentials or special environment variables. The code reads USERPROFILE for Windows desktop path without a fallback, which is an implementation fragility (not a credential issue). No broad or unrelated env access is present.
Persistence & Privilege
always is false, the skill does not request permanent inclusion or modify other skills or global agent settings. It does install Python packages and write image files (expected for its purpose) but does not persist tokens or alter system configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install generate-qr-code-amzulin
  3. After installation, invoke the skill by name or use /generate-qr-code-amzulin
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Generate QR Code Skill v1.0.0 - Initial release for generating QR codes/barcodes from text, URLs, or WiFi info. - Supports custom size, color, and save path (default: desktop). - Outputs QR codes as image files and reports the save location or error messages. - Handles edge cases such as missing content or insufficient file permissions. - Automatically installs required libraries (qrcode, Pillow) if missing.
Metadata
Slug generate-qr-code-amzulin
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 我的二维码生成技能?

生成包含文本、URL或WiFi信息的二维码图片,支持自定义尺寸、颜色并保存到指定路径。 It is an AI Agent Skill for Claude Code / OpenClaw, with 419 downloads so far.

How do I install 我的二维码生成技能?

Run "/install generate-qr-code-amzulin" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 我的二维码生成技能 free?

Yes, 我的二维码生成技能 is completely free (open-source). You can download, install and use it at no cost.

Which platforms does 我的二维码生成技能 support?

我的二维码生成技能 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 我的二维码生成技能?

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

💬 Comments