home / skills / dkyazzentwatwa / chatgpt-skills / qr-barcode-reader
This skill decodes and extracts data from QR codes and barcodes in images, supporting multiple formats and batch processing for rapid data capture.
npx playbooks add skill dkyazzentwatwa/chatgpt-skills --skill qr-barcode-readerReview the files below or copy the command above to add this skill to your agents.
---
name: qr-barcode-reader
description: Use when asked to scan, decode, read, or extract data from QR codes or barcodes in images.
---
# QR/Barcode Reader
Decode and extract data from QR codes and barcodes in images with support for multiple barcode formats.
## Purpose
Barcode scanning for:
- Inventory management and tracking
- Product information lookup
- Document verification
- Event check-in systems
- Automated data entry
## Features
- **Multiple Formats**: QR Code, EAN-13, Code128, Code39, UPC-A, DataMatrix
- **Batch Processing**: Scan multiple images in one operation
- **Data Extraction**: Decode to text, URLs, structured data
- **Image Preprocessing**: Auto-rotation, enhancement for better recognition
- **Validation**: Verify barcode checksums
- **Export**: JSON, CSV output with decoded data
## Quick Start
```python
from qr_barcode_reader import QRBarcodeReader
# Read QR code
reader = QRBarcodeReader()
result = reader.read_image('qr_code.png')
print(result.data) # Decoded text
# Batch read directory
results = reader.read_directory('images/', formats=['qr', 'ean13'])
```
## CLI Usage
```bash
# Read single image
python qr_barcode_reader.py image.png
# Batch read directory
python qr_barcode_reader.py images/*.png --output results.json
```
This skill decodes and extracts data from QR codes and common barcode formats in images. It supports multiple formats, batch processing, image preprocessing, and export to JSON or CSV. Use it to automate scanning workflows, validate barcodes, and pull structured data from photos or scans.
The reader inspects images for barcode patterns across formats like QR, EAN-13, Code128, Code39, UPC-A, and DataMatrix. It applies preprocessing (auto-rotation and image enhancement), decodes found barcodes, verifies checksums where applicable, and returns structured results including raw text, URLs, format type, and image coordinates. Batch mode processes directories and produces consolidated exports.
Which barcode formats are supported?
QR Code, EAN-13, Code128, Code39, UPC-A, and DataMatrix are supported. You can limit formats to speed processing.
Can it handle rotated or low-contrast images?
Yes. The skill includes auto-rotation and enhancement steps to improve recognition on rotated or low-contrast images.
How are results returned?
Results include decoded text, format type, checksum status when applicable, and image coordinates. You can export to JSON or CSV for integration.