返回 Skill 列表
extension
分类: 效率与办公无需 API Key

隐填-skill

隐填:本地身份保险柜 + 自动填表协调 Skill。用 RapidOCR + OpenVINO 在本机识别证件,把敏感字段挡在远程大模型之外,再让 Agent 调用合适工具完成填写与验收。

person作者: vcbbrddhubgithub

Yintian Identity Vault And Autofill Coordinator

Use this skill as the user's local identity vault plus the process harness around identity-based autofill.

The skill answers three questions:

  1. What identity information can be extracted from the user's local private files?
  2. Which extracted fields should be handed to another tool/skill for the target being filled?
  3. After the downstream fill attempt, what was filled, what is missing, and what needs user confirmation?

It does not implement the downstream writer. Websites, Word files, PDFs, spreadsheets, and app forms should be handled by the appropriate browser, document, PDF, spreadsheet, or other available tool.

Scope

This skill owns:

  • Reading user-provided local private files.
  • Enforcing the optional vault directory boundary with YINTIAN_VAULT_DIR.
  • OCR for document images, ID-card photos, scans, and screenshots through RapidOCR + OpenVINO local inference.
  • Extracting identity-field candidates such as name, ID number, birth date, gender, address, phone, bank card, and bank name.
  • Mapping extracted identity candidates to the target's requested fields.
  • Coordinating handoff to the right downstream capability.
  • Requiring a final acceptance report with filled, missing, ambiguous, and confirmation-needed fields.

This skill does not own:

  • Writing into websites, Word/PDF/Excel files, or app forms.
  • Clicking submit.
  • Reimplementing browser automation, document editing, spreadsheet editing, or PDF editing.
  • Sending private source text, OCR text, ID numbers, bank cards, addresses, or full identity packets to remote LLMs, online AI services, or network paths unrelated to the user-selected target.

Required Workflow

  1. Understand target requirements. Inspect or infer what identity fields the target needs. If the target is a website/document/PDF/spreadsheet, use the appropriate external tool/skill to inspect it.
  2. Extract identity packet. Use scripts/source_extract.py and scripts/identity_extract.py to read local private materials and build a field packet with evidence.
  3. Map fields. Create a target mapping: target field -> selected identity value -> source evidence. Keep unresolved fields explicit.
  4. Handoff. Ask the agent to use the appropriate downstream tool/skill to perform the actual fill. Do not use this skill to implement the fill.
  5. Acceptance check. After filling, verify by reading back the target if possible. If readback is not possible, require a fill ledger from the downstream action.
  6. Report to user. Always report filled fields, missing fields, ambiguous/conflicting values, low-confidence values, and fields requiring user supplement or confirmation.

For detailed guidance, read references/privacy-extraction-workflow.md.

Output Contracts

Private Data Packet

{
  "fields": {
    "name": [
      {
        "value": "张三",
        "source": "/vault/id-card.txt",
        "evidence": "姓名 张三",
        "confidence": "label"
      }
    ]
  },
  "derived": {
    "birth_date": {
      "value": "1985-03-07",
      "source": "/vault/id-card.txt",
      "evidence": "derived from id_number"
    }
  },
  "needs_review": []
}

Target Mapping

{
  "target": "/path/or/url",
  "mapping": [
    {
      "target_field": "出生日期",
      "identity_field": "birth_date",
      "value": "1985-03-07",
      "source": "/vault/id-card.txt",
      "status": "ready"
    }
  ],
  "missing": [
    {
      "target_field": "紧急联系人",
      "reason": "not found in local private materials"
    }
  ],
  "needs_confirmation": []
}

Final Acceptance Report

{
  "filled": ["姓名", "身份证号", "出生日期"],
  "missing_user_input": ["紧急联系人"],
  "needs_confirmation": ["OCR 低置信度的开户地址"],
  "conflicts": [],
  "downstream_tool": "browser/document/pdf/spreadsheet tool used by agent",
  "readback_verified": true
}

The final report is part of this skill's process responsibility. Missing identity information should be shown to the user at the end instead of being invented.

Scripts

  • scripts/source_extract.py: Read local .txt, .md, .json, .csv, .tsv, .pdf, .docx, .xlsx, and common image files. Images go through local OCR.
  • scripts/identity_extract.py: Convert extracted text into identity-field candidates and derived fields.
  • scripts/ocr_engine.py: Run local OCR through RapidOCR/OpenVINO. Device is controlled by YINTIAN_OCR_DEVICE=CPU|GPU|NPU|AUTO.
  • scripts/privacy.py: Enforce the optional vault path boundary and detect sensitive strings.
  • scripts/mcp_server.py: Expose vault extraction and OCR as MCP tools.
  • scripts/demo.py: Run an offline text demo without OCR dependencies.

Downstream Handoff Rules

  • Website target: use browser/browser-control tools after identity extraction. Ask before submitting.
  • Word target: use a Word/document skill or tool after identity extraction.
  • PDF target: use a PDF skill or tool after identity extraction.
  • Spreadsheet target: use spreadsheet/xlsx tooling after identity extraction.
  • Unknown target: choose a downstream capability based on the target, not by adding new fill logic to this skill.

Keep this skill focused: it provides private identity data, coordinates the autofill workflow, and checks the result; other tools perform target-specific writing.

Quick Commands

Extract raw local text:

python yintian-skill/scripts/source_extract.py /path/to/private-file.pdf

Build a private identity packet:

python yintian-skill/scripts/identity_extract.py /path/to/id-card.txt /path/to/bank-card.jpg

Run the MCP server:

python yintian-skill/scripts/mcp_server.py