360 Secure SkillHub
360 安全技能中心

axiom-phone-e164

核心功能:解析本地/国际格式手机号,支持自动检测或指定国家码,生成规范E.164格式并验证号码长度与前缀。典型场景:存储用户提交的手机号、联系人去重、适配Twilio等短信API。输入为任意格式手机号,可指定默认国家;输出为标准E.164字符串。纯标准库实现,无LLM,性能稳定安全。

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

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add axiom-phone-e164
Metadata
name
axiom-phone-e164
description
Phone number normalizer — convert any phone number to E.164 international format. Use when you need a canonical phone representation for storage or comparison. Pure stdlib, no LLM.
version
0.1.2
license
Apache-2.0

axiom-phone-e164

Version: 0.1.2 Axioma Tools

Normalizes phone numbers to the E.164 standard (e.g., +14155552671).

What this skill does

  • Parses local and international formats
  • Detects country code (default: US/CA)
  • Returns canonical E.164 string
  • Validates length and country prefix

When to use this skill

  • ✅ Normalize user-entered phone for storage
  • ✅ Deduplicate contacts
  • ✅ Format for SMS APIs (Twilio, etc.)
  • ❌ Validate if a number is reachable (separate API)

Usage

python3 axiom_phone_e164.py "(415) 555-2671"
python3 axiom_phone_e164.py "14155552671" --country US
from axiom_phone_e164 import normalize
normalize('(415) 555-2671', default_country='US')  # '+14155552671'

Validation

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

Last updated: 2026-06-14