Local QR Code Generation and Recognition for Openclaw

A high-performance local tool for generating PNG QR codes from text and decoding them from images without requiring external API keys.

jisuapi
v1.0.4
Apr 3, 2026
10
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install qrcode2

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install qrcode2 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Local QR Code Generation and Recognition?

This skill provides a privacy-focused solution for QR code management within the Openclaw Skills ecosystem. By running entirely on your local machine using Python libraries, it eliminates the need for external HTTP requests or third-party API keys, ensuring that sensitive URLs or data remain within your secure local environment.

It serves as a versatile utility for AI agents to bridge the gap between digital data and visual identifiers. Whether you need to create a scannable entry point for a marketing landing page or extract information from a provided image, this skill provides the necessary local infrastructure for robust data encoding and decoding.

Local QR Code Generation and Recognition Use Cases

  • Generating scannable PNG QR codes for marketing URLs or event pages.
  • Extracting encoded text or links from local image files for automated data processing.
  • Creating offline QR code tools within a sandbox environment for secure testing.
  • Integrating with multi-agent workflows that require visual data handoffs via image files.

How Local QR Code Generation and Recognition Works

  1. The user or agent triggers a command to either encode text into a QR code or decode an existing image file.
  2. The script invokes the local Python environment using the qrcode or OpenCV libraries based on the sub-command.
  3. For encoding, the skill processes parameters such as error correction levels and box sizes to generate a high-quality PNG file.
  4. For decoding, the skill utilizes OpenCV to identify QR patterns and extract the underlying data string from a provided image path.
  5. The final result, which includes either the output file path or the decoded text, is returned in a structured JSON format.

Local QR Code Generation and Recognition Setup

To use this feature within Openclaw Skills, ensure Python 3 is installed, then manually install the required dependencies:

pip install "qrcode[pil]" opencv-python

The script is located at skills/qrcode2/qrcode.py. You can generate a QR code using the following command structure:

python3 skills/qrcode2/qrcode.py encode '{"url": "https://example.com", "out": "out/my-qr.png"}'

To decode an existing image:

python3 skills/qrcode2/qrcode.py decode '{"path": "out/my-qr.png"}'

Local QR Code Generation and Recognition Data Schema & Taxonomy

The skill utilizes a structured JSON schema for inputs and outputs to ensure compatibility across the Openclaw Skills framework:

Attribute Type Description
text / url String The data content to be encoded into the QR image.
out / path String The local filesystem path for the input or output image file.
error_correction String Error resistance level (L, M, Q, H). Defaults to M.
box_size Integer The pixel size of each module (square) in the QR code.
border Integer The thickness of the white border around the code.

Local QR Code Generation and Recognition Advanced Features

  • Support for multiple error correction levels (L, M, Q, H) to optimize for different scanning environments.
  • Geometric coordinate output during decoding to identify the exact position of the QR code within an image.
  • Fully customizable visual styling including foreground (fill_color) and background (back_color) colors.
  • Seamless integration with remote API-based skills to provide hybrid local-cloud QR code services.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*