Skip to content
excel-field-analyzer logo

Excel/CSV 字段分析器

excel-field-analyzer

分析Excel/CSV字段结构,AI自动生成中英文映射,验证翻译质量,输出统计报告。用于电子表格分析、数据字典创建、字段映射场景。

SKILL.md

Full skill instructions

Excel/​CSV 字段分析器

概述

智能分析 Excel 与 CSV 文件,自动生成中英文字段映射、统计报告与 HTML 可视化。

核心能力:

  • 字段统计分析(空值率、唯一值、分布)
  • AI 字段映射(内置 50+ 车险领域字段)
  • 映射质量自动校验
  • HTML 可视化报告

快速开始

对话式调用(推荐)

直接与 Claude 对话:

"帮我分析这个 Excel 文件的字段"
"分析 ./​data/​insurance_data.xlsx 的字段映射"

命令行

# 基础分析
python scripts/​analyzer.py <file_path> [output_dir] [topn]

# 示例
python scripts/​analyzer.py data.xlsx ./​output 10

# 支持格式:.xlsx, .xls, .csv, .txt

核心特性

1. 预置映射库

  • 车险领域:内置 50+ 字段映射
  • 覆盖范围:财务、车辆、机构、产品、时间
  • 示例:
    • 商业险保费 → commercial_premium(finance/​number)
    • 三级机构 → org_level_3(organization/​string)
    • 确认时间 → time_confirm(time/​datetime)

2. AI 批量学习

  • 零人工:自动为未知字段生成映射
  • 智能分析:语义分析 + 数据样本推断
  • 自动保存:结果保存至 custom.json 便于复用
  • 高准确率:70 字段测试集准确率 100%

示例:

🔍 Found 70 unknown fields
💡 Using AI to generate mappings...
✅ Generated 70 mappings and saved to custom.json

- 刷新时间 → time_refresh [time/​datetime]
- 交叉销售标识 → flag_cross_sales [flag/​string]
- 签单保费 → premium_signing [finance/​number]

3. 质量校验

  • 自动检查:4 个维度(命名、分组、语义、类型)
  • 质量评分:优秀(≥90)/ 良好(75-89)/ 一般(60-74)/ 较差(<60)
  • 详细报告:Markdown,附改进建议

4. 交互式学习

  • 手动模式:可选,精确控制字段映射
  • 引导流程:逐步选择英文字段名、分组、类型
  • 持久存储:全部学习映射保存至 custom.json

输出文件

1. HTML 可视化报告

  • 文件元信息与生成时间
  • 每个工作表的完整统计表
  • 数值统计与 Top 值分布
  • 交互式探索

2. JSON 字段映射表

{
  "field_name": "commercial_premium",
  "cn_name": "商业险保费",
  "group": "finance",
  "dtype": "number",
  "role": "measure",
  "aggregation": "sum",
  "is_mapped": true
}

3. 质量校验报告(Markdown)

  • 总体质量统计
  • 需复审字段与建议
  • 优秀映射示例
  • 质量分布可视化

业务分组

分组描述示例
finance财务数据保费、赔款、费用
organization机构信息三级机构、四级机构
vehicle车辆相关车牌、车型
product产品信息险类、险种
time时间字段确认时间、起保日期
flag状态标识续保标识、新能源标识
partner合作方信息4S 集团、经销商
general通用字段业务类型、客户类别

文档

  • reference.md - 完整技术文档、配置细节、API 参考
  • examples.md - 代码示例、使用场景、集成指南

版本历史

v2.3 (2025-11-23) - 质量保障

  • 🔍 映射质量校验体系
  • 4 个校验维度与质量评分
  • 自动生成质量报告

v2.2 (2025-11-23) - AI 批量学习

  • 🤖 AI 驱动的自动字段映射
  • 语义分析 + 数据样本推断
  • 测试数据集准确率 100%

v2.1 (2025-11-23)

  • ✨ 支持 CSV 文件
  • 统一 Excel 与 CSV 接口

v2.0 (2025-11-23)

  • ✨ Claude Code Skill 架构
  • 多源配置系统
  • 交互式字段学习

依赖

pip install pandas openpyxl numpy

许可证

MIT 许可证

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View