Agent Skills
› Zafer-Liu/Data-Analysis-Agent
› kmeans
kmeans
GitHub执行K-Means聚类分析,对业务对象进行客户分群。流程包括特征确认、缺失值处理、标准化、选择K值及评估聚类质量,最终输出各簇画像与异常点分析。
Trigger Scenarios
需要对业务数据进行客户分群或群体划分
需要执行K-Means聚类算法并获取聚类画像
Install
npx skills add Zafer-Liu/Data-Analysis-Agent --skill kmeans -g -y
SKILL.md
Frontmatter
{
"icon": "🔵",
"name": "kmeans",
"tags": [
"mode-business",
"mode-ml",
"segmentation",
"modeling"
],
"description": "使用 K-Means 对业务对象进行聚类画像(clustering 客户分群)",
"allowedTools": [
"get_schema",
"query_data",
"run_analysis",
"generate_chart"
]
}
K-Means 聚类
确认聚类实体与特征,处理缺失值并标准化数值变量。比较合理的 K 值,报告聚类质量、各簇规模、中心特征和业务画像,并说明异常点及稳定性限制。
Tool routing
- Use
get_schemato identify the entity key, candidate numeric features, and source table. - Use
query_datato verify feature availability, missingness, and scale before modeling. - Use
run_analysiswithanalysis_name="K_Means"for the clustering computation. - Use
generate_charton cluster profiles, elbow output, or label result tables afterrun_analysissucceeds.
Implementation reference
- Tool entry:
agent/tools/business/data.py::_tool_run_analysis - Analysis registry:
Function/Analyze/registry.py - Analysis implementation:
Function/Analyze/K-Means/analyze.py - Chart implementation:
Function/Charts_generation/chart_generate.py
Version History
- 87489fb Current 2026-11-02 19:30
- d6a2c3e 2026-07-24 12:12


