Skip to main content
Agent skill

Generate Qr

Generate a QR code from a URL, text, Wi-Fi credentials, or vCard and save it as SVG or PNG. Supports solid colors, linear/radial gradients, decorative templates, logos, and all dot/eye/corner patterns. Use when the user says "create a QR code", "generate a QR for this URL", "make a Wi-Fi QR", "build a branded QR with our logo", "add a gradient to the QR", "use the Arrow template", or needs to automate QR code creation in a workflow.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Generate Qr when an AI agent needs a reusable SKILL.md workflow for this job: Generate a QR code from a URL, text, Wi-Fi credentials, or vCard and save it as SVG or PNG. Supports solid colors, linear/radial gradients, decorative templates, logos, and all dot/eye/corner patterns. Use when the user says "create a QR code", "generate a QR for this URL", "make a Wi-Fi QR", "build a branded QR with our logo", "add a gradient to the QR", "use the Arrow template", or needs to automate QR code creation in a workflow.

When not to use it

Skip Generate Qr when the task is outside the creativity category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/generate-qr
# Save SKILL.md to ~/.claude/skills/generate-qr/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/generate-qr/SKILL.md. For a shared project, commit the folder at .claude/skills/generate-qr/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Generate Qr skill for this task: Use Generate Qr when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

69/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
77/100
Practical detail
68/100
Source evidence
54/100
Source signals
70/100
Model compatibility evidence
  • claudeuntested

    No model-specific signal or recorded compatibility test was found.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Generate QR Code

Generate a styled, scannable QR code as SVG or PNG using the [`@qrdx/cli`](https://www.npmjs.com/package/@qrdx/cli) package (its command is `qrdx`; the `qrdx` npm package itself is the React library).

## Usage

```bash npx @qrdx/cli generate "<data>" -o <output> [flags] ```

**Arguments:** - `<data>` — URL or text to encode (required). Wrap in quotes. - `-o <path>` — Output file path. Extension sets format: `.svg` or `.png` (defaults to `qr.svg`)

**Flags (all optional):**

| Flag | Default | Description | |------|---------|-------------| | `--size <px>` | `512` | Output pixel size | | `--level <L\|M\|Q\|H>` | `Q` | Error correction level | | `--body <pattern>` | `square` | Body dot pattern | | `--eye <pattern>` | `square` | Corner eye pattern | | `--dot <pattern>` | `square` | Corner dot pattern | | `--fg <color>` | `#000000` | Foreground color (hex or JSON gradient) | | `--bg <color>` | `#ffffff` | Background color (hex or JSON gradient) | | `--eye-color <color>` | matches `--fg` | Corner eye color (hex or JSON gradient) | | `--dot-color <color>` | matches `--fg` | Corner dot color (hex or JSON gradient) | | `--logo <url>` | — | Center logo image URL (use with `--level H`) | | `--margin <n>` | `0` | Quiet zone margin in modules | | `--template <id>` | — | Decorative template wrapper (case-sensitive) |

## Patterns

**Body** (`--body`): `square` `circle` `circle-large` `diamond` `circle-mixed` `pacman` `rounded` `small-square` `vertical-line`

**Eye** (`--eye`): `square` `rounded` `gear` `circle` `diya` `extra-rounded` `message` `pointy` `curly`

**Dot** (`--dot`): `square` `rounded` `circle` `diamond` `message` `message-reverse` `diya` `diya-reverse` `rounded-triangle` `star` `banner`

## Gradients

Pass a JSON object to `--fg`, `--bg`, `--eye-color`, or `--dot-color` to use a gradient instead of a solid color.

**Linear gradient** — flows at a given angle (0° = left→right, 90° = top→bottom): ```bash --fg '{"type":"linear","stops":[{"color":"#6366f1","offset":0},{"color":"#ec4899","offset":100}],"angle":135}' ```

**Radial gradient** — radiates from the center outward: ```bash --fg '{"type":"radial","stops":[{"color":"#facc15","offset":0},{"color":"#ef4444","offset":100}]}' ```

**Stops:** minimum 2 required; each stop has `color` (hex) and `offset` (0–100 as a percentage). **Tip:** use `--level H` when combining gradients with a logo for maximum error recovery.

## Templates

Templates add a decorative SVG wrapper around the QR code. Pass the template ID to `--template`.

| ID | Description | |----|-------------| | `Arrow` | Adds a curved arrow pointing to the QR code | | `StandardBox` | Framed box with a clean border | | `SquareBorder` | Bold square border around the QR | | `StrikedBox` | Box with diagonal strike decoration | | `Halloween` | Spooky Halloween-themed frame |

Templates can be combined with any other flags (patterns, colors, gradients, logo).

## Examples

```bash # Basic URL → SVG npx @qrdx/cli generate "https://qrdx.dev" -o qr.svg

# High-res PNG for print npx @qrdx/cli generate "https://qrdx.dev" -o qr.png --size 2048 --level H

# Branded style with custom patterns npx @qrdx/cli generate "https://qrdx.dev" -o branded.svg \ --fg "#1a1a2e" --bg "#f5f5f5" --body circle --eye rounded --dot star

# With center logo (use --level H for best scanability) npx @qrdx/cli generate "https://qrdx.dev" -o logo-qr.svg \ --logo "https://qrdx.dev/logo.png" --level H

# Linear gradient foreground npx @qrdx/cli generate "https://qrdx.dev" -o gradient.svg \ --fg '{"type":"linear","stops":[{"color":"#6366f1","offset":0},{"color":"#ec4899","offset":100}],"angle":135}'

# Radial gradient background npx @qrdx/cli generate "https://qrdx.dev" -o radial-bg.svg \ --bg '{"type":"radial","stops":[{"color":"#fef9c3","offset":0},{"color":"#fde047","offset":100}]}'

# Gradient fg + gradient eye color npx @qrdx/cli generate "https://qrdx.dev" -o multi-gradient.svg \ --fg '{"type":"linear","stops":[{"color":"#0ea5e9","offset":0},{"color":"#6366f1","offset":100}],"angle":90}' \ --eye-color '{"type":"radial","stops":[{"color":"#f97316","offset":0},{"color":"#ef4444","offset":100}]}'

# Arrow template npx @qrdx/cli generate "https://qrdx.dev" -o arrow.svg --template Arrow

# Halloween template with spooky styling (keep a light background so it scans) npx @qrdx/cli generate "https://qrdx.dev" -o halloween.svg \ --template Halloween --body circle --eye gear --dot star \ --fg "#1a0a00"

# Combined: template + gradient + logo npx @qrdx/cli generate "https://qrdx.dev" -o full.svg \ --template StandardBox --level H \ --fg '{"type":"linear","stops":[{"color":"#1e3a5f","offset":0},{"color":"#3b82f6","offset":100}],"angle":45}' \ --logo "https://qrdx.dev/logo.png"

# Wi-Fi QR npx @qrdx/cli generate "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;" -o wifi.svg

# vCard npx @qrdx/cli generate "BEGIN:VCARD VERSION:3.0 FN:Jane Smith TEL:+15551234567 EMAIL:[email protected] END:VCARD" -o contact.svg ```

## Present Results to User

After generating, tell the user:

``` QR code saved to **{outputPath}** ({format}, {size}×{size}px). ```

If SVG: mention it can be embedded in HTML or scaled to any size without quality loss. If PNG: mention the pixel dimensions. If a template was used: name the template. If gradients were used: briefly describe the effect (e.g. "indigo-to-pink diagonal gradient").

## Troubleshooting

Invalid input makes the CLI exit with code `1` and a message on stderr; nothing is written.

**`No data to encode`** — The data string is missing. Wrap multi-line values (vCard, Wi-Fi) in quotes.

**`Invalid --body "…"` / `--eye` / `--dot` / `--level` / `--template`** — The message lists the accepted values. Template IDs are case-sensitive: `Arrow`, not `arrow`.

**`Invalid gradient JSON` / `Invalid gradient`** — Single-quote the JSON in the shell, use double quotes inside it, and give at least 2 stops with `offset` 0–100. Validate with `echo '<json>' | python3 -m json.tool`.

**`Unsupported output format`** — Only `.svg` and `.png` are supported.

**`Could not download logo`** — The `--logo` URL must be publicly accessible. Use a direct image URL (`.png`, `.svg`, `.jpg`).

**`PNG output needs the sharp package`** — sharp's native binary did not install on this platform. Use `.svg`, or reinstall following https://sharp.pixelplumbing.com/install.

**QR code does not scan** — Use `--level H` with a logo, prefer `square` or `rounded` eyes, keep strong contrast between `--fg` and `--bg`, and add `--margin 4` if the code will sit on a dark or busy background.

Intended uses

  • Use Generate Qr when this documented workflow matches the task.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.