shdskill02
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "shdskill02":https://skillpi.com/zh/skills/deepskill-5d432168c1a7714cde90f629ec4d0e98e0d0265358d77d46cc92ff221c108a1c。安装前核对上游来源和版本:https://skillhub.cn/skills/user_9355e276/shdskill02。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
批量扫描 PDF 电子发票二维码并自动提取发票号码的技能,能将识别结果以 Excel 格式导出。适用于财务或会计等需要处理大量电子发票的用户,可在 Work Buddy 中通过添加多个 PDF 文件快速完成发票号码识别与整理。
介绍来源: third_party · user_9355e276 · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 提取PDF电子发票发票号码
- 实测状态
- 未测试
文件浏览
Frontmatter
name: shdskill02
description: 提取PDF电子发票发票号码{
"name": "扫描PDF二维码提取发票号码",
"description": "批量扫描PDF文件中的二维码,提取发票号码并以Excel格式输出。支持在Work Buddy新建任务对话框中点击左下角+号添加多个PDF文件。",
"triggers": [
"扫描PDF二维码提取发票号码",
"扫描PDF二维码",
"提取发票号码",
"批量提取发票号码",
"PDF二维码识别",
"发票号码提取",
"扫码提取发票",
"PDF扫码"
],
"window": {
"title": "扫描PDF二维码提取发票号码",
"width": 700,
"height": 480,
"resizable": true,
"modal": true
},
"ui": {
"type": "custom",
"html": "<div style='display:flex;flex-direction:column;height:100%;padding:20px 24px;font-family:'Segoe UI',system-ui,sans-serif;background:#f7f9fc;box-sizing:border-box;'>\n <div style='margin-bottom:16px;'>\n <h3 style='margin:0 0 6px 0;color:#1a1a2e;font-weight:600;font-size:18px;'>📄 扫描PDF二维码提取发票号码</h3>\n <p style='margin:0;color:#666;font-size:13px;'>点击下方「+ 添加文件」选择PDF文件(支持多选),系统将自动识别二维码中的发票号码</p>\n </div>\n\n <!-- 文件上传区域 -->\n <div style='display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap;'>\n <button id='addFilesBtn' style='padding:10px 24px;border:2px dashed #0078d4;border-radius:8px;background:#fff;color:#0078d4;cursor:pointer;font-size:14px;font-weight:600;transition:all 0.2s;'>+ 添加文件</button>\n <span style='font-size:13px;color:#888;'>已添加 <span id='fileCount'>0</span> 个PDF文件</span>\n <button id='clearFilesBtn' style='padding:6px 16px;border:1px solid #ddd;border-radius:4px;background:#fff;cursor:pointer;font-size:12px;color:#999;'>清空列表</button>\n </div>\n\n <!-- 文件列表 -->\n <div style='flex:1;border:1px solid #e0e0e0;border-radius:8px;background:#fff;overflow:hidden;display:flex;flex-direction:column;min-height:0;'>\n <div style='display:flex;justify-content:space-between;padding:10px 16px;background:#f0f2f5;border-bottom:1px solid #e0e0e0;font-weight:600;font-size:13px;color:#444;'>\n <span style='flex:1;'>文件名</span>\n <span style='width:120px;text-align:center;'>状态</span>\n <span style='width:100px;text-align:center;'>发票号码</span>\n </div>\n <div id='fileListContainer' style='flex:1;overflow-y:auto;padding:4px 0;'></div>\n </div>\n\n <!-- 底部操作栏 -->\n <div style='display:flex;justify-content:space-between;align-items:center;margin-top:16px;'>\n <div style='display:flex;gap:12px;'>\n <button id='scanBtn' style='padding:10px 36px;border:none;border-radius:6px;background:#0078d4;color:#fff;cursor:pointer;font-size:14px;font-weight:600;'>开始扫描</button>\n <button id='exportBtn' style='padding:10px 28px;border:1px solid #0078d4;border-radius:6px;background:#fff;color:#0078d4;cursor:pointer;font-size:14px;font-weight:600;'>导出Excel</button>\n </div>\n <button id='closeBtn' style='padding:8px 24px;border:1px solid #ddd;border-radius:6px;background:#fff;cursor:pointer;font-size:13px;color:#888;'>关闭</button>\n </div>\n</div>"
},
"actions": {
"addFiles": {
"description": "打开文件选择对话框,添加PDF文件",
"code": "async (context) => {\n const result = await context.showOpenFilePicker({\n multiple: true,\n filters: [{ name: 'PDF文件', extensions: ['pdf'] }]\n });\n if (result && result.length > 0) {\n const currentFiles = context.state.fileList || [];\n const newFiles = result.map(file => ({\n name: file.name,\n path: file.path,\n status: '待扫描',\n invoiceNumber: ''\n }));\n const updated = [...currentFiles, ...newFiles];\n context.setState({ fileList: updated });\n context.renderFileList(updated);\n context.updateUI('fileCount', updated.length);\n }\n}"
},
"clearFiles": {
"description": "清空文件列表",
"code": "async (context) => {\n context.setState({ fileList: [] });\n context.renderFileList([]);\n context.updateUI('fileCount', 0);\n}"
},
"scanFiles": {
"description": "扫描所有PDF文件中的二维码,提取发票号码",
"code": "async (context) => {\n const fileList = context.state.fileList || [];\n if (fileList.length === 0) {\n await context.showMessage('请先添加PDF文件!', 'warning');\n return;\n }\n // 更新所有文件状态为“扫描中”\n const scanningList = fileList.map(f => ({ ...f, status: '扫描中...' }));\n context.setState({ fileList: scanningList });\n context.renderFileList(scanningList);\n let processed = 0;\n for (const item of scanningList) {\n try {\n // 调用PDF二维码识别功能(Work Buddy内置API)\n const result = await context.scanPDFQRCode(item.path);\n // 从二维码内容中提取发票号码(支持多种格式)\n const invoiceNumber = context.extractInvoiceNumber(result);\n item.status = '已完成';\n item.invoiceNumber = invoiceNumber || '未识别';\n } catch (e) {\n item.status = '失败';\n item.invoiceNumber = '识别失败';\n }\n processed++;\n context.renderFileList(scanningList);\n context.updateUI('fileCount', scanningList.length);\n // 更新进度(可选)\n await context.updateProgress(processed, scanningList.length);\n }\n const completed = scanningList.filter(f => f.status === '已完成' && f.invoiceNumber && f.invoiceNumber !== '未识别');\n await context.showMessage(扫描完成!共 ${scanningList.length} 个文件,成功识别 ${completed.length} 个发票号码。, 'info');\n}"
},
"exportExcel": {
"description": "将识别结果导出为Excel文件",
"code": "async (context) => {\n const fileList = context.state.fileList || [];\n const validResults = fileList.filter(f => f.invoiceNumber && f.invoiceNumber !== '未识别' && f.invoiceNumber !== '识别失败');\n if (validResults.length === 0) {\n await context.showMessage('没有可导出的发票号码数据,请先执行扫描!', 'warning');\n return;\n }\n // 构建Excel数据\n const excelData = [\n ['序号', '文件名', '发票号码', '状态']\n ];\n validResults.forEach((item, index) => {\n excelData.push([\n index + 1,\n item.name,\n item.invoiceNumber,\n item.status\n ]);\n });\n try {\n const filePath = await context.exportExcel(excelData, '发票号码提取结果.xlsx');\n await context.showMessage(Excel导出成功!文件保存至:${filePath}, 'info');\n } catch (e) {\n await context.showMessage(导出失败:${e.message}, 'error');\n }\n}"
},
"close": {
"description": "关闭弹窗",
"code": "async (context) => { context.close(); }"
}
},
"state": {
"fileList": []
},
"permissions": [
"readFiles",
"writeFiles",
"showDialog",
"showOpenFilePicker",
"scanQRCode",
"exportExcel"
],
"lifecycle": {
"onOpen": {
"code": "async (context) => {\n // 初始化状态\n context.setState({ fileList: [] });\n\n // 定义提取发票号码的函数\n context.extractInvoiceNumber = (qrContent) => {\n if (!qrContent) return null;\n const content = String(qrContent);\n // 常见发票号码格式:\n // 1. 纯数字发票号码(如:1234567890)\n // 2. 发票号码+发票代码组合(如:发票号码:1234567890)\n // 3. JSON格式中的发票号码字段\n let match = content.match(/发票号码[:::\s]([0-9]{8,12})/);\n if (match) return match[1];\n match = content.match(/invoice[:::\s]([0-9]{8,12})/i);\n if (match) return match[1];\n match = content.match(/number[:::\s]([0-9]{8,12})/i);\n if (match) return match[1];\n match = content.match(/\"发票号码\"\s[::]\s\"([0-9]{8,12})\"/);\n if (match) return match[1];\n match = content.match(/\"invoiceNumber\"\s[::]\s\"([0-9]{8,12})\"/i);\n if (match) return match[1];\n // 如果内容中只有一串数字且长度在8-12位之间,视为发票号码\n const numbers = content.match(/[0-9]{8,12}/g);\n if (numbers && numbers.length === 1) {\n return numbers[0];\n }\n // 尝试提取JSON对象中的发票号码\n try {\n const json = JSON.parse(content);\n if (json.invoiceNumber) return String(json.invoiceNumber);\n if (json.invoice_no) return String(json.invoice_no);\n if (json.number) return String(json.number);\n if (json.发票号码) return String(json.发票号码);\n } catch (e) { / 忽略非JSON内容 */ }\n return null;\n };\n\n // 渲染文件列表\n context.renderFileList = (fileList) => {\n const container = context.getUIElement('fileListContainer');\n if (!container) return;\n if (!fileList || fileList.length === 0) {\n container.innerHTML = '<div style=\"padding:40px 20px;text-align:center;color:#bbb;font-size:14px;\">暂无文件,请点击「+ 添加文件」添加PDF</div>';\n return;\n }\n let html = '';\n fileList.forEach((item, index) => {\n const statusColor = item.status === '已完成' ? '#28a745' :\n item.status === '失败' ? '#dc3545' :\n item.status === '扫描中...' ? '#ffc107' : '#6c757d';\n const invoiceDisplay = item.invoiceNumber || '-';\n html += \n <div style='display:flex;justify-content:space-between;padding:8px 16px;border-bottom:1px solid #f0f0f0;font-size:13px;align-items:center;'>\n <span style='flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;'>${item.name}</span>\n <span style='width:120px;text-align:center;color:${statusColor};font-weight:500;'>${item.status}</span>\n <span style='width:100px;text-align:center;color:#1a1a2e;font-weight:600;'>${invoiceDisplay}</span>\n </div>\n;\n });\n container.innerHTML = html;\n };\n\n // 绑定UI事件\n context.bindUI('addFilesBtn', 'addFiles');\n context.bindUI('clearFilesBtn', 'clearFiles');\n context.bindUI('scanBtn', 'scanFiles');\n context.bindUI('exportBtn', 'exportExcel');\n context.bindUI('closeBtn', 'close');\n\n // 初始化空列表\n context.renderFileList([]);\n context.updateUI('fileCount', 0);\n }\n}"
}
}
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决财务/办公自动化场景中的核心痛点,批量提取发票号码显著提升效率
- 功能闭环完整,从文件选择到结果导出形成完整工作流
亮点
- 触发词覆盖全面,包含多种用户可能使用的表达方式
- 边界清晰,不易与其他Skill混淆
亮点
- 操作流程清晰,步骤划分明确
- UI设计合理,用户体验良好
亮点
- 异常处理完善,覆盖主要错误场景
- 使用Work Buddy内置API,工具来源可靠
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。