home / skills / aidotnet / moyucode / barcode-generator

barcode-generator skill

/skills/tools/barcode-generator

This skill generates barcodes in Code128, EAN-13, UPC, Code39 and more, enabling quick product code creation and asset labeling.

npx playbooks add skill aidotnet/moyucode --skill barcode-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
897 B
---
name: barcode-generator
description: 生成各种条形码格式,包括Code128、EAN、UPC等。
metadata:
  short-description: 生成条形码
source:
  repository: https://github.com/WhyNotHugo/python-barcode
  license: MIT
---

# Barcode Generator Tool

## Description
Generate various barcode formats including Code128, EAN-13, UPC-A, Code39, and more.

## Trigger
- `/barcode` command
- User needs to generate barcodes
- User wants product codes

## Usage

```bash
# Generate Code128 barcode
python scripts/barcode_generator.py "ABC123" --format code128 --output barcode.png

# Generate EAN-13
python scripts/barcode_generator.py "5901234123457" --format ean13

# Generate with custom size
python scripts/barcode_generator.py "12345" --format code39 --width 400 --height 100
```

## Tags
`barcode`, `code128`, `ean`, `upc`, `generator`

## Compatibility
- Codex: ✅
- Claude Code: ✅

Overview

This skill generates high-quality barcodes in common industry formats such as Code128, EAN-13, UPC-A, Code39 and more. It produces image outputs (PNG, SVG) with configurable size and encoding options so you can embed barcodes in labels, packaging, or digital assets. The interface supports command-style inputs and programmatic calls for quick integration into workflows.

How this skill works

Provide the data string and choose a barcode format; the generator validates the input against format rules (length, checksum) and renders the barcode as an image. Options allow control of output type (PNG or SVG), dimensions, resolution, and quiet zone margins. The tool can be called interactively or invoked programmatically to batch-generate files for product catalogs and inventories.

When to use it

  • Create product labels with EAN-13 or UPC-A for retail distribution
  • Generate Code128 barcodes for internal tracking numbers, invoices, or shipping
  • Produce Code39 barcodes for simple alphanumeric identifiers on assets
  • Batch-generate barcode images for catalogs, packing slips, or CSV imports
  • Export scalable SVG barcodes when you need lossless printing at various sizes

Best practices

  • Validate input length and check digits before generating to avoid invalid barcodes
  • Choose SVG for print or scaling; choose PNG for quick raster display on web or apps
  • Set appropriate resolution and quiet zone margins for reliable scanner readability
  • Keep encoded data as compact as possible to maintain barcode density and scan success
  • Test generated barcodes with the target scanners or mobile apps before mass printing

Example use cases

  • Generate EAN-13 images for each SKU in an ecommerce product feed
  • Create Code128 barcodes for shipment tracking numbers and print on labels
  • Produce UPC-A barcodes for retail items being submitted to marketplaces
  • Batch convert a CSV of product codes into individual PNG files for packaging
  • Export SVG barcodes for high-resolution print assets like tags or brochures

FAQ

Which barcode formats are supported?

Common formats are supported including Code128, EAN-13, UPC-A, Code39 and others; available formats depend on the chosen encoder at runtime.

Can I control output image size and format?

Yes. You can specify width, height, resolution and choose between raster (PNG) and vector (SVG) outputs for different use cases.