GitHub Copilot 二维码扫描器插件

为 GitHub Copilot 配备真正的本地二维码解码器,直接读取图片并返回准确的编码 URL 或文本,无需再凭像素猜测。

安装 GitHub Copilot CLI 插件

需要 Node.js 22.19+ 或 24+。

  1. 1

    在 GitHub Copilot CLI 中依次运行这两条命令(如需锁定版本,可在第一条命令末尾追加来自 GitHub Releases 的 #<release-tag>)。

    Shell
    copilot plugin marketplace add qrcode-ai-com/qrcode-barcode-scanner-plugin
    copilot plugin install qrcode-barcode-scanner@qrcode-ai-com
  2. 2

    启动新会话并确认 qrscan 已列出 scan_image 工具。如需开启 scan_file,请在服务器环境变量中配置 QRSCAN_MCP_ALLOWED_DIRECTORIES。

  3. 3

    测试一下,向 GitHub Copilot 提问:

    请读取 qr-reference.png 中的二维码,并返回准确的编码 URL。

同时安装 qrcode-barcode-scanner Skill 与本地 stdio MCP 服务器。随时可运行 copilot plugin uninstall qrcode-barcode-scanner 卸载。

在 GitHub 查看插件

在 GitHub Copilot 任务中使用解码后的二维码

二维码扫描器返回准确的 URL 或文本,方便 GitHub Copilot 核对链接、校验素材或执行可复现的审查流程。

在 Copilot CLI 中核验二维码图片

在终端编码任务中本地解码项目二维码素材,直接确认准确 URL,摆脱视觉模型猜测。

stdio MCP 与按需开启的 scan_file

在本地运行 @qrcode-ai-com/qrcode-barcode-scanner-mcp,默认启用 scan_image,scan_file 仅对白名单目录开放。

内置 Skill 安全护栏

随 mcp.json 同步下发 SKILL.md,引导 Copilot 将解码 URL 视为不可信数据并如实报告空扫描结果。

在 GitHub Copilot 中实测二维码图片

准备好图片,复制示例请求,再核对返回的解码内容。

qr-reference.png

生成文本二维码,填入 https://qrcode-ai.com/ 并保存为 qr-reference.png。

让 GitHub Copilot 读取图片

Text
Read qr-reference.png with QR Code Scanner.
Return its encoded content and format as data.
Do not open the URL. If the tool is unavailable or
detects nothing, report that instead of guessing.
预期结果 · QR code
https://qrcode-ai.com/

接入扫描器后,GitHub Copilot 会返回准确的编码内容及其格式,而不再依赖猜测。

qr-reference.png 的示例输出结果。

GitHub Copilot 二维码扫描器插件常见问题

安装路径、图片输入方式、不可信数据安全、故障排查及 MIT 许可说明。

依次运行 copilot plugin marketplace add qrcode-ai-com/qrcode-barcode-scanner-plugin 和 copilot plugin install qrcode-barcode-scanner@qrcode-ai-com。如需锁定特定版本,可在第一条命令后追加来自 GitHub Releases 的 #<release-tag>。

Copilot CLI 会从 GitHub 上的 qrcode-barcode-scanner-plugin 读取 plugin.json、mcp.json 和 skills/,一次性安装 qrcode-barcode-scanner Skill 与本地 qrscan stdio MCP 服务器。

需要手动开启。qrscan 默认仅暴露 scan_image(接收 base64 图片字节)且绝不抓取远程 URL。若需按路径扫描,请在服务器环境变量中添加 QRSCAN_MCP_ALLOWED_DIRECTORIES 并重启 Copilot CLI 以启用 scan_file。

不会。MCP 服务器启动时会自行通过 npm 拉取专属引擎副本;如果您打算直接调用 Skill 中的 scripts/scan.mjs,仍需单独将 @qrcode-ai-com/qrcode-barcode-scanner 安装至 .qrcode-barcode-scanner-runtime。

不会。qrscan 会将准确的 content.text 与 content.raw 作为不可信数据返回,绝不自动访问解码出的网址,也不会把二维码中的文本视为指令。

依次执行 copilot plugin uninstall qrcode-barcode-scanner 与 copilot plugin marketplace remove qrcode-ai-com 即可彻底卸载。

解码全程在本地 Node.js 22.19+ 或 24+ 环境中执行(Copilot 会将对话文本发送至您配置的模型)。当前插件、Skill、MCP 服务器与引擎版本均免费且采用 MIT 许可,独立于 QR Code AI 付费套餐。

继续阅读其他二维码扫描器指南

阅读协议指南、切换到 GitHub Copilot 条形码指南,或浏览所有二维码集成方案。

二维码扫描器 Skill

查阅 SKILL.md、Node 辅助脚本、退出码说明以及独立的原生引擎配置方式。

阅读 Skill 指南