# QR Code Generate QR codes from text/URLs and decode QR codes from images. ## What it does - Encodes any text/URL into a QR PNG with configurable size, border, and error correction level. - Decodes QR codes from images using OpenCV (with a pyzbar fallback). ## Files | File | Purpose | |------|---------| | `SKILL.md` | Instructions the agent receives on activation | | `scripts/qr.py` | Encode text to a QR PNG, or decode a QR from an image | | `references/payloads.md` | Standard QR payload formats | ## Requirements - encode: `qrcode[pil]` - decode: `opencv-python-headless` (or `pyzbar` + `libzbar0`) ## License Apache-2.0. --- name: qrcode display_name: QR Code description: "Generate QR codes from text/URLs and decode QR codes found in images. Use when the user wants to create a QR code (for a link, Wi-Fi, contact, payment text) or to read/scan a QR code from a picture or screenshot. Do NOT use for generic barcode formats other than QR." license: Apache-2.0 --- # QR Code Generate QR code images from text, and decode QR codes out of images. ## When to use The user wants to (a) turn a link/text into a QR code image, or (b) read the content of a QR code in an image they provided. ## Execution steps ### Generate 1. Collect the payload (URL, plain text, Wi-Fi string, etc.). 2. Run `python scripts/qr.py encode "<payload>" -o /workspace/qr.png` — installs `qrcode[pil]` on first use and writes a PNG. Use `--size`/`--border` to tune. 3. Report the saved path. For Wi-Fi/contact payloads, see `references/payloads.md` for the exact string formats. ### Decode 1. Locate the image under `/workspace`. 2. Run `python scripts/qr.py decode /workspace/image.png` — installs `opencv-python-headless` (and `pyzbar` as fallback) and prints the decoded text. 3. Return the decoded content. If nothing is found, say so rather than guessing. ## Rules - Keep generated QR payloads short for reliable scanning; prefer a shortened URL over a very long one. - When decoding, return the exact decoded string; never fabricate a result. ## Available resources - `scripts/qr.py` — encode text to a QR PNG, or decode a QR from an image. - `references/payloads.md` — standard payload formats (URL, Wi-Fi, vCard, geo, mailto).
QR Code by langbot-team
Generate QR codes from text/URLs and decode QR codes found in images.
Loading...