二维码工具:生成与美化二维码 - Openclaw Skills
作者:互联网
2026-04-06
什么是 二维码工具?
QR Code Skill 是专为 OpenClaw 生态系统设计的综合实用程序,允许用户通过简单的命令或自然语言管理二维码操作。它不仅支持基础生成,还提供高级自定义选项,如圆点样式、色彩渐变和安全的 Logo 嵌入。作为 Openclaw Skills 系列的强力补充,它确保生成的素材在各种通信渠道中都经过优化,兼具美观性与技术可靠性。
下载入口:https://github.com/openclaw/skills/tree/main/skills/zouyawen/openclaw-qr-code
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install openclaw-qr-code
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 openclaw-qr-code。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
二维码工具 应用场景
- 为营销材料创建带有公司 Logo 的品牌二维码。
- 解码通过聊天平台接收到的二维码图片中的 URL 或数据。
- 使用现代风格和符合品牌色调的配色方案增强现有二维码。
- 在开发工作流中自动为动态链接或联系人信息创建二维码。
- 该工具通过自然语言或命令行输入接收请求,例如需要解码的 URL 或图像。
- 它会验证输入参数(包括颜色、尺寸和文件路径),确保安全性和兼容性。
- 底层引擎处理二维码,应用所请求的样式,如渐变或 Logo 叠加。
- 对于有特殊要求的平台(如 WhatsApp),该工具会自动将 SVG 等格式转换为 PNG。
- 最终文件存储在指定的各个工作区目录中,并将路径返回给用户。
二维码工具 配置指南
要访问 Openclaw Skills 中包括渐变和 Logo 支持在内的完整功能,请运行推荐的安装脚本:
curl -s https://raw.githubusercontent.com/zouyawen/openclaw-qrcode/main/install.sh | bash
openclaw gateway restart
或者进行基础安装:
mkdir -p ~/.openclaw/skills/qr-code
# 在此处解压 skill.zip 内容
openclaw gateway restart
二维码工具 数据架构与分类体系
该工具在用户工作区内使用结构化目录管理文件:
| 位置 | 描述 |
|---|---|
~/clawd/qr-codes/ |
所有生成的及美化后的二维码文件的默认输出目录。 |
~/clawd/qr-assets/ |
生成过程中使用的 Logo 文件和其他素材的存储区域。 |
所有文件操作均限制在这些路径内,以维护环境安全。
name: qr-code
description: Generate, decode, and beautify QR codes with customizable colors, logos, and formats. Works across all OpenClaw channels including WhatsApp.
openclaw:
homepage: https://github.com/zouyawen/openclaw-qrcode
user-invocable: true
emoji: "??"
QR Code Skill
?? This skill requires the companion plugin to function!
?? Quick Start
?? Recommended: Full Feature Installation
For the complete experience with rounded dots, gradient colors, logo integration, and natural language support, install from GitHub:
curl -s https://raw.githubusercontent.com/zouyawen/openclaw-qrcode/main/install.sh | bash
openclaw gateway restart
? Basic Installation (from ClawHub)
This provides basic QR code functionality only:
mkdir -p ~/.openclaw/skills/qr-code
# Extract the downloaded skill.zip to this directory
openclaw gateway restart
?? Pro Tip: The GitHub installation includes advanced features like rounded dots, color gradients, and logo embedding that aren't available through ClawHub alone!
Features
- Generate: Create QR codes with custom colors, background, size, logo overlay, and format (PNG, JPG, SVG)
- Decode: Extract data from QR code images
- Beautify: Enhance existing QR codes with new styling while preserving data
- Natural Language: Just say "make a colorful QR code" or "add a logo to this QR code"
- Cross-channel compatibility: Works seamlessly across all OpenClaw channels including WhatsApp, T@elegrimm, Discord, etc.
- Automatic format handling: Converts formats as needed for channel compatibility
- Enhanced security: Path traversal protection, input validation, and secure error handling
- WhatsApp optimization: Automatic SVG-to-PNG conversion for WhatsApp compatibility
Security Features
- Path traversal protection: Logo paths are validated to prevent directory traversal attacks
- Input sanitization: All color, size, and format parameters are strictly validated
- Secure error handling: Comprehensive try-catch blocks prevent information leakage
- File access restrictions: Only allows access to files within the workspace directory
Usage Examples
Natural Language (Recommended)
- "生成一个圆点的渐变色二维码,内容是 https://example.com"
- "在二维码中间加个 logo"
- "用蓝色和黄色做渐变效果"
- "这个二维码图片里是什么内容?" (attach image)
Command Mode (Optional)
/qr generate https://mzt315.com color=red backgroundColor=white size=10 format=png
/qr decode [attach QR code image]
/qr beautify [attach QR code image] color=green backgroundColor=black size=12
With Logo (Secure)
/qr generate https://mzt315.com logoPath=logo.png
Note: Logo paths must be relative to the workspace and cannot contain .. or absolute paths.
File Locations
- QR Code Output:
~/clawd/qr-codes/ - Logo Assets:
~/clawd/qr-assets/(place your logo files here)
WhatsApp Compatibility
- Automatically handles WhatsApp's format requirements (PNG/JPG only)
- Automatic SVG-to-PNG conversion: If SVG is requested on WhatsApp, it's automatically converted to PNG
- Returns MEDIA paths that can be sent directly to any channel
- Optimized for mobile viewing with appropriate sizing
Input Validation
- Colors: Must be valid CSS color names or hex codes (e.g., "red", "#FF0000")
- Background Colors: Same validation as colors
- Size: Must be a number between 1 and 50 (inclusive)
- Format: Must be one of: png, jpg, jpeg, svg
- Logo Path: Must be a relative path within the workspace directory
Installation Requirements
This skill works best with the companion plugin from GitHub:
# Full feature installation (recommended)
curl -s https://raw.githubusercontent.com/zouyawen/openclaw-qrcode/main/install.sh | bash
# Python dependencies (installed automatically by the script)
# qrcode[pil], pillow, numpy, pyzbar
Technical Details
This skill leverages OpenClaw's built-in qr_code_operations tool which supports both Python-based advanced features and Node.js fallback for maximum compatibility across different environments. All operations include comprehensive error handling and security validation.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Prefetch Suggester:AI 驱动的路由优化 - Openclaw Skills
NFT 投资组合追踪器:NFT 地板价与投资回报率分析 - Openclaw Skills
新闻影响预测器:市场与加密货币分析 - Openclaw Skills
新闻 API 聚合器:统一多源新闻情报 - Openclaw Skills
机器学习预测服务:可扩展的 AI 推理 - Openclaw Skills
机器学习数据清洗器:自动预处理 - Openclaw Skills
finance-agent:自动支出跟踪与报告 - Openclaw Skills
CLAWBAZAAR:自主 AI NFT 市场 - Openclaw 技能
X Article Publisher:Markdown 转 X 长文章 - Openclaw Skills
股票技术分析:自动化市场指标 - Openclaw Skills
AI精选
