Generate standardized HR workforce dashboards from Excel files: 5 fixed dashboards covering headcount trends, regional distribution, detailed breakdowns, attrition analysis, and contractor/partner distribution. Outputs a self-contained interactive HTML with ECharts charts, one-click email generation, and clipboard copy.
Generate a fixed-caliber workforce dashboard bundle from uploaded Excel attachments.
Produce up to 5 standard dashboards by default and allow optional user-requested add-on dashboards after the standard set.
Output a self-contained dashboard.html as the primary deliverable, with optional ZIP packaging containing HTML + PNG + EXCEL + PPT.
This skill is not a general BI builder. Treat dashboard definitions, field rules, BG mappings, regional scope, and attrition formulas as fixed business logic unless the user explicitly asks for a new custom dashboard in addition to the standard 5.
Trigger this skill when the user:
人力看板、看板、headcount dashboard、attrition dashboard、workforce report看板Expect one or more Excel attachments. Read only the first worksheet unless the user explicitly says otherwise.
Three types of files are supported. File type is always determined from row 1 content (report name), never from the filename.
Active files (在职明细):
Overseas Active Employee ReportEffective Date | <date> (A=label, B=date value)Termination files (离职明细):
Overseas Terminated Employee ReportTermination Date From | <date>Termination Date To | <date>Contingent Worker files (外包人员明细):
Contingent Worker (e.g. Overseas Contingent Worker Report)WeCom Name prefix: v_ → Contractor, p_ → PartnerNever infer file type from the filename
Old metadata format (key=value in row 1) is not supported
The formal table should contain these business fields when applicable:
Active & Termination files:
Employee TypeRegionWD Employee IDCountry/TerritoryBGHire DateTermination Date (termination only)Termination Category (termination only)Contingent Worker files:
HQ Employee ID (or any column containing "Employee" and "ID")WeCom Name (used to classify Contractor vs Partner)Country/Territory (Chinese country names)BGApply snapshot_date from metadata rows, not from the filename.
Treat Employee Type as fixed enumerations: Regular, Intern.
Treat active files as active-only snapshots.
Treat termination files as the source for attrition statistics.
Treat contingent worker files as the latest snapshot for contractor/partner distribution.
Create a working directory inside the current workspace, for example:
mkdir -p workforce_dashboard_output
Use these references while executing the task:
references/field_mapping.mdreferences/metric_definitions.mdreferences/layout_spec.mdRun the bundled script on every uploaded Excel attachment:
python3 "{skill_path}/scripts/build_dashboard_bundle.py" --files <file1.xlsx> <file2.xlsx> ... --output-dir workforce_dashboard_output
Optional arguments:
--bundle-name workforce_dashboard--title "人力数据看板"The script automatically classifies each file by reading row 1:
Verify that the output directory contains:
dashboard.html (always generated — primary deliverable)If full bundle mode is requested, also check:
png/dashboard_1.png to png/dashboard_4.pngexcel/workforce_dashboard.xlsxppt/workforce_dashboard.pptxsummary.mdworkforce_dashboard.zipIf comparison months or attachment types are missing, do not stop unless the active snapshot input is entirely unavailable.
Continue generating all possible outputs and clearly mark incomplete sections as 数据不完整.
Call out which months or dataset types are missing.
Remind the user that re-uploading missing files will produce a complete version.
Generate a two-part trend view using ECharts interactive grouped bar charts:
Features:
Rules:
Employee Type = RegularAmericas, APAC, EMEAsnapshot_date数据不完整Generate a latest-month regional distribution view with ECharts interactive pie charts:
#dfe8f1)#eadccf)Features:
#1565C0), "离职" highlighted in red (#C62828)Rules:
Employee Type = RegularAmericas, APAC, EMEAGenerate the latest-month detailed headcount table.
Rules:
Americas → APAC → EMEA → 海外合计 → Greater China → 海外合计(含试点国内)Regular and Intern for total and every fixed BG column groupGenerate the overseas attrition table.
Rules:
Employee Type = RegularMainland ChinaTermination Date falls within the chosen period统计周期离职人数 / ((期初在职人数 + 期末在职人数) / 2) × 100%Voluntary / Involuntary / OthersRegion → Country/Territory with region subtotalsGenerate the overseas contingent worker distribution table. Only produced when a Contingent Worker file is uploaded.
Rules:
WeCom Name prefix: v_ → Contractor, p_ → PartnerAmericas, APAC, EMEA (same as other dashboards)Contractor and Partner sub-columns for total and every fixed BG column group合计 | IEG | CSIG | WXG | TEG | CDG | PCG | OFS | S1 | S2 | S3海外合计 summary rowThe primary deliverable is dashboard.html — a self-contained single-page HTML with:
assets/dashboard_style.css)echarts@5) for interactive charts (Dashboard 1 & 2)<table> layout for horizontal chart arrangement (email clients don't support CSS flex), preserves table row/cell background colors, and table cell content is centered.For full bundle mode, also package as a ZIP containing:
dashboard.htmlpng/*.pngexcel/workforce_dashboard.xlsxppt/workforce_dashboard.pptxsummary.mdPrefer mixed Chinese-English presentation:
根据 CodeBuddy Skills 文档,这个 Skill 可以通过两种方式接入:
hr-workforce-dashboard.zip.codebuddy/skills/ 下进行本地开发或项目内调试推荐:
用户上传 Excel 附件后,可以直接这样触发:
See references/install_and_examples.md for: