QR Code Workshop · QR Studio
Deterministically generate a QR code from a piece of content or, on demand, a Warm Academic poster PNG. By default, only the QR code itself is output, without a header, footer, title, or plaintext; the color scheme, modules, size, error correction, and poster options can be overridden by the current request or the shared Profile.
Triggers
Activate when
- The user says “turn this link into a QR code”, “make a QR code according to my preferences”, or “generate a scannable QR code poster”.
- The user wants to encode text, a URL, Wi-Fi configuration, or other UTF-8 content into a PNG QR code.
- The user asks to “create a QR code”, “make a branded QR poster”, or “use my saved QR preferences”.
Do not activate when
- The user wants to identify, decode, or bulk-extract existing QR code content; use the QR code recognition capability.
- The user wants to decorate an existing image but does not need a QR code generated; hand it off to .
- The user wants to generate an illustration or Logo, or modify the webpage targeted by the QR code; hand it off to the appropriate image or engineering capability.
User Profile (cross-session)
At the start of every run, read
and the shared
. Resolve configuration in this order: current request, project context,
skills.lov-create-qrcode.records
, shared Preferences, brand Profile, and safe defaults. See
references/style-contract.md
for the specific fields and allowed values.
Only long-term preferences explicitly stated by the user may be saved via
scripts/profile_store.py record --confirm
. Values inferred from brand assets, historical outputs, or the current project are used only for the current task. Do not store QR code payloads, Wi-Fi passwords, tokens, or other secrets.
Skill Group Composition
Before running, read
references/skill-composition.md
. Adjacent Skills exchange only images, Logos, or validated local files and do not constitute hidden runtime dependencies.
Workflow (MANDATORY)
Step 0: Resolve root, dependencies, and preferences
- Resolve from the current Skill context and confirm that the following resources exist:
$SKILL_DIR/scripts/create_qrcode.py
$SKILL_DIR/scripts/profile_store.py
$SKILL_DIR/references/style-contract.md
$SKILL_DIR/references/skill-composition.md
- Read and the Profile; do not write private paths or payloads from the Profile into the Skill source of truth.
- Check Python, , and Pillow. If the user requests scan-back verification, also check OpenCV.
Step 1: Resolve the payload and visible output
- Preserve the UTF-8 bytes of the user-provided content. Do not add a protocol, change letter case, remove query parameters, or shorten a URL without instruction.
- Pass private payloads via stdin or an input file where possible, to avoid writing them to shell history.
- When no style is specified, use the safe defaults: , , M-level error correction, and a 4-module quiet zone.
- By default, generate only a square QR code image, with no header, footer, title, caption, bordered poster, or plaintext payload.
- Enable only when the user explicitly requests a poster, title, or caption; enable only when the user explicitly allows the original content to be displayed. Do not switch to a poster merely because the brand Profile contains a name.
- When using a Logo, require H-level error correction, and the Logo must be a local image that the user is authorized to use.
Step 2: Generate through the deterministic CLI
Generate a regular QR code:
bash
printf '%s' 'https://example.com' | python3 "$SKILL_DIR/scripts/create_qrcode.py" \
--stdin --output ./qrcode.png --json
Generate a Warm Academic poster according to the Profile:
bash
printf '%s' 'https://example.com' | python3 "$SKILL_DIR/scripts/create_qrcode.py" \
--stdin --poster --title '扫码访问' --show-data \
--output ./qrcode-poster.png --verify scan --json
Flags in the current request always override the Profile. Use
to completely ignore the Profile.
Step 3: Verify the actual artifact
- Read back the JSON and confirm the absolute output path, PNG dimensions, byte size, SHA-256, payload byte count, and payload digest.
- Complete at least structural validation. For public delivery, printing, Logos, or custom low-contrast styles, use and confirm that the decoded content matches the input byte for byte.
- Check that the quiet zone is at least 4 modules, that the foreground is darker than the background, and that the image has not been stretched or covered.
- For posters, visually inspect the title, body-text disclosure, whitespace, and mobile readability; do not describe as scan-verified.
Output contract
- By default, output a single plain QR code PNG whose width and height equal ; include no header, footer, or poster wrapper.
- Output the poster version only when is explicitly specified; allow overwriting the exact target only when is explicitly specified.
- returns the output path, dimensions, style, error-correction level, verification mode, payload length, and digest without echoing the payload.
- On failure, leave no partial file and return a diagnosable error; a scan failure must not be downgraded to success.
Dependencies
- Python 3.10+
- 7.4+ and Pillow 9+
- Optional OpenCV Python, used only for actual scan-back verification
- No network, browser, credentials, or external sibling Skill is required
Runtime context (shared)
Field resolution order: current request, project context, Skill records, shared Preferences, brand Profile, and safe defaults. Only explicitly stated long-term preferences are written to the Profile, and the save path is reported in the result.