Qr Generator

v1.0.1

QR code generator. Use when user needs to create QR codes for text, URLs, WiFi, vCards, or any data. Supports custom colors, sizes, logos, and formats (PNG/S...

0· 181·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for tobewin/qr-code-maker.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Qr Generator" (tobewin/qr-code-maker) from ClawHub.
Skill page: https://clawhub.ai/tobewin/qr-code-maker
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install qr-code-maker

ClawHub CLI

Package manager switcher

npx clawhub@latest install qr-code-maker
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the requested runtime artifacts: python3 and Python QR/image libraries (qrcode, Pillow) are reasonable and expected for generating QR codes. No unrelated binaries, credentials, or config paths are requested.
Instruction Scope
SKILL.md contains a focused Python script template and prompts for user-provided content/options (type, content, format, size, colors, logo). The script only reads a user-supplied logo path (if provided) and writes an output image. There are no instructions to collect system files, read environment secrets, or transmit data to external endpoints.
Install Mechanism
This is an instruction-only skill with no install spec. The header lists dependencies as "pip install qrcode pillow" — reasonable, but because installation is unspecified the agent may run pip at runtime to fetch packages from PyPI. That is expected for this tool but does involve network package installs; no arbitrary third-party download URLs are used.
Credentials
No environment variables, credentials, or config paths are requested. The skill does not require unrelated secrets or excessive access.
Persistence & Privilege
always is false and the skill does not request persistent or elevated privileges. It does not modify other skills or system-wide settings. Autonomous invocation is enabled (platform default) but not combined with other concerning factors.
Assessment
This skill appears coherent and implements a QR generator using Python and common libraries. Before installing or running it: 1) be aware the agent may pip-install qrcode and Pillow from PyPI at runtime (network download/install). 2) If you supply a logo path, the script will read that file — avoid pointing it at sensitive local files. 3) Review or run the provided Python template in a sandbox or isolated environment if you want to verify behavior. 4) Do not include secrets (passwords, API keys) in QR content unless you understand the security implications. Overall the skill is consistent with its description, but exercise normal caution for runtime package installs and file access.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📱 Clawdis
Binspython3
latestvk97cs0rmjphdjpsxndm5q2txn183gy83
181downloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

QR Generator

Professional QR code generator with custom styling and multiple data formats.

Features

  • 📱 Multiple Formats: Text, URL, WiFi, vCard, Email, SMS
  • 🎨 Custom Styling: Colors, size, error correction
  • 🖼️ Logo Embedding: Add logo to center of QR code
  • 📐 Flexible Output: PNG, SVG, PDF formats
  • 🌍 Multi-Language: Supports all Unicode text
  • Cross-Platform: Windows, macOS, Linux

Supported QR Types

TypeUse CaseExample
TextSimple text"Hello World"
URLWebsite links"https://example.com"
WiFiAuto-connectSSID + Password
vCardContact infoName, Phone, Email
EmailSend emailmailto:user@example.com
SMSSend SMSsms:+1234567890
PhoneCall numbertel:+1234567890
GeoLocationgeo:lat,lng

Trigger Conditions

  • "生成二维码" / "Generate QR code"
  • "创建二维码" / "Create QR code"
  • "WiFi二维码" / "WiFi QR code"
  • "名片二维码" / "vCard QR code"
  • "qr-generator"

Step 1: Understand Requirements

请提供以下信息:

内容类型:(文本/URL/WiFi/名片/其他)
具体内容:
输出格式:(PNG/SVG)
尺寸要求:(小/中/大/自定义)
颜色要求:(默认/自定义)
是否需要Logo:

Step 2: Generate QR Code

Python Script Template

python3 << 'PYEOF'
import os
import qrcode
from qrcode.image.styledpil import StyledPilImage
from qrcode.image.styles.moduledrawers import (
    SquareModuleDrawer,
    CircleModuleDrawer,
    RoundedModuleDrawer
)
from qrcode.image.styles.colormasks import (
    SolidFillColorMask,
    RadialGradiantColorMask,
    SquareGradiantColorMask
)
from PIL import Image

class QRGenerator:
    def __init__(self):
        self.qr = qrcode.QRCode(
            version=1,
            error_correction=qrcode.constants.ERROR_CORRECT_H,
            box_size=10,
            border=4,
        )
    
    def generate_text(self, text, output_path, **kwargs):
        """Generate QR code for text"""
        return self._generate(text, output_path, **kwargs)
    
    def generate_url(self, url, output_path, **kwargs):
        """Generate QR code for URL"""
        return self._generate(url, output_path, **kwargs)
    
    def generate_wifi(self, ssid, password, security='WPA', output_path=None, **kwargs):
        """Generate QR code for WiFi"""
        wifi_string = f'WIFI:T:{security};S:{ssid};P:{password};;'
        return self._generate(wifi_string, output_path, **kwargs)
    
    def generate_vcard(self, name, phone='', email='', org='', output_path=None, **kwargs):
        """Generate QR code for vCard"""
        vcard = f"""BEGIN:VCARD
VERSION:3.0
N:{name}
FN:{name}
TEL:{phone}
EMAIL:{email}
ORG:{org}
END:VCARD"""
        return self._generate(vcard, output_path, **kwargs)
    
    def generate_email(self, email, subject='', body='', output_path=None, **kwargs):
        """Generate QR code for email"""
        mailto = f'mailto:{email}'
        if subject or body:
            mailto += '?'
            params = []
            if subject:
                params.append(f'subject={subject}')
            if body:
                params.append(f'body={body}')
            mailto += '&'.join(params)
        return self._generate(mailto, output_path, **kwargs)
    
    def generate_phone(self, phone, output_path=None, **kwargs):
        """Generate QR code for phone call"""
        return self._generate(f'tel:{phone}', output_path, **kwargs)
    
    def generate_sms(self, phone, message='', output_path=None, **kwargs):
        """Generate QR code for SMS"""
        sms = f'sms:{phone}'
        if message:
            sms += f'?body={message}'
        return self._generate(sms, output_path, **kwargs)
    
    def _generate(self, data, output_path, 
                  fill_color='black', 
                  back_color='white',
                  size=10,
                  style='square',
                  logo_path=None):
        """Generate QR code with options"""
        
        # Reset QR code
        self.qr.clear()
        self.qr.add_data(data)
        self.qr.make(fit=True)
        
        # Set colors
        if isinstance(fill_color, str):
            fill_color = self._hex_to_rgb(fill_color)
        if isinstance(back_color, str):
            back_color = self._hex_to_rgb(back_color)
        
        # Choose module drawer
        drawers = {
            'square': SquareModuleDrawer(),
            'circle': CircleModuleDrawer(),
            'rounded': RoundedModuleDrawer()
        }
        drawer = drawers.get(style, SquareModuleDrawer())
        
        # Generate image
        img = self.qr.make_image(
            image_factory=StyledPilImage,
            module_drawer=drawer,
            color_mask=SolidFillColorMask(
                back_color=back_color,
                front_color=fill_color
            )
        )
        
        # Convert to PIL Image
        img = img.convert('RGBA')
        
        # Resize if needed
        if size != 10:
            new_size = img.size[0] * size // 10
            img = img.resize((new_size, new_size), Image.LANCZOS)
        
        # Add logo if provided
        if logo_path and os.path.exists(logo_path):
            img = self._add_logo(img, logo_path)
        
        # Save
        img.save(output_path)
        return output_path
    
    def _add_logo(self, qr_img, logo_path, logo_size_ratio=0.2):
        """Add logo to center of QR code"""
        logo = Image.open(logo_path).convert('RGBA')
        
        # Calculate logo size
        qr_width, qr_height = qr_img.size
        logo_size = int(min(qr_width, qr_height) * logo_size_ratio)
        logo = logo.resize((logo_size, logo_size), Image.LANCZOS)
        
        # Calculate position
        logo_pos = ((qr_width - logo_size) // 2, (qr_height - logo_size) // 2)
        
        # Create white background for logo
        logo_bg = Image.new('RGBA', (logo_size + 10, logo_size + 10), (255, 255, 255, 255))
        bg_pos = ((qr_width - logo_size - 10) // 2, (qr_height - logo_size - 10) // 2)
        
        # Paste
        qr_img.paste(logo_bg, bg_pos)
        qr_img.paste(logo, logo_pos, logo)
        
        return qr_img
    
    def _hex_to_rgb(self, hex_color):
        """Convert hex color to RGB tuple"""
        hex_color = hex_color.lstrip('#')
        return tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))

# Example usage
generator = QRGenerator()

output_dir = os.environ.get('OPENCLAW_WORKSPACE', os.getcwd())

# Text QR
generator.generate_text(
    'Hello World!',
    os.path.join(output_dir, 'qr_text.png')
)

# URL QR
generator.generate_url(
    'https://github.com',
    os.path.join(output_dir, 'qr_url.png'),
    fill_color='#1a365d'
)

# WiFi QR
generator.generate_wifi(
    ssid='MyWiFi',
    password='password123',
    output_path=os.path.join(output_dir, 'qr_wifi.png'),
    fill_color='#3182ce'
)

# vCard QR
generator.generate_vcard(
    name='John Doe',
    phone='+1234567890',
    email='john@example.com',
    org='Example Corp',
    output_path=os.path.join(output_dir, 'qr_vcard.png')
)

print(f"✅ QR codes generated in: {output_dir}")
PYEOF

QR Code Types (二维码类型)

WiFi QR Code

# Format: WIFI:T:{security};S:{ssid};P:{password};H:{hidden};;

# WPA/WPA2
WIFI:T:WPA;S:MyNetwork;P:MyPassword;;

# WEP
WIFI:T:WEP;S:MyNetwork;P:MyPassword;;

# No password
WIFI:T:nopass;S:MyNetwork;;

vCard QR Code

# Format: vCard 3.0
BEGIN:VCARD
VERSION:3.0
N:Lastname;Firstname
FN:Firstname Lastname
TEL:+1234567890
EMAIL:email@example.com
ORG:Company Name
TITLE:Job Title
URL:https://example.com
ADR:;;Street;City;State;Zip;Country
END:VCARD

Email QR Code

# Format: mailto:{email}?subject={subject}&body={body}
mailto:contact@example.com?subject=Hello&body=Message

Styling Options (样式选项)

Colors

# Solid colors
fill_color='#000000'  # Black
fill_color='#1a365d'  # Dark blue
fill_color='#3182ce'  # Blue

# Gradients (advanced)
color_mask=RadialGradiantColorMask(
    back_color=(255, 255, 255),
    center_color=(0, 0, 0),
    edge_color=(100, 100, 100)
)

Module Styles

# Square (default)
style='square'

# Circle
style='circle'

# Rounded
style='rounded'

Sizes

# Small (for mobile)
size=5

# Medium (default)
size=10

# Large (for print)
size=20

# Custom pixels
box_size=15  # Each module = 15 pixels

Security Notes

  • ✅ No network calls or external endpoints
  • ✅ No credentials or API keys required
  • ✅ Local file processing only
  • ✅ Open source dependencies (qrcode, pillow)
  • ✅ No data uploaded to external servers

Notes

  • QR codes support up to 4,296 alphanumeric characters
  • Error correction levels: L(7%), M(15%), Q(25%), H(30%)
  • Higher error correction = more reliable but larger size
  • Logo embedding reduces error correction capacity

Comments

Loading comments...