qr-code

Generate a 512x512 PNG QR code from a URL via run_js.

24.4k|2.6k|Updated Mar 31, 2025
One-click install
npx skills add https://github.com/google-ai-edge/gallery --skill qr-code-google-ai-edge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qr-code
Source: https://github.com/google-ai-edge/gallery/tree/main/Android/src/app/src/main/assets/skills/qr-code
Command: npx skills add https://github.com/google-ai-edge/gallery --skill qr-code-google-ai-edge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires qrcodejs, and includes scripts (resource) components.

What problem does it solve?

Turns a URL into a scannable QR code on-device, enabling offline sharing and quick access without a server.

Core Features & Use Cases

  • Generate QR codes from URLs directly on the device for offline apps and prints.
  • Support for optional shaping (square by default, can apply circular clipping) to fit branding.
  • Returns a base64-encoded PNG image suitable for embedding in apps or web pages.

Quick Start

Use run_js with data: '{"url":"https://example.com"}' to generate the QR code.

Frequently Asked Questions about qr-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a QR code from a URL on-device without a server?

You can generate a QR code from a URL on-device by running a script locally that converts the link into a scannable image without needing a server connection. This process returns a base64-encoded PNG image.

Can I create a circular QR code instead of a square shape?

Yes, you can create a circular QR code by passing an optional shape parameter to apply circular clipping. By default, the generation process outputs a square QR code image.

What image format and size does the QR code output use?

The QR code output uses a 512x512 pixel PNG image format. The resulting image is returned as a base64 data URL, making it suitable for direct embedding in web pages or apps.

Does generating QR codes offline require any external dependencies?

Generating QR codes offline utilizes the qrcodejs library to handle the conversion process. This allows the on-device script to turn URLs into images without relying on an external server.

Why use an on-device QR code generator for offline sharing?

Using an on-device QR code generator for offline sharing allows you to quickly convey links for device-to-device transfers or printed materials without requiring an active internet connection.