Introduction¶
Large models often make errors when handling check digits (such as bank card numbers, ISBNs, and IBANs), causing generated numbers to fail validation. dsh-checkdigit provides a set of check-digit tools based on pure integer arithmetic, ensuring that generated numbers are mathematically correct.
What It Is¶
dsh-checkdigit is a check-digit math toolbox for DeepSeek Harness (dsh), maintained by TYEclipse. It supports generating, validating, and identifying 13 check-digit schemes with zero runtime dependencies.
Core Features¶
The plugin provides the following four main tools:
checkdigit_generate: Generate a check digit based on a specified scheme.checkdigit_validate: Validate the check digit of a complete identifier, with automatic scheme detection.checkdigit_info: List details of all supported schemes, including identifier length, format, and check-digit position.isbn_convert: Convert between ISBN-10 and ISBN-13.
Supported Check-Digit Schemes¶
It supports 13 check-digit schemes, including:
* Luhn (card numbers, IMEI)
* Verhoeff (total single-error detection)
* Damm
* ISBN-10 / ISBN-13
* EAN-8 / EAN-13
* UPC-A
* ISIN (security codes)
* CUSIP (U.S. securities)
* IBAN (bank account numbers)
* CAS Registry Number (chemical substances)
* ABA routing number (bank routing numbers)
Installation and Enabling¶
Install it using the official installation command:
dsh plugin --profile web add github:TYEclipse/dsh-checkdigit
After installation, make sure the plugin is enabled in dsh.profile.bundles (if it was not automatically enabled), then restart dsh.
Typical Usage¶
The following are usage examples based on verified facts:
Generate a Luhn check digit:
checkdigit_generate(scheme="luhn", payload="7992739871")
Validate an IBAN:
checkdigit_validate(value="GB82WEST12345698765432")
View information for all schemes:
checkdigit_info()
ISBN conversion:
isbn_convert(isbn="0-306-40615-2")
Use Cases and Notes¶
This plugin is suitable for generating test data that must comply with specific check-digit rules. The plugin runs with the permissions of the current dsh process, so review the source code and license (MIT) before installation.
Summary¶
dsh-checkdigit solves the problem of inaccurate check-digit calculations by large models through zero-dependency local arithmetic. For more information or to view the source code, visit GitHub.