qbb20261890

Uses the qrcode library to generate printable verification QR codes for contracts and documents, intended for document QR, contract QR, or printable archive code scenarios.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "qbb20261890" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-316fa726f5d4db7ead0730a506e78cd701a7680a12e321bf0d17d9ce0498fbef. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/qbb20261890 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Uses the qrcode library to generate printable verification QR codes for contracts and documents, intended for document QR, contract QR, or printable archive code scenarios.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: qbb20261890
slug: qbb20261890
displayName: 单据二维码
version: 1.0.0
summary: 用 qrcode 为合同/单据生成核验二维码,便于打印归档。
license: MIT
description: 用 qrcode 库为合同、单据生成可打印核验二维码。当用户要单据二维码、合同二维码、打印归档码时使用。

单据二维码(qrcode)

灵感:能力工具箱 doc-qrcode(pkg: qrcode)。

小四原创:单据号/核验 URL → DataURL 或 Canvas;与「摄像头扫码」成对(生成 ↔ 扫)。

何时使用

  • 合同/提成单打印页附核验码
  • 归档袋贴码便于扫回系统
  • 现场核对单据真伪(配合业务核验接口)

硬约束

  1. 使用 qrcode(或等价);内容优先短:单据号或 HTTPS 核验链接。
  2. 勿把完整敏感正文塞进二维码。
  3. 导出 PNG/DataURL;打印预览需足够大边距。
  4. 实现要点注释标 小四原创。
  5. 扫码核验逻辑属业务后端,本 Skill 只负责生成展示。

推荐实现

import QRCode from 'qrcode'

// 小四原创:单据码
export async function makeDocQr(payload: string, opts?: { width?: number }) {
  const text = String(payload || '').trim()
  if (!text) throw new Error('二维码内容为空')
  if (text.length > 500) throw new Error('内容过长,请改用短链或单号')
  return QRCode.toDataURL(text, {
    width: opts?.width ?? 240,
    margin: 2,
    errorCorrectionLevel: 'M',
  })
}

export function buildVerifyPayload(docNo: string, baseUrl: string) {
  const no = encodeURIComponent(docNo)
  return `${baseUrl.replace(/\/$/, '')}/verify?no=${no}`
}

Agent 步骤

  1. 输入单据号 → 生成核验 URL 或纯单号。
  2. makeDocQr → <img> 展示 + 下载。
  3. 打印样式:码旁印可读单号。
  4. 自测:空内容报错;手机扫得出原文。

不要做

  • 把身份证号等敏感原文直接编码进公开码。
  • 与条形码 Skill 混用却不说明类型(本包是 QR)。

附加

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value65/100

Highlights

  • 解决合同/单据打印归档的核验需求,具有明确办公场景实用价值
  • 与扫码识别形成完整闭环(生成 ↔ 扫)
Trigger Precision85/100

Highlights

  • 触发词覆盖合理(单据二维码、合同二维码、打印归档码)
  • 边界清晰,不易与其他 Skill 混淆
Structure and Standards70/100

Highlights

  • 结构完整,包含使用场景、约束、实现示例和步骤
  • frontmatter 信息齐全,有代码示例和自测要点
Execution Reliability60/100

Areas to improve

  • Missing referenced files Reported severity: Major

    SKILL.md 中引用了 [README.md]、[reference.md]、[templates/usage.md] 三个文件,但当前传入内容未包含这些文件

    Recommendation: 请补充缺失的引用文件,或移除无法提供的引用链接

Highlights

  • 代码实现有参数校验和错误处理
  • 工具来源明确(qrcode),参数配置合理
Evidence Verifiability (mean of the first four)70/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.