home / skills / dkyazzentwatwa / chatgpt-skills / qr-code-generator

qr-code-generator skill

/qr-code-generator

This skill generates QR codes from URLs, supports UTMs, captions, and PNG/SVG exports for single or batch campaigns.

npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill qr-code-generator

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
1.9 KB
---
name: qr-code-generator
description: Generate QR codes with URLs and UTM tracking. Exports PNG/SVG with captions. Use for single codes, batch generation, or marketing campaigns with tracking parameters.
---

# QR Code Generator

## What this skill does
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

## 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**.

## 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

## Workflow
1) Validate the URL (scheme + domain).
2) Optionally append UTM parameters (using `assets/templates/utm_template.json`).
3) Generate QR:
   - Error correction: M (default), H for print/complex usage
   - Border: 4 (default)
4) Export:
   - PNG (good for web)
   - SVG (best for print)
5) If caption enabled:
   - PNG: add label and/or URL under the QR
   - SVG: add a text element under the QR
6) Return links + a quick “usage notes” block (recommended minimum size, print tips).

## 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)

## Scripts in this pack
- `scripts/generate_qr.py` — single QR (PNG/SVG, optional caption)
- `scripts/batch_generate.py` — batch from CSV (id,url,label)

## Templates
- `assets/templates/utm_template.json`
- `assets/templates/print_notes.md`
- `assets/templates/prompt_snippets.md`

Overview

This skill generates QR codes from URLs and can append UTM tracking parameters for marketing campaigns. It exports high-quality PNG and SVG files with optional captions or human-readable URLs and supports single or batch generation from CSV. It includes sensible defaults for error correction and border sizing and returns usage recommendations for print and digital use.

How this skill works

It validates the provided URL, optionally appends UTM parameters from a template, and encodes the final URL into a QR code with configurable error correction and border. The skill can render captions or labels beneath the code and export assets as PNG (web/screen) and SVG (print/scale). For batches, it reads CSV rows and produces a file set per entry, then returns download links and practical usage notes.

When to use it

  • Create a single QR for a landing page, sign-up form, or app download link
  • Generate batch QR codes for printed materials, badges, or event passes from a CSV
  • Add UTM tracking to QR-scanned traffic for campaign analytics
  • Produce SVGs for print posters or large-format signage and PNGs for web use
  • Add short captions like “Scan to book” to improve scanning context

Best practices

  • Prefer HTTPS URLs and validate destination before encoding
  • Use high error correction (H) for print, complex logos, or sticker wear-and-tear
  • Choose SVG for print or large formats; use PNG for digital or small-screen display
  • Include a short human-readable label or URL to build trust and reduce scanning hesitation
  • When uncertain about link safety, confirm the destination or provide a trusted landing page

Example use cases

  • Marketing campaign: append UTM params, batch-generate codes for localized flyers, and track scans in analytics
  • Event badges: batch-create attendee QR codes from CSV, export SVG for print badges
  • Retail signage: single SVG QR with high error correction and a short caption for a product page
  • Social media posters: single PNG QR for screen display linking to a campaign landing page with UTMs

FAQ

What formats are produced and when should I use each?

PNG is ideal for screens and web embeds; SVG is best for print and large-scale output because it scales without quality loss.

How do UTM parameters get added and shown?

UTM fields are appended from a template if provided; the skill returns the final encoded URL so you can verify the tracked link before distribution.