iwj20262006

Implement province–city–district three-level linkage using element-china-area-data to facilitate structured storage of customer addresses. Use when users need province/city/district cascading, administrative division selection, or customer address linkage.

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 "iwj20262006" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a3147044c67cba0fe2a8230ae64c47249c2ca75341c6c04886e2c3f2b80fc532. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/iwj20262006 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

Implement province–city–district three-level linkage using element-china-area-data to facilitate structured storage of customer addresses. Use when users need province/city/district cascading, administrative division selection, or customer address linkage.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: iwj20262006
slug: iwj20262006
displayName: 省市区级联
version: 1.0.0
summary: 用 element-china-area-data 做中国行政区划三级联动,结构化录入客户地址。
license: MIT
description: 用 element-china-area-data 实现省市区三级联动,便于客户地址结构化入库。当用户要省市区级联、行政区划选择、客户地址联动时使用。

省市区级联(element-china-area-data)

灵感:能力工具箱 china-area(pkg: element-china-area-data)。

小四原创:省→市→区级联选择,存 code + 中文名;与「统计局口径对齐」Skill 可后续衔接。

何时使用

  • 客户/线索地址要结构化(省市区 + 详细)
  • Element Plus el-cascader 接国内区划数据
  • 列表筛选按城市维度

硬约束

  1. 使用 element-china-area-data(如 regionData / CodeToText 等导出,以包版本为准)。
  2. 入库建议同时存 区划 code 与 拼接中文;勿只存展示文案导致难筛选。
  3. 详细地址单独字段;级联值变更时勿清空用户已填门牌,除非产品明确要求。
  4. 数据随包版本更新,标注「以 npm 包版本区划为准」。
  5. 实现要点注释标 小四原创。

推荐实现

import { regionData, codeToText } from 'element-china-area-data'

// 小四原创:级联选项(Element Plus Cascader)
export const areaCascaderOptions = regionData

export type AreaValue = {
  codes: string[]          // [省code, 市code, 区code]
  labels: string[]         // 中文名
  text: string             // 「省/市/区」
}

// 小四原创:codes → 可读地址
export function codesToArea(codes: string[]): AreaValue | null {
  if (!codes?.length) return null
  const labels = codes.map((c) => (codeToText as Record<string, string>)[c] || c)
  return { codes: [...codes], labels, text: labels.join('/') }
}
<!-- 小四原创:示意 -->
<el-cascader v-model="areaCodes" :options="areaCascaderOptions" clearable />

Agent 步骤

  1. 安装包;把 regionData 接到 Cascader。
  2. 提交时写出 codes + text + detail。
  3. 回显:用已存 codes 赋给 v-model。
  4. 自测:选到区级、清空、回显一致。

不要做

  • 手写过时省市区 JSON 且不注明来源。
  • 与港澳台/海外地址混用同一强制三级(应可跳过或另字段)。

附加

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 解决客户地址结构化入库的实际业务需求
  • 适用于 CRM、表单系统等高频场景,实用性强
Trigger Precision90/100

Highlights

  • 触发词精准完整,覆盖省市区级联、行政区划选择等核心场景
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards85/100

Areas to improve

  • 文档过长 Reported severity: Minor

    主文件包含大量代码块,总行数超过 500 行

    Recommendation: 建议将完整代码示例移至单独文件,主文档保留核心逻辑说明

Highlights

  • 结构清晰,包含何时使用、硬约束、实现步骤等完整章节
  • 提供了端到端的代码示例和使用说明
Execution Reliability85/100

Areas to improve

  • 类型安全 Reported severity: Minor

    codesToArea 函数中对 codeToText 使用了类型断言,可能存在运行时风险

    Recommendation: 建议添加更严格的类型检查或错误处理机制

Highlights

  • 工具来源明确,使用 element-china-area-data 官方包
  • 覆盖了主要异常场景,提供了自测建议
Evidence Verifiability (mean of the first four)84/100

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.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.