Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

qr-code-maker二维码生成器

Agent Skill

qr-code-maker 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,363

周安装

228

GitHub Stars

公开资料未说明

下载量

1,879
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qr-code-maker(二维码生成器)
来源仓库:https://github.com/tobewin/qr-code-maker
安装命令:
openclaw skills install qr-code-maker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install qr-code-maker

简介

二维码生成器支持多种数据类型与视觉定制选项。

  • 适用于个性化海报、产品包装及活动宣传物料设计。
  • 通过 clawhub 安装,命令为 openclaw skills install qr-code-maker,输出 PNG/SVG 格式。
  • 使用前请确认数据准确性,错误信息将导致扫码失败。
  • 建议预览小样后再批量生成,避免资源浪费。

SKILL.md

name
qr-generator
description
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/SVG). 二维码生成、QR码制作。
version
1.0.1
license
MIT-0
metadata
{"openclaw": {"emoji": "📱", "requires": {"bins": ["python3"]}}}
dependencies
pip install qrcode pillow

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

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.32%
按下载量换算1,415

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills