wlb20260916
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 "wlb20260916" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-06bf5929cf107ed9d1b021f4991c95c4d7faa3cbf18ccf0940dae084f6f73b94. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/wlb20260916 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
Performs local Luhn validation of bank card numbers and common BIN-based bank identification. Use for card number checks, Luhn validation, and BIN recognition; not for real-name binding or identity verification.
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: wlb20260916
slug: wlb20260916
displayName: 银行卡BIN校验
version: 1.0.0
summary: 银行卡号 Luhn 校验与常见 BIN 银行识别,本地录入辅助。
license: MIT
description: 本地做银行卡号 Luhn 校验与常见 BIN 银行识别。当用户要银行卡校验、Luhn、BIN 识别时使用。不做实名绑卡验证。银行卡 BIN / Luhn 校验
灵感:能力工具箱 bank-card(自研 BIN)。
小四原创:去空格后 Luhn 验卡号形态;用精简 BIN 表猜发卡行。不等于银行实名/可用余额校验。
何时使用
- 客户收款账户录入时格式校验
- 卡号分段展示 + 粗识别银行
- 导入前筛掉明显错误卡号
硬约束
- 卡号长度常见 12–19 位数字;先
replace(/\D/g,'')。 - 必做 Luhn;BIN 表为样本可扩展,未命中返回「未收录」。
- UI 可脱敏中间位;日志勿打完整卡号。
- 实现要点注释标 小四原创。
- 文案写清:通过 ≠ 卡真实有效/可扣款。
推荐实现
// 小四原创:精简 BIN 样本(可替换完整表)
const BIN_SAMPLE: { prefix: string; bank: string }[] = [
{ prefix: '622202', bank: '工商银行' },
{ prefix: '622848', bank: '农业银行' },
{ prefix: '621700', bank: '建设银行' },
{ prefix: '622588', bank: '招商银行' },
{ prefix: '621785', bank: '中国银行' },
]
export function luhnOk(num: string): boolean {
const d = num.replace(/\D/g, '')
if (d.length < 12 || d.length > 19) return false
let sum = 0
let alt = false
for (let i = d.length - 1; i >= 0; i--) {
let n = Number(d[i])
if (alt) {
n *= 2
if (n > 9) n -= 9
}
sum += n
alt = !alt
}
return sum % 10 === 0
}
// 小四原创:校验 + BIN
export function checkBankCard(num: string) {
const digits = String(num || '').replace(/\D/g, '')
if (!digits) return { ok: false as const, message: '请输入卡号' }
const ok = luhnOk(digits)
const hit = BIN_SAMPLE.find((b) => digits.startsWith(b.prefix))
return {
ok,
message: ok ? 'Luhn 通过' : 'Luhn 失败',
bank: hit?.bank || '未收录 BIN',
formatted: digits.replace(/(\d{4})(?=\d)/g, '$1 ').trim(),
}
}
Agent 步骤
- 实现
luhnOk/checkBankCard。 - 输入框失焦提示;可选四位分段展示。
- 自测:合法 Luhn 样例、改末位失败、未知 BIN。
不要做
- 声称可查余额或替代银行验卡。
- 上传完整卡号到不明第三方。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供银行卡号 Luhn 校验与 BIN 识别,适用于客户收款账户录入、卡号格式校验、导入前筛错等明确业务场景
- 具有实际业务价值,属于通用工具范畴
Highlights
- 触发词精准完整,覆盖银行卡校验、Luhn、BIN 识别等多种变体,边界清晰
Highlights
- 文档结构完整,包含何时使用、硬约束、推荐实现、Agent 步骤、不要做等章节
- 有代码示例和自测建议,frontmatter 完整
Areas to improve
-
Missing referenced files Reported severity: Major
SKILL.md 末尾引用了 README.md、reference.md、templates/usage.md 三个文件,但实际未传入
Recommendation: 请补充缺失的引用文件,或移除无效引用链接
Highlights
- 核心算法 Luhn 校验逻辑正确,有长度校验和异常处理
- BIN 表可扩展,文案强调不等于真实有效,避免误导
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.