← 返回 Skills 市场
169
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install china-phone
功能描述
中国手机号码归属地与运营商查询。Use when the user wants to look up the province, city, and carrier (运营商) of a Chinese mobile phone number. Identifies China Mobile, China Uni...
使用说明 (SKILL.md)
中国手机号归属地查询 China Phone Lookup
查询手机号码归属省市及运营商,无需任何 API key。主查询使用 curl 获取接口响应,并用 python3 解析 JSON,确保 \u6cb3\u5357 这类 Unicode 转义会正确显示为中文。
触发时机
- "这个手机号是哪里的" / "138xxxx是什么运营商"
- "帮我查一下这个号码的归属地"
- "这个号是移动还是联通"
- 验证用户手机号归属地、识别虚拟运营商号段
查询接口(无需 API key,按优先级使用)
接口 A:360手机查询(主力,精确到省市)
curl -s "https://cx.shouji.360.cn/phonearea.php?number={手机号}" | python3 -c '
import sys, json
obj = json.load(sys.stdin)
data = obj.get("data") or {}
print(json.dumps({
"code": obj.get("code"),
"province": data.get("province", ""),
"city": data.get("city", ""),
"sp": data.get("sp", "")
}, ensure_ascii=False))
'
示例:
curl -s "https://cx.shouji.360.cn/phonearea.php?number=13812345678" | python3 -c '
import sys, json
obj = json.load(sys.stdin)
data = obj.get("data") or {}
print(f"{data.get(\"province\", \"\")} {data.get(\"city\", \"\")} {data.get(\"sp\", \"\")}".strip())
'
响应:
{
"code": 0,
"data": {
"province": "江苏",
"city": "南京",
"sp": "移动"
}
}
原始接口有时会返回:
{"code":0,"data":{"province":"\u6cb3\u5357","city":"\u5357\u9633","sp":"\u8054\u901a"}}
注意:
- 不要把
\u6cb3\u5357这类转义字符串原样展示给用户 - 必须先解析 JSON,再输出解码后的中文,如
河南 / 南阳 / 联通 - 对用户最终回复时,始终输出自然中文,不输出原始转义内容
字段说明:
province:归属省份city:归属城市(部分号段无城市信息)sp:运营商(移动 / 联通 / 电信 / 虚拟运营商)code:0=成功,其他=失败
接口 B:淘宝手机查询(备用,精确到省)
curl -s "https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel={手机号}"
示例:
curl -s "https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=13812345678"
响应(JSONP格式,需提取内容):
__GetZoneResult_ = {
mts:'1381234',
province:'江苏',
catName:'中国移动',
telString:'13812345678',
carrier:'江苏移动'
}
提取 province(省份)和 catName(运营商全称)字段即可。
接口 C:离线号段前缀规则(两个接口均失败时降级)
根据手机号前3位快速判断运营商:
中国移动:
134-139, 147, 148, 150-152, 157-159
165, 172, 178, 182-184, 187, 188, 195, 197, 198
中国联通:
130-132, 145, 146, 155, 156, 166
167, 171, 175, 176, 185, 186, 196
中国电信:
133, 149, 153, 162, 173, 174, 177, 180, 181
189, 190, 191, 193, 199
中国广电:
192
虚拟运营商(转售):
162, 165, 167, 170, 171
注:170/171开头需结合第4位细分具体虚商
卫星电话:
1349(中国移动卫星)
特殊号段:
400/800 企业客服号(非手机号,无法查归属地)
010/021等 固话号段(非手机号)
号码合法性验证
查询前先验证号码格式:
合法手机号条件:
1. 长度为11位
2. 全部为数字
3. 以 1 开头
4. 第二位为 3-9
不合法情况:
- 少于或多于11位
- 包含非数字字符(如 +86、空格、横线)
- 不以1开头
- 170/171需进一步验证(虚拟运营商转售)
预处理:自动去除 +86、86、空格、横线等前缀
格式化输出
单号查询
📱 手机号查询结果
━━━━━━━━━━━━━━━━━━━━
手机号码:138****5678(已脱敏)
归属地:江苏省 南京市
运营商:中国移动
号段类型:普通手机号
虚拟运营商
📱 手机号查询结果
━━━━━━━━━━━━━━━━━━━━
手机号码:170****1234(已脱敏)
归属地:北京市
运营商:中国联通(虚拟运营商转售)
号段类型:虚拟运营商号段
提示:此号段为虚拟运营商,实际网络由联通承载
批量查询
📱 批量手机号查询(3个)
━━━━━━━━━━━━━━━━━━━━
1. 138****5678 江苏南京 中国移动
2. 186****9012 广东深圳 中国联通
3. 189****3456 北京 中国电信
━━━━━━━━━━━━━━━━━━━━
移动:1个 / 联通:1个 / 电信:1个
执行流程
用户输入手机号
↓
[验证] 格式检查(11位、1开头、数字)
↓ 格式不合法
[提示] 告知用户号码格式有误
↓ 合法
[预处理] 去除 +86/空格/横线 等前缀
↓
[查询] curl 360接口(主力)
↓ 成功后解析 JSON,解码 Unicode 中文
↓ 失败
[查询] curl 淘宝接口(备用)
↓ 失败
[降级] 号段前缀规则判断运营商(无法确定城市)
↓
[脱敏] 中间4位替换为 ****
↓
[输出] 格式化结果
隐私说明
- 输出时对手机号中间4位脱敏(如 138****5678)
- 不存储、不记录任何查询的手机号码
- 仅查询号段归属,无法获取手机号实名信息
注意事项
- 手机号归属地是号段注册地,不代表用户实际所在地(异地使用很常见)
- 携号转网用户的运营商查询结果可能不准确(号段归属运营商与实际使用运营商不同)
- 虚拟运营商号段(170/171)需要结合第4位才能判断具体转售商
- 400/800 企业号、固话号段不属于手机号,无法查询归属地
安全使用建议
This skill is coherent with its stated purpose, but note that each lookup sends the (desensitized only on output) phone number to third‑party public endpoints (cx.shouji.360.cn and tcc.taobao.com). If you must avoid sending phone numbers off your network (corporate privacy rules, sensitive PII), do not use the skill or run lookups through a vetted internal service. Also ensure curl and python3 are available in your environment and consider possible rate limits or changes to those public APIs; the SKILL.md's fallback to offline prefix rules is appropriate but less precise (no city info).
功能分析
Type: OpenClaw Skill
Name: china-phone
Version: 1.0.1
The skill is a legitimate utility for looking up Chinese phone number registration details (province, city, and carrier). It uses well-known public APIs from 360 (cx.shouji.360.cn) and Taobao (tcc.taobao.com) via curl and python3 for JSON parsing. The SKILL.md includes appropriate input validation, offline fallback rules, and privacy-conscious output formatting (masking the middle digits of phone numbers).
能力评估
Purpose & Capability
Name/description (China phone number lookup) match the required tools and actions: curl and python3 to call and parse public lookup endpoints and an offline prefix table as a fallback.
Instruction Scope
SKILL.md only describes validating a phone number, calling public APIs (360 and Taobao), parsing/decoding JSON/JSONP, applying offline prefix rules, and formatting/desensitizing results. The instructions do transmit the queried phone number to third‑party endpoints (expected for this purpose) but do not instruct reading unrelated files or secret environment variables.
Install Mechanism
Instruction-only skill with no install spec or code files; runtime only requires standard binaries (curl, python3). No downloads or archive extraction are requested.
Credentials
No environment variables, credentials, or config paths are requested. The lack of secrets is proportionate to the described functionality.
Persistence & Privilege
always is false and the skill does not request persistent system changes or to modify other skills. The skill does not declare autonomous elevation beyond normal model invocation.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install china-phone - 安装完成后,直接呼叫该 Skill 的名称或使用
/china-phone触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added Python3 as a required dependency for decoding Unicode in JSON responses.
- Updated instructions to use Python for parsing and displaying Chinese characters from API (prevents showing `\uXXXX` escaped Unicode).
- Clarified that responses to users should always be in natural Chinese, never in raw Unicode escapes.
- No changes to external APIs or output format; main functionality unchanged.
v1.0.0
china-phone v1.0.0
- Initial release for Chinese mobile phone number lookup (province, city, carrier).
- Uses free public APIs (360, Taobao) with offline prefix fallback; no API key required.
- Supports operator identification (China Mobile, Unicom, Telecom, virtual operators).
- Supports number validation and privacy masking.
- Batch query output included.
元数据
常见问题
China Phone 是什么?
中国手机号码归属地与运营商查询。Use when the user wants to look up the province, city, and carrier (运营商) of a Chinese mobile phone number. Identifies China Mobile, China Uni... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 169 次。
如何安装 China Phone?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install china-phone」即可一键安装,无需额外配置。
China Phone 是免费的吗?
是的,China Phone 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
China Phone 支持哪些平台?
China Phone 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 China Phone?
由 ToBeWin(@tobewin)开发并维护,当前版本 v1.0.1。
推荐 Skills