Install
openclaw skills install qrcodeGenerate styled QR codes (SVG/PNG/JPG) from user input. Supports custom module color, background, dot shape and eye shape, and many output options.
openclaw skills install qrcodeGenerate customizable QR codes from text or URLs. Supports multiple formats (SVG/PNG/JPG) with styling options.
After generating QR codes, you MUST:
# Basic usage (auto-generated filename)
node {baseDir}/scripts/generate.mjs "Hello World"
# Custom styled QR code
node {baseDir}/scripts/generate.mjs "https://example.com" -o myqr.svg --dot circle --eye rounded --color "#2563eb"
# High-resolution transparent PNG
node {baseDir}/scripts/generate.mjs "Contact Info" --format png --size 2048 --transparent
# Print-quality JPEG
node {baseDir}/scripts/generate.mjs "https://example.com" --format jpg -o qr.jpg --size 2048 --quality 95
-o, --out <filename> - Output filename (workspace root only). Default: qrcode_<text>_<timestamp>.<ext>--format <svg|png|jpg> - Output format (default: svg)--size <px> - Base pixel size (default: 1024, max: 10000)--scale <n> - Resolution multiplier (default: 1, max: 10)--margin <modules> - Quiet zone size (default: 4, max: 100)--dot <square|circle> - Data module shape (default: square)--eye <square|circle|rounded> - Finder pattern style (default: square)--color <#RRGGBB> - Foreground color (default: #000000)--background <#RRGGBB> - Background color (default: #ffffff)--transparent - Transparent background (PNG only, ignored for SVG/JPG)--ec <L|M|Q|H> - Error correction: Low/Medium/Quality/High (default: M)
--quality <1-100> - JPEG compression quality (default: 80)Security-enforced workspace root output:
-o ../path/file.svg → workspace/file.svgcd {baseDir}
npm install
Dependencies: qrcode (matrix generation), sharp (image conversion)
Platform notes: macOS requires Xcode Command Line Tools. See sharp docs for other platforms.
node {baseDir}/scripts/generate.mjs "WIFI:S:MyNetwork;T:WPA;P:password123;;" --format png -o wifi.png --size 1024
node {baseDir}/scripts/generate.mjs "BEGIN:VCARD
VERSION:3.0
FN:John Doe
TEL:+1234567890
EMAIL:john@example.com
END:VCARD" --dot circle --eye rounded --color "#1e40af" --background "#eff6ff" -o contact.svg
node {baseDir}/scripts/generate.mjs "https://example.com" --format jpg --size 4096 --quality 95 --ec H -o print.jpg
node {baseDir}/scripts/generate.mjs "https://example.com" --format png --size 2048 --transparent --margin 2 -o overlay.png
# Use --ec H when QR code will have logo overlay (covers ~20-30% of center)
node {baseDir}/scripts/generate.mjs "https://example.com" --format png --size 2048 --ec H -o logo-base.png
| Issue | Solution |
|---|---|
npm install fails | Install build tools:xcode-select --install (macOS) or see sharp install guide |
| QR code won't scan | Increase --size, use higher error correction (--ec H), or simplify styling |
| Colors not working | Use hex format #RRGGBB (e.g., #FF5733), not RGB or color names |
| File too large | Reduce --size, --scale, or increase --quality for JPG |
| Permission denied | Check workspace directory write permissions |
Error correction allows QR codes to remain scannable even when partially damaged or obscured:
| Level | Recovery Capacity | Data Capacity | Use Case |
|---|---|---|---|
L | ~7% damage | Maximum | Clean environments, screen display, maximum data |
M | ~15% damage | High | General use (default), standard printing |
Q | ~25% damage | Medium | Styled designs (circles/rounded), possible minor damage |
H | ~30% damage | Minimum | Logo embedding, outdoor use, heavy styling, print-on-print |
Key principle: Higher error correction = more damage tolerance but less data capacity.
When to use H level:
| Format | Transparency | Quality | File Size | Use Case |
|---|---|---|---|---|
| SVG | ✅ | Infinite | Smallest | Web, scalable graphics |
| PNG | ✅ | Lossless | Medium | Digital displays, overlays |
| JPG | ❌ | Lossy | Smallest* | Print, photos, email |
*With compression
--size 1024 for mobile (1-2m), --size 2048+ for print/posters--ec levels compensate for --dot circle or --eye rounded--transparent; JPG always uses white/specified background--quality 80-85 for print--ec H and leave center area clear (approximately 30% of QR code)| Scenario | Recommended Settings |
|---|---|
| Website URL | --format png --size 1024 --ec M |
| WiFi credentials | --format png --size 1024 --ec M |
| Business card (vCard) | --format svg --dot circle --eye rounded --ec Q |
| Print poster | --format jpg --size 4096 --quality 95 --ec H |
| Logo overlay base | --format png --size 2048 --ec H --transparent |
| Email signature | --format png --size 512 --ec M |
| Product packaging | --format svg --ec H (scalable for any print size) |
| Outdoor signage | --format jpg --size 2048+ --ec H --quality 90 |
| Social media profile | --format png --size 1024 --transparent --dot circle --ec Q |
| Payment QR (high density) | --format png --size 2048 --ec L --margin 2 (maximize capacity) |