qr-code-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQR Code Generator
二维码生成器
What this skill does
本Skill的功能
Given a URL, this skill generates:
- a QR code that encodes the URL
- optional captions (human-readable URL or short label)
- exports in PNG and/or SVG
- optional batch runs from a CSV
给定一个URL,本Skill可生成:
- 编码该URL的二维码
- 可选的说明文字(易读的URL或简短标签)
- 导出为PNG和/或SVG格式文件
- 支持从CSV文件批量生成二维码
Guardrails
安全准则
- Don’t generate QR codes for suspicious links (phishing, credential prompts, malware). If unsure, ask for confirmation or suggest a safer destination page.
- Prefer HTTPS URLs.
- If the QR is for print, prefer SVG (scales cleanly) and high error correction.
- 不要为可疑链接(钓鱼、索要凭据、恶意软件链接)生成二维码。若不确定,请求用户确认或建议更安全的目标页面。
- 优先使用HTTPS协议的URL。
- 若二维码用于印刷场景,优先选择SVG(缩放不失真)和高纠错级别。
Inputs
输入参数
Required:
- URL
Optional:
- label/caption text (e.g., “Scan to book a call”)
- whether to show the URL under the QR (yes/no)
- output formats: PNG, SVG
- UTM params (source, medium, campaign, content, term)
- size intent: screen / print / sticker
必填:
- URL
可选:
- 标签/说明文字(例如:“扫码预约通话”)
- 是否在二维码下方显示URL(是/否)
- 输出格式:PNG、SVG
- UTM参数(source、medium、campaign、content、term)
- 尺寸用途:屏幕显示/印刷/贴纸
Workflow
工作流程
- Validate the URL (scheme + domain).
- Optionally append UTM parameters (using ).
assets/templates/utm_template.json - Generate QR:
- Error correction: M (default), H for print/complex usage
- Border: 4 (default)
- Export:
- PNG (good for web)
- SVG (best for print)
- If caption enabled:
- PNG: add label and/or URL under the QR
- SVG: add a text element under the QR
- Return links + a quick “usage notes” block (recommended minimum size, print tips).
- 验证URL的合法性(协议+域名)。
- 可选操作:附加UTM参数(使用模板)。
assets/templates/utm_template.json - 生成二维码:
- 纠错级别:默认M级,印刷/复杂场景推荐H级
- 边框:默认4
- 导出文件:
- PNG(适合网页使用)
- SVG(最适合印刷场景)
- 若启用说明文字:
- PNG格式:在二维码下方添加标签和/或URL
- SVG格式:在二维码下方添加文本元素
- 返回文件链接 + 快速“使用说明”模块(推荐最小尺寸、印刷提示)。
Output format (required)
输出格式(必填)
- Encoded URL (final URL after UTM, if used)
- Files generated (with links)
- Recommendations (error correction, min size, when to use SVG vs PNG)
- 编码后的URL(若使用UTM参数则为最终拼接后的URL)
- 生成的文件(带下载链接)
- 使用建议(纠错级别、最小尺寸、SVG与PNG的适用场景)
Scripts in this pack
工具包中的脚本
- — single QR (PNG/SVG, optional caption)
scripts/generate_qr.py - — batch from CSV (id,url,label)
scripts/batch_generate.py
- — 单个二维码生成(支持PNG/SVG格式,可选添加说明文字)
scripts/generate_qr.py - — 从CSV文件批量生成(CSV需包含id、url、label字段)
scripts/batch_generate.py
Templates
模板文件
assets/templates/utm_template.jsonassets/templates/print_notes.mdassets/templates/prompt_snippets.md
assets/templates/utm_template.jsonassets/templates/print_notes.mdassets/templates/prompt_snippets.md