Generated banner for Qr Code
Generated logo for Qr Code

Qr Code

Google AI EdgeOfficialPublished by Google AI Edge

  • Skill
  • Content generator
  • Automation and integrations
  • Apache-2.0
  • No issues found

From the author

Generates a QR code for the given url.
— the description by Google AI Edge

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill allows users to quickly create a QR code for any given URL. By utilizing a specific JavaScript execution environment, the agent processes the input URL and generates a scannable QR code representation.

What it does

  • Accepts a URL as input
  • Generates a QR code image
  • Uses a JavaScript execution tool to process the request

When to use it

  • When you need to create a scannable QR code for a website
  • When you want to convert a long URL into a compact visual format

Advantages

  • Simple and direct generation process
  • Automates the creation of QR codes within the agent interface

Usage examples

“Generate a QR code for my website.”
The agent will prompt for the URL and then generate a QR code image that directs users to that specific address.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google-ai-edge/qr-code/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip qr-code.zip -d .agents/skills

Documentation by Google AI Edge

Instructions

You MUST use the run_js tool with the following exact parameters:

  • data: A JSON string with the following fields:

    • url: String - the url to create QR code for

Files

scripts/index.html

<!--
@license
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>QR Code Generator</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js" defer></script>
</head>
<body>
    <div id="qrcode-container" style="display: none;"></div>
    <canvas id="qr-canvas" style="display: none;"></canvas>


    <script>
        window['ai_edge_gallery_get_result'] = async function(data, secret) {
    try {
        const params = JSON.parse(data);
        const url = params.url;
        const shape = params.shape || 'square';

        if (!url) throw new Error("URL is required.");

        const container = document.getElementById('qrcode-container');
        container.innerHTML = '';

        // 1. Generate QR Code
        const qrcode = new QRCode(container, {
            text: url,
            width: 512,
            height: 512,
            correctLevel: QRCode.CorrectLevel.H
        });

        // 2. Wait for the CANVAS to exist (instead of the IMG)
        const qrElement = await new Promise((resolve, reject) => {
            let attempts = 0;
            const check = setInterval(() => {
                // Look for canvas first, fallback to img
                const canvas = container.querySelector('canvas');
                const img = container.querySelector('img');

                // Ensure the canvas is actually drawn (not just created)
                if (canvas) {
                    clearInterval(check);
                    resolve(canvas);
                } else if (img && img.src && img.src.length > 10) {
                    clearInterval(check);
                    resolve(img);
                }

                if (attempts++ > 100) { // Timeout after 5 seconds
                    clearInterval(check);
                    reject(new Error("QR Generation timed out"));
                }
            }, 50);
        });

        // 3. Handle Shaping
        const finalCanvas = document.getElementById('qr-canvas');
        const ctx = finalCanvas.getContext('2d');
        finalCanvas.width = 512;
        finalCanvas.height = 512;

        ctx.clearRect(0, 0, 512, 512); // Clear previous draws

        if (shape === 'circle') {
            ctx.beginPath();
            ctx.arc(256, 256, 256, 0, Math.PI * 2);
            ctx.closePath();
            ctx.clip();
        }

        // 4. Draw directly from the source element
        ctx.drawImage(qrElement, 0, 0, 512, 512);

        const finalBase64 = finalCanvas.toDataURL('image/png');

        return JSON.stringify({
            result: JSON.stringify({ status: "success", message: "Generated" }),
            image: { base64: finalBase64 },
            error: null
        });

    } catch (err) {
        return JSON.stringify({ result: null, image: null, error: err.message });
    }
};
    </script>
</body>
</html>

Requirements and compatibility

Written for: Google AI Edge Gallery

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google AI Edge
Publisher
Google AI Edge (Official)
Source
google-ai-edge/gallery · skills/built-in/qr-code · commit 3972f06
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google AI Edge.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download qr-code.zip