Barcode Generation And Recognition - 条码生成识别

v1.0.3

按类型与参数生成条形码图(base64),或识别条码图内容。当用户说:生成一个 Code128 条码图、识别这张条码里的数字,或类似条码生成/识别时,使用本技能。

10· 345·0 current·0 all-time
by极速数据@jisuapi

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for jisuapi/barcode2.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Barcode Generation And Recognition - 条码生成识别" (jisuapi/barcode2) from ClawHub.
Skill page: https://clawhub.ai/jisuapi/barcode2
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: JISU_API_KEY
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 barcode2

ClawHub CLI

Package manager switcher

npx clawhub@latest install barcode2
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, required env var (JISU_API_KEY), python3 binary, SKILL.md, and the included Python script all point to using the JisuAPI barcode endpoints. The requested credential and binary are appropriate for the described functionality.
Instruction Scope
SKILL.md and barcode.py only instruct the agent to call JisuAPI endpoints for generate/read operations and to read JISU_API_KEY from environment. There are no instructions to access unrelated files, secrets, or external endpoints beyond api.jisuapi.com.
Install Mechanism
This is an instruction-only skill (no install spec). A Python script is included which issues network requests; it depends on the 'requests' package but SKILL.md does not document installing that dependency. No arbitrary downloads or unusual installers are used.
Credentials
Only JISU_API_KEY is required as the primary credential, which is consistent with using a third‑party API. No other unrelated secrets, config paths, or excessive env vars are requested.
Persistence & Privilege
Skill is not always-enabled, does not request elevated/system-wide persistence, and does not modify other skills or system configuration. It only reads the provided JISU_API_KEY from the environment at runtime.
Assessment
This skill forwards barcode data (image URLs or base64 content) to the third‑party JisuAPI service and requires your JISU_API_KEY environment variable. Only install if you trust jisuapi.com and are comfortable with barcode images/text being sent to their servers. Note: the included Python script uses the 'requests' library but the README doesn't instruct installing it — ensure your environment has requests available (pip install requests) before running. Monitor API key usage/quota and avoid sending any sensitive images or identifiers unless you accept that they will be processed by the external API.

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

Runtime requirements

🏷️ Clawdis
Binspython3
EnvJISU_API_KEY
Primary envJISU_API_KEY
latestvk9728w19ymnvspcd489359cz9n844w20
345downloads
10stars
4versions
Updated 3w ago
v1.0.3
MIT-0

极速数据条码生成识别(Jisu Barcode)

数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。

  • 生成多种类型条形码(EAN13、EAN8、CODE11、CODE128、CODE39、CODE93、GS1128、I25、ISBN、MSI、UPCA、UPCE、CODEBAR 等),返回 base64 图片内容;
  • 从条形码图片(URL 或 base64)中识别出条码类型与编号。

前置配置:获取 API Key

  1. 前往 极速数据官网 注册账号
  2. 进入 条码生成识别 API 页面,点击「申请数据」
  3. 在会员中心获取 AppKey
  4. 配置 Key:
# Linux / macOS
export JISU_API_KEY="your_appkey_here"

# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"

脚本路径

脚本文件:skills/barcode/barcode.py

使用方式

当前脚本提供 2 个子命令:

  • generate:条码生成(/barcode/generate)
  • read:条码识别(/barcode/read)

1. 条码生成(/barcode/generate)

python3 skills/barcode/barcode.py generate '{
  "type": "ean13",
  "barcode": "6901236341056",
  "fontsize": 12,
  "dpi": 72,
  "scale": 2,
  "height": 40
}'

请求字段:

字段名类型必填说明
typestring条码类型,如 ean13
barcodestring条码号
fontsizestring/int字号
dpistring/intDPI
scalestring/int比例
heightstring/int高度

返回字段(result):

字段名类型说明
typestring条码类型(如 EAN13 等)
fontsizestring字号
dpistringDPI
scalestring比例
heightstring高度
barcodestring条码图片 base64 内容

2. 条码识别(/barcode/read)

python3 skills/barcode/barcode.py read '{
  "barcode": "https://api.jisuapi.com/barcode/barcode/1471602033673149.png"
}'

请求字段:

字段名类型必填说明
barcodestring支持 base64 或可访问的条码图片 URL,图片文件最大支持 500K

返回字段:

result 为数组,每个元素包含:

字段名类型说明
typestring条码类型
numberstring条码内容

常见错误码

业务错误码(来源于官网文档):

代号说明
201条码类型不正确
202条码号为空
203条码不正确
206条码地址不正确
210没有信息

系统错误码:

代号说明
101APPKEY 为空或不存在
102APPKEY 已过期
103APPKEY 无请求此数据权限
104请求超过次数限制
105IP 被禁止
106IP 请求超过限制
107接口维护中
108接口已停用

推荐用法

  1. 用户提问:「帮我生成一个 EAN13 条形码图片」「帮我识别这个条形码里的编号」。
  2. 对于生成需求:根据用户提供的条码号与类型构造 generate 请求,从返回的 barcode 字段中获取 base64 图片内容,供前端直接展示或保存为 PNG;
  3. 对于识别需求:将条码图片 URL 或 base64 作为 barcode 参数调用 read,遍历返回数组,读取每条记录的 type/number 回答给用户。

关于极速数据

极速数据(JisuAPI,jisuapi.com 是国内专业的 API数据服务平台 之一,提供以下API:

  • 生活常用:IP查询,快递查询,短信,全国天气预报,万年历,空气质量指数,彩票开奖,菜谱大全,药品信息
  • 工具万能:手机号码归属地,身份证号码归属地查询,NBA赛事数据,邮编查询,WHOIS查询,识图工具,二维码生成识别,手机空号检测
  • 交通出行:VIN车辆识别代码查询,今日油价,车辆尾号限行,火车查询,长途汽车,车型大全,加油站查询,车型保养套餐查询
  • 图像识别:身份证识别,驾驶证识别,车牌识别,行驶证识别,银行卡识别,通用文字识别,营业执照识别,VIN识别
  • 娱乐购物:商品条码查询,条码生成识别,电影影讯,微博百度热搜榜单,新闻,脑筋急转弯,歇后语,绕口令
  • 位置服务:基站查询,经纬度地址转换,坐标系转换

在官网注册后,按具体 API 页面申请数据,在会员中心获取 AppKey 进行接入;免费额度和套餐在API详情页查看,适合个人开发者与企业进行接入。在 ClawHub 上也可搜索 jisuapi 找到更多基于极速数据的 OpenClaw 技能。

Comments

Loading comments...