360 Secure SkillHub
360 安全技能中心

Qr Generator

该 Skill 通过 Node 命令行脚本把给定文本或网址编码为二维码,可输出 PNG/SVG 图片文件,或用 ASCII 字符打印到终端,并支持设置图片宽度与深浅颜色;示例中还展示了生成图片后配合其他脚本发送的流程。

autogame-17
autogame-17
热度 75.96
最近更新 2026-05-20 03:35:36
分类:效率依赖:代码执行 / 读写文件应用场景:图像生成 / 文件转换 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add qr-generator
Metadata
name
qr-generator
description
Generate QR codes from text or URL for mobile scanning.

QR Generator

Generates a QR code image (PNG/SVG) or terminal output from a given text or URL. Useful for transferring long URLs, WiFi credentials, or text snippets to mobile devices via Feishu (scan QR).

Usage

# Generate a QR code image
node skills/qr-generator/index.js --text "https://openclaw.ai" --output "qr_code.png"

# Generate to terminal (ASCII art)
node skills/qr-generator/index.js --text "Hello World" --terminal

Options

  • -t, --text <text>: The text or URL to encode (required).
  • -o, --output <path>: Output file path (e.g., code.png, code.svg).
  • --terminal: Output QR code as ASCII art to the terminal.
  • --width <number>: Width of the image (default: 500).
  • --color-dark <hex>: Dark color (default: #000000).
  • --color-light <hex>: Light color (default: #ffffff).

Example: Send QR to Feishu

# 1. Generate QR code
node skills/qr-generator/index.js --text "https://example.com" --output "temp_qr.png"

# 2. Send to user via Feishu
node skills/feishu-image/send.js --target "ou_xxx" --file "temp_qr.png"

# 3. Clean up
rm temp_qr.png