fwo20261880
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 "fwo20261880" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-16707491b35755caad8ff19790e8ba37e5346c3223c395b888678db534c56951. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/fwo20261880 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
OCR/document recognition merge tool: merges existing OCR/document recognition JSON into business forms by field mapping, defaulting to not overwrite already filled fields. Used for OCR form autofill, merging recognition results, and invoice autofill. Does not include OCR engine implementation.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: fwo20261880
slug: fwo20261880
displayName: OCR表单回填
version: 1.0.0
summary: 把发票/回单识别结果按映射表 merge 进业务表单(不自研 OCR 引擎)。
license: MIT
description: 将已有 OCR/单据识别 JSON 按字段映射合并到业务表单,默认不覆盖已填。当用户要 OCR 表单回填、识别结果 merge、发票回填时使用。不包含 OCR 引擎实现。OCR 表单回填
灵感:能力工具箱 ocr-autofill(documentOcr 结果 merge)。
小四原创:假设识别结果已存在(项目 OCR 接口/面板产出);本 Skill 只做字段映射与安全合并。
不实现重型 OCR/Docling;引擎过重项按调度规则跳过。
何时使用
- 发票/回单识别后一键填合同金额、销方名称等
- 智能录入「候选字段 → 表单」
- 与客户自动关联串联:先填公司名再挂客户
硬约束
- 输入为结构化
Record<string, string|number|null>(识别结果),不是原始图片像素算法。 - 映射表可配:
ocrKey → formKey;未映射字段忽略。 - 默认
fill-empty;overwrite需显式开关。 - 金额/日期做轻量规范化(去货币符号、统一日期分隔),失败写入
warnings。 - 实现要点注释标 小四原创。
- 低置信字段(若结果带
confidence)低于阈值则不自动填,只提示。
推荐实现
export type OcrHit = Record<string, string | number | null | undefined> & {
confidence?: Record<string, number>
}
export type MergeResult = {
form: Record<string, string>
filled: string[]
skipped: string[]
warnings: string[]
}
// 小四原创:识别结果 → 表单
export function mergeOcrIntoForm(
form: Record<string, string>,
ocr: OcrHit,
map: Record<string, string>,
opts?: { overwrite?: boolean; minConfidence?: number },
): MergeResult {
const overwrite = opts?.overwrite ?? false
const minC = opts?.minConfidence ?? 0.6
const next = { ...form }
const filled: string[] = []
const skipped: string[] = []
const warnings: string[] = []
for (const [ocrKey, formKey] of Object.entries(map)) {
let val = ocr[ocrKey]
if (val == null || String(val).trim() === '') {
skipped.push(formKey)
continue
}
const conf = ocr.confidence?.[ocrKey]
if (typeof conf === 'number' && conf < minC) {
warnings.push(`${formKey} 置信度低(${conf}),未自动填`)
skipped.push(formKey)
continue
}
const cur = next[formKey]
if (!overwrite && cur != null && String(cur).trim() !== '') {
skipped.push(formKey)
continue
}
let s = String(val).trim()
if (/amount|金额|合计/i.test(ocrKey + formKey)) {
s = s.replace(/[¥¥,\s]/g, '')
}
next[formKey] = s
filled.push(formKey)
}
return { form: next, filled, skipped, warnings }
}
Agent 步骤
- 确认 OCR 结果来源(已有接口);画映射表。
- 点「回填」调用
mergeOcrIntoForm;Toast 列出 filled。 - warnings 黄字展示;用户可手改。
- 自测:空表全填、已有金额不覆盖、低置信跳过。
不要做
- 在本 Skill 内实现完整 OCR/版面分析引擎。
- 无映射表时把全部 OCR 键盲写进表单。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 OCR 识别结果回填业务表单的实际痛点
- 适用于发票/回单等单据的智能录入场景
Highlights
- 触发词精准完整,覆盖 OCR 表单回填、识别结果 merge、发票回填等场景
- 边界清晰,不易误触
Highlights
- 文档结构清晰,包含何时使用、硬约束、推荐实现、Agent 步骤等完整章节
- 提供端到端 TypeScript 示例,frontmatter 完整
Areas to improve
-
Missing referenced files Reported severity: Minor
SKILL.md 中引用了 [README.md](README.md)、[reference.md](reference.md)、[templates/usage.md](templates/usage.md),但未传入这些文件
Recommendation: 请补充被引用的相关文件,或移除无法提供的引用链接
Highlights
- 工具逻辑完整,参数正确,覆盖主要异常(空值、低置信度、覆盖控制)
- 金额/日期做轻量规范化,有 warnings 机制,不可逆操作有 overwrite 显式开关
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.
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.
User discussion
No verified reviews yet.