360 Secure SkillHub
360 安全技能中心

axiom-luhn-check

核心功能:基于Luhn算法校验号码字符串,自动识别Visa/MC/Amex等多种类型,支持带空格、短横的输入,可输出JSON或布尔值/类型结果。典型场景:信用卡提交前校验、移动设备IMEI审核、ISBN图书编目、法国SIRET/SIREN验证。仅做校验和检查,不支持PCI合规全验证,纯标准库无注入风险,性能稳定。

kofna3369
kofna3369
热度 16.02
最近更新 2026-06-15 10:48:40
分类:效率依赖:代码执行应用场景:数据处理 / 财务 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add axiom-luhn-check
Metadata
name
axiom-luhn-check
description
Luhn algorithm validator — credit cards (Visa, MC, Amex, Discover), SIRET/SIREN, IMEI, ISBN-10/13. Use when you need to validate any number that uses Luhn. Pure stdlib, no LLM.
version
0.1.2
license
Apache-2.0

axiom-luhn-check

Version: 0.1.2 Axioma Tools

Validates numbers using the Luhn algorithm with auto-detection of common types.

What this skill does

  • Luhn check on any number string
  • Auto-detects type (Visa/MC/Amex/Discover/SIRET/IMEI/ISBN-10/13)
  • JSON output for scripting
  • Handles spaces and dashes in input

When to use this skill

  • ✅ Validate credit card before submission
  • ✅ Audit IMEI of mobile devices
  • ✅ Validate ISBN before cataloging books
  • ✅ Validate French SIRET/SIREN
  • ❌ Need PCI-compliant full validation (this is checksum only)

Usage

python3 axiom_luhn_check.py "4532 0151 1283 0366"
python3 axiom_luhn_check.py "356938035643809" --json
from axiom_luhn_check import validate, detect_type
validate('4532015112830366')  # True
detect_type('356938035643809')  # 'amex'

Validation

Check Status
Unit tests 25+ cases
Performance <100ms
Security Pure stdlib, no injection
Determinism Byte-to-byte stable
License Apache-2.0

Last updated: 2026-06-14