In DeepSeek Harness (DSH) development, processing bank card images uploaded by users and extracting key information (such as card number, issuing bank, and card type) is a common requirement. Manual parsing is not only time-consuming but also error-prone. The xby-ocr-bank-card plugin integrates with OCR services to automatically recognize bank cards and validate card numbers using the Luhn algorithm. It can be directly integrated into DSH workflows.

Plugin Positioning

The plugin is maintained by xby-skill and belongs to the online tools category. It is a bank card recognition tool that can extract bank card numbers, issuing banks, and card types from images, and provides card number validity checks.

Core Features

The plugin provides the following main tool functions, supporting different input methods:

  • set_xby_apikey: Sets the API key in the chat. After it is set, the key is automatically persisted and remains valid after restarting the DSH process.
  • ocr_bank_card: Recognizes bank card information. The input parameter is an image file link.
  • ocr_bank_card_for_data_base64: Recognizes bank card information. The input parameter is the BASE64 encoding of the image file.
  • ocr_bank_card_for_data_file: Recognizes bank card information. The input parameter is the file path of the image file.

All recognition features include logic to validate card number validity using the Luhn algorithm.

Installation and Activation

Install using the DSH CLI:

dsh plugin --profile web add github:xby_skill/xby-ocr-bank-card

Prerequisites

Before use, register on the official Xiaobenyang website and obtain an API key.

Typical Usage

  1. Set the key:
    Enter the following command in the chat to set the API key:
    set_xby_apikey <你的API密钥>
  1. Recognize a bank card:
    Choose the corresponding function call based on the input data type:
    • Using an image link:
        ocr_bank_card https://example.com/bank-card.jpg
*   Using Base64 encoding:
        ocr_bank_card_for_data_base64 iVBORw0KGgoAAAANS...
*   Using a local file path:
        ocr_bank_card_for_data_file /path/to/bank_card.png

Notes

  • The plugin requires a valid image file link, Base64 string, or file path to complete recognition.
  • Because the plugin runs with the permissions of the current DSH process, it is recommended to check the source code logic and license (MIT) before installation.

Summary

The plugin provides DSH developers with a standardized solution for extracting bank card information. For more technical details and source code, visit the GitHub repository.