This skill converts HR data vendor Excel reports from major compensation/benefits survey providers (Aon, Mercer, WTW, KornFerry, IPAS) into a company's standardized internal Excel format. It handles field (header/column) mapping, job title matching, percentile notation normalization, unit standardization, and data filtering.
Key capabilities:
User Request
│
├── Has config file? ── Yes ──> Load config & convert directly
│ (JSON config OR Excel mapping workbook)
│
└── No config file? ──> First-time Setup Wizard
│
├── Step 1: User provides output template (result title)
├── Step 2: User provides field mapping table (vendor→internal)
├── Step 3: User provides job code matching table
├── Step 4: (Optional) User provides aging factor table
├── Step 5: Auto-detect vendor & validate mappings
├── Step 6: User confirms/edits any unmapped fields
└── Step 7: Save config & execute conversion
On each invocation, check whether the user already has a saved mapping configuration:
mapping-config.json style)This is a guided, interactive process. The user provides 3 required + 1 optional input files. Complete ALL steps before executing conversion.
result title_简化案例.xlsx — 1 sheet with headers like X Job Code | X Job Family Group | Base 50th | TTDC 50th ...X or company-specific): to be populated from the company's job master data + job code matching table via LEFT JOIN.Base 50th, TTDC 65th): to be filled from vendor reports via field mapping.Result data field match sheet):Internal Field | Vendor A Field | Vendor A Field (Region) | Vendor B Field | ...- to indicate a field does not exist for that vendor.Mercer data field vs Mercer data field For India).- (missing) fields and prompt the user.Non-Exec Job Match sheet):X Job Code | X Job Family | X Job Title | X Band | X Management Level | Vendor A Job Code | Vendor B Job Code | ...Aging Factor sheet):X Country | Aged to Date | Aging Factor0.03 = 3%).--auto-detect).| Output Column | Vendor Source Field | Status |
|------------------------|-----------------------------|------------|
| Base 50th | Base Salary Median_IW | ✓ Matched |
| Base 65th | Base Salary Perc65_IW | ✓ Matched |
| TTDC 50th | TDC Target (B-S) Median_IW | ✓ Matched |
| Survey Job Title | (company column) | — N/A |
| TTDC 65th | TDC Target (B-S) Perc75_IW | ✓ Matched |
> Mercer Dual-Row Header Matching Rule (CRITICAL):
> Mercer reports use 2-row headers: Row 1 = technical camelCase names (e.g., TotalGuaranteedAnnual), Row 2 = human-readable display names (e.g., Total Guaranteed Annual).
> When matching Mercer fields to the user's internal format, follow this priority:
> 1. First: Match against Row 2 (display names) — these are more intuitive and closer to common naming conventions.
> 2. Fallback: If no match found in Row 2, try matching against Row 1 (technical names).
> 3. No match: If neither row produces a match, flag the field as (unmapped) and explicitly prompt the user: "未找到匹配项:[字段名](Row 2: [display name] / Row 1: [technical name]),请手动指定映射目标。"
> This rule applies to both Mercer Global and Mercer India reports.
Apply these rules throughout the entire conversion pipeline:
A. In user's mapping configuration (field mapping table / job match table):
-, empty, null, N/A, #N/A, or any placeholder indicating absence → skip — do not attempt to map this field.B. In vendor report data (actual source data):
-, empty, null, N/A, #N/A, or any placeholder → output as -- (double dash) in the result.C. In output Excel:
-- entries should be formatted as plain text, not numbers.-- cells.assets/mapping-config-template.json as template.Before running the script, ensure pandas and openpyxl are available:
pip install pandas openpyxl
If installing is not possible, fall back to AI-only processing mode: manually read the Excel, apply mappings in code, and write the output.
Execute the conversion:
python3 scripts/convert_report.py \
--config hr-mapping-config.json \
--input vendor_report.xlsx \
--output internal_report.xlsx \
--report-type compensation
Supported report types: compensation, benefits, human_capital.
If the Python script cannot run (missing dependencies, environment issues), process the conversion using direct file operations:
field_mapping.job_title_mapping.filters.After conversion, verify the output:
Conversion Summary:
Vendor: Mercer
Report Type: Compensation
Input rows: 1,247
Output rows: 1,247
Columns mapped: 14/18 (4 preserved as-is)
Job titles mapped: 892/1,247 (71%)
Output: internal_report.xlsx
When building or verifying field mappings, reference references/vendor-report-structures.md for detailed vendor-specific field structures. All observations below are based on real vendor Excel samples stored in references/.
| Aspect | Aon | Mercer | Mercer India | WTW | IPAS |
|---|---|---|---|---|---|
| -------- | ----- | -------- | ------------- | ----- | ------ |
| Percentile notation | P25/P50/P65/P75/P90 | Perc25/Median/Perc65/Perc75/Perc90 | Same as Mercer | 25th/50th/65th/75th/90th | P25/P50/P65/P75/P90 |
| Header rows | 1 | 2 (critical!) | 2 (critical!) | 1 | 1 |
| Case convention | Title Case | camelCase (R1) / Title Case (R2) | Same as Mercer | lowercase | Mixed |
| Org count name | Company Count | NumOrgs | NumOrgs | #Orgs | Mkt # Cos |
| Employee count name | Employee Count | NumObs | NumObs | #Incs | Mkt #EEs |
| Fiscal year ref | CFY/LFY | DataEffectiveDate | DataEffectiveDate | N/A | Data Aged To |
| Car allowance | Explicitly excluded | Included in Guaranteed | Included in Guaranteed | N/A | Included in Base+ |
| STI % base | % of CFY Base | % of Base Salary | % of Guaranteed Cash | % of Base Salary | Inc Tgt % |
| Columns (real sample) | 97 | 85 | 85 | 82 | 61 |
| Total Cash name | Target/Actual Total Cash excl. Car Allowance | TDC Target/Actual (B-S) | TDC Target/Actual (B-S) | Target/Actual Total Annual Compensation | TTC / ATC |
> Critical parsing notes:
> - Mercer has 2-row headers: Row 1 = technical camelCase names, Row 2 = display names. Use Row 2 for mapping.
> - Aon headers contain newlines (\n): Strip them when parsing column names.
> - Mercer India differs from Mercer Global: STI % is of Guaranteed Cash (not Base). Has explicit TotalCashTarget/TotalCashActual.
> - IPAS uses abbreviated names: Base, Base+, Inc Tgt, Inc PYA, TTC, ATC.
> - WTW uses lowercase column names throughout.
> - Job title matching is NEVER 1:1 — always validate matches using job descriptions, not just titles.
Python script for automated Excel conversion. Handles:
CLI usage:
python3 scripts/convert_report.py --config <config.json> --input <vendor.xlsx> --output <internal.xlsx> --report-type compensation
python3 scripts/convert_report.py --input <vendor.xlsx> --auto-detect # Detect vendor + suggest mapping
Documentation and reference materials.
Files:
vendor-report-structures.md — Comprehensive field structure reference based on real vendor samples (Aon, Mercer, Mercer India, WTW, IPAS, KornFerry), with cross-vendor mapping table. All field information from the original Excel samples is captured here.Note: Real vendor Excel sample files (.xlsx) are maintained separately by the user and are NOT included in the skill zip package due to SkillHub's binary file restrictions. The skill package only contains text-based files: .md, .py, .json. The Markdown reference document (vendor-report-structures.md) contains all vendor field information needed for the skill to function.
When to load: Always load vendor-report-structures.md during Phase 2 (setup) and when encountering unfamiliar vendor columns.
JSON template for the mapping configuration file. Contains:
company_info: Company name, format version, default currencyjob_title_mapping: Vendor title → internal title pairsreport_types: Per-type config (compensation/benefits/human_capital) with field_mapping, filters, output_formattransformation_rules: Currency conversion, rounding, unit normalization, date formatWhen to use: As the starting template when generating a new user config. Copy and populate during Phase 2 Step 2.5.
The conversion follows a 3-layer lookup chain:
Output Template Header (B document)
│
▼
Field Mapping Table (A document) - Column 1 = company internal field name
│ Other columns = vendor-specific field names
▼
Vendor Report (C document) - Find column matching vendor field name → extract data
│
▼
Output Row: Company internal field name as header, vendor data as value
Step-by-step:
--.Important: The A document's structure is not hardcoded. Users may provide their mapping in any format — the key is to identify:
When applying aging factors, vendor country names may not exactly match the aging factor table. Apply this matching priority:
China = China)China found in China(T1) → match, use factor for China)United States found in United States of America → match)South Korea → Korea, Republic of via shared korea)Critical rules:
China(T1), NOT changed to China)The output Excel file MUST contain a second sheet called "Audit Log" that records all special cases for user review:
What to log:
| Type | Severity | When to log |
|---|---|---|
| ------ | ---------- | ------------- |
fuzzy_aging_match | INFO | Country name didn't exactly match but was fuzzy-matched. Log the vendor name, matched aging table name, factor used, and match method |
no_aging_match | WARNING | Country name has NO match in aging factor table — aging was SKIPPED entirely |
no_field_mapping | INFO | An output template field has no corresponding vendor field mapping in the A document — output will be -- |
no_job_match | INFO | A company job code had no matching vendor job code — row output with all vendor fields as -- |
Audit Log format:
| Column | Content |
|---|---|
| -------- | --------- |
| # | Sequential number |
| Severity | WARNING (red highlight) or INFO (yellow highlight) |
| Type | Event type code (see table above) |
| Vendor | Which vendor this applies to |
| Detail | Human-readable description of what happened |
Style requirements:
#FFC7CE) with dark red text (#9C0006)#FFEB9C) with dark yellow text (#9C6500)When consolidating data from multiple vendors into a single output table, follow this approach:
a. Use the field mapping table (A document) to find the vendor-specific field name for each internal field.
b. Read the vendor data, matching on job codes via the job code matching table.
c. Extract data using vendor field names, but label columns with internal field names.
merge() instead of AI-driven JOIN for performance.共 2 个版本