huawei-cloud-same-name-count
БесплатноЗапускает вложенные скриптыНе проверенQuery same-name population counts (同名人数 / 重名查询). Given a name, a single call returns how many people share that name in a bundled, reproducible sample…
от wlc-dev234 установки в других каталогахОб этом скилле
Same-Name Count Query
Overview
This skill answers the question "how many people share this name?" for a given
name. A single call reads a bundled, reproducible sample dataset
(scripts/data.json, sample/demo data) and returns:
- 同名人数合计 (total) — the number of people with that name.
- 可选分维度统计 (optional breakdown) — the same total split by gender and by province.
--name is required; --gender (男/女) and --province are optional filters. When
they are supplied, both the total and every breakdown count cover only the
matching records.
- One call → one answer — a self-contained same-name count for the given name.
- Filterable —
--gender/--provincenarrow the query; breakdowns are always reported for the matched records. - Never silent — a name that is absent from the dataset, or a filter that
excludes every record, returns an explicit message (Markdown/text print it; JSON
carries it in
messagewithmatched=false). - Self-contained — pure Python 3 standard library, no network, no credentials.
- Demo data only — the dataset is a bundled sample fixture for a reproducible
offline demo, not an authoritative population register; it can be replaced with
--data.
Prerequisites
- Python 3.8+ available as
python3(orpython) onPATH. - No Huawei Cloud credentials, CLI (KooCLI), SDK, or network access are needed; this skill is entirely local.
scripts/data.jsonmust be present (it ships with the skill) unless a custom dataset is supplied with--data.
Workflow
- Load the dataset —
load_data()readsscripts/data.jsonand returns thegenders/provinceslists plus therecords(each{"name", "gender", "province", "count"});--datamay override it with a custom JSON file of the same shape. - Normalize the filters —
normalize_gender()/normalize_province()map a label or alias (e.g.male→ 男,广东省→ 广东) to a canonical value; an unknown value is rejected with exit code2. - Query and aggregate —
query(name, gender, province, data)keeps the records whose name (and gender/province) match, sums theircountinto a total, and builds the by-gender / by-province breakdowns. When nothing matches, it returnsmatched=falseplus an explicitmessage(and, when the name exists but the filter excluded all rows, the dimensions the name does have). - Render —
render_markdown()/render_text()/render_json()turn the result into readable output (Markdown by default). - Emit — the result goes to standard output, or to a file when
--outputis given.
Core Commands
# Default: same-name count for one name (Markdown)
python3 scripts/query.py --name 张伟
# Narrow by gender and/or province
python3 scripts/query.py --name 张伟 --gender 男
python3 scripts/query.py --name 李娜 --province 广东
# JSON (machine-readable, for piping into other tools)
python3 scripts/query.py --name 刘洋 --format json
# Aliases and case-insensitivity
python3 scripts/query.py --name 王伟 --gender male
python3 scripts/query.py --name 王伟 --province 广东省
# Discover what the dataset supports
python3 scripts/query.py --list-provinces
python3 scripts/query.py --list-genders
# Use a custom dataset and write the result to a file
python3 scripts/query.py --name 张伟 --data /path/to/dataset.json --output result.md
# A name with no record prints an explicit no-result message (exit 0)
python3 scripts/query.py --name 不存在的名字
# Run the bundled unit tests
python3 -m unittest discover -s tests -v
The command-line entry point is scripts/query.py; the built-in
scripts/data.json is what the examples above read by default.
Parameter Confirmation
| Parameter | Required | Description | Default |
|---|---|---|---|
--name |
Yes* | Name to look up (*required unless --list-* is used) |
— |
--gender |
No | Filter by gender (男/女, or male/female) |
all |
--province |
No | Filter by province (广东, 广东省, …) |
all |
--format |
No | Output format: markdown, text, or json |
markdown |
--data |
No | Path to a custom dataset JSON | scripts/data.json |
--output |
No | Write the result to a file instead of stdout | stdout |
--list-provinces |
No | Print the supported provinces and exit | off |
--list-genders |
No | Print the supported genders and exit | off |
Reference Documents
| Document | Description |
|---|---|
| references/usage-guide.md | Command recipes, filter rules, no-result behaviour, extending the dataset |
| references/verification-method.md | How the skill is verified (offline unit tests + spot checks) |
| references/acceptance-criteria.md | Acceptance criteria and out-of-scope items |
| references/dataflow-diagram.md | Mermaid data flow di |
Установить huawei-cloud-same-name-count в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-same-name-count?
Query same-name population counts (同名人数 / 重名查询). Given a name, a single call returns how many people share that name in a bundled, reproducible sample dataset; the result can be narrowed with --gender and/or --province and is then broken down by gender and province. When nothing matches, an explicit message is printed — the query never fails silently. Output is readable Markdown by default, with plain-text and JSON alternatives. Implemented with the Python 3 standard library only; it does not call the Huawei Cloud CLI, any Huawei Cloud SDK, or any REST API, and it touches no cloud resource. Triggers include: "查询同名人数", "同名同姓查询", "姓名重名", "重名查询", "同名查询", "查同名", "同名人数", "same name count", "name duplicate count", "count same name", "how many people share this name".
Как установить скилл huawei-cloud-same-name-count?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-same-name-count запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic