File contents 工作流程
解析内容 :从用户指令中提取需要生成二维码的内容
确定模式 :判断是屏幕显示还是保存为文件
执行脚本 :调用 scripts/generate_qrcode.py 脚本生成二维码
返回结果 :显示二维码或返回文件路径
执行命令
屏幕显示模式(默认)
python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容"
保存为文件模式
# Bash/Zsh (Linux/macOS)
python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $TMP --output "qrcode.png"
# 或使用 $TEMP
python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $TEMP --output "qrcode.png"
# PowerShell (Windows)
python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $env:TEMP --output "qrcode.png"
# 或使用 $env:TMP
python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $env:TMP --output "qrcode.png"
任务完成后,请删除生成的临时文件。
注意 :脚本路径是相对于 WORK_HOME 的 CodeAgent/skills/qrcode/scripts/generate_qrcode.py。
脚本说明
脚本位置 : scripts/generate_qrcode.py
依赖 :
Python 3.x
qrcode 库(脚本会自动检测并安装,也可手动运行 pip install qrcode[pil])
Pillow 库(用于 GUI 显示,运行 pip install Pillow)
tkinter(Python 自带,用于 GUI 窗口)
参数 :
--content: 要生成二维码的内容(必需)
--save: 是否保存为文件(可选,默认不保存)
--output: 输出文件名(默认为 qrcode.png)
--output-dir: 输出目录路径(建议使用 $TMP, $TEMP 等临时目录)
--size: 二维码大小(可选,默认为 10)
--border: 边框大小(可选,默认为 4)
功能 :
默认使用 GUI 弹窗显示二维码图片
可选保存为 PNG 图片文件
支持自定义二维码大小和边框
使用示例
终端显示(默认)
只需要告诉 AI:
把 "https://example.com" 生成二维码
或者:
生成二维码:Hello World
保存为文件
如果需要保存为文件,明确说明:
把 "https://example.com" 生成二维码并保存为文件
或者:
生成二维码并保存:Hello World
更多示例
生成网址二维码:把 "https://github.com" 生成二维码
生成文本二维码并保存:把 "这是一段测试文本" 生成二维码并保存为文件
1 --- 2 name: qrcode 3 description: 生成二维码,支持屏幕显示或保存为文件 4 --- 5 6 ### 工作流程 7 8 1. **解析内容**:从用户指令中提取需要生成二维码的内容 9 2. **确定模式**:判断是屏幕显示还是保存为文件 10 3. **执行脚本**:调用 `scripts/generate_qrcode.py` 脚本生成二维码 11 4. **返回结果**:显示二维码或返回文件路径 12 13 ### 执行命令 14 15 #### 屏幕显示模式(默认) 16 17 ```bash 18 python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" 19 ``` 20 21 #### 保存为文件模式 22 23 ```bash 24 # Bash/Zsh (Linux/macOS) 25 python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $TMP --output "qrcode.png" 26 # 或使用 $TEMP 27 python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $TEMP --output "qrcode.png" 28 29 # PowerShell (Windows) 30 python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $env:TEMP --output "qrcode.png" 31 # 或使用 $env:TMP 32 python CodeAgent/skills/qrcode/scripts/generate_qrcode.py --content "你的内容" --save --output-dir $env:TMP --output "qrcode.png" 33 ``` 34 > **任务完成后,请删除生成的临时文件。** 35 36 > **注意**:脚本路径是相对于 WORK_HOME 的 `CodeAgent/skills/qrcode/scripts/generate_qrcode.py`。 37 38 ### 脚本说明 39 40 - **脚本位置**: `scripts/generate_qrcode.py` 41 - **依赖**: 42 - Python 3.x 43 - qrcode 库(脚本会自动检测并安装,也可手动运行 `pip install qrcode[pil]`) 44 - Pillow 库(用于 GUI 显示,运行 `pip install Pillow`) 45 - tkinter(Python 自带,用于 GUI 窗口) 46 - **参数**: 47 - `--content`: 要生成二维码的内容(必需) 48 - `--save`: 是否保存为文件(可选,默认不保存) 49 - `--output`: 输出文件名(默认为 `qrcode.png`) 50 - `--output-dir`: 输出目录路径(建议使用 `$TMP`, `$TEMP` 等临时目录) 51 - `--size`: 二维码大小(可选,默认为 10) 52 - `--border`: 边框大小(可选,默认为 4) 53 - **功能**: 54 - 默认使用 GUI 弹窗显示二维码图片 55 - 可选保存为 PNG 图片文件 56 - 支持自定义二维码大小和边框 57 58 ### 使用示例 59 60 #### 终端显示(默认) 61 62 只需要告诉 AI: 63 ``` 64 把 "https://example.com" 生成二维码 65 ``` 66 67 或者: 68 ``` 69 生成二维码:Hello World 70 ``` 71 72 #### 保存为文件 73 74 如果需要保存为文件,明确说明: 75 ``` 76 把 "https://example.com" 生成二维码并保存为文件 77 ``` 78 79 或者: 80 ``` 81 生成二维码并保存:Hello World 82 ``` 83 84 #### 更多示例 85 86 - 生成网址二维码:`把 "https://github.com" 生成二维码` 87 - 生成文本二维码并保存:`把 "这是一段测试文本" 生成二维码并保存为文件`
chuanyue98/prompt-gallery/tree/main/.gemini/skills/qrcode commit 10e14904d0
Frequently asked questions How do I install the Qrcode skill? Run npx skillmds@latest add chuanyue98/qrcode in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Qrcode skill do? 生成二维码,支持屏幕显示或保存为文件 It is listed under Coding & Dev Tools on SkillMD.
Is Qrcode safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Qrcode? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Qrcode free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Qrcode? chuanyue98 (@chuanyue98) published this skill. Their other Agent Skills are listed on their SkillMD profile.