---
name: qr-code
description: >
  Generate QR codes from URLs, Wi-Fi credentials, contacts (vCard), email/SMS links,
  or plain text. Writes the PNG under output/qr/ and tells the operator its path.
  Trigger phrases: "QR code", "generate a QR", "create a QR", "make a QR code for",
  or any request to share data as a scannable code.
---

# QR Code Generation

Generate QR codes from user-provided data and deliver by stating the file path.

## When to Activate

- User asks to generate, create, or make a QR code
- User wants to share a URL, Wi-Fi password, or contact details as a scannable code
- Any mention of "QR" in the context of creating one

## Behaviour

Infer the data type from the user's input. For structured types (Wi-Fi, vCard), collect any missing fields conversationally and confirm the structured data before encoding. For simple types (URL, plain text, email, SMS), encode directly.

Generate the QR image by calling the `qr-generate` tool with the encoded data string as the `data` parameter. The tool writes the PNG under `output/qr/` and returns the path. Tell the operator the path so they can retrieve it from the Artefacts panel or file share.

If the tool returns an error, report the message to the user and suggest corrections (e.g., data too long, invalid format).

## Boundaries

- Generates one QR code per request. Bulk generation is not supported.
- No branded/styled QR codes (logo overlays, custom colours).
- Does not scan or read existing QR codes.

## References

Load `references/data-formats.md` for encoding formats, CLI invocation patterns, and supported options.
