Xpersona
H

HR Workforce Dashboard 人力看板

CLAWHUB · Unverified

Generate standardized HR workforce dashboards from Excel files: 5 fixed dashboards covering headcount trends, regional distribution, detailed breakdowns, att...

62
Rank
84
Safety
981
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 981 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s170ebyn6y5rjzfzmref9xb7ax84ht8y:hr-workforce-dashboard
  1. Install using `clawhub skill install s170ebyn6y5rjzfzmref9xb7ax84ht8y:hr-workforce-dashboard` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/aico233/hr-workforce-dashboard before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-aico233-hr-workforce-dashboard/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

35,896 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: hr-workforce-dashboard
description: "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."
version: 1.0.0
metadata:
  openclaw:
    requires:
      bins:
        - python3
    emoji: "📊"
---

# HR Workforce Dashboard

## Purpose

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.

## When to Use

Trigger this skill when the user:
- uploads workforce Excel files and asks for `人力看板`、`看板`、`headcount dashboard`、`attrition dashboard`、`workforce report`
- asks to turn active / termination / contingent detail files into downloadable dashboards
- needs a packaged workforce output containing HTML, PNG, Excel, or PowerPoint
- mentions `看板` in the context of workforce data or HR reporting

## Required Inputs

Expect one or more Excel attachments.
Read only the first worksheet unless the user explicitly says otherwise.

### Attachment Structure

Three types of files are supported. File type is **always** determined from **row 1 content** (report name), never from the filename.

- **Active files (在职明细)**:
  - Rows 1-6 are metadata, row 7 is the header, row 8+ is data
  - Row 1: report name, fixed value `Overseas Active Employee Report`
  - Row 4: snapshot date in format `Effective Date | <date>` (A=label, B=date value)
  - Rows 2-3, 5, 6 are ignored
- **Termination files (离职明细)**:
  - Rows 1-7 are metadata, row 8 is the header, row 9+ is data
  - Row 1: report name, fixed value `Overseas Terminated Employee Report`
  - Row 4: start date in format `Termination Date From | <date>`
  - Row 5: end date in format `Termination Date To | <date>`
  - Rows 2-3, 6, 7 are ignored
- **Contingent Worker files (外包人员明细)**:
  - Row 1: report name containing `Contingent Worker` (e.g. `Overseas Contingent Worker Report`)
  - Row 2: header row
  - Row 3+: data rows
  - Data is always the latest snapshot; no snapshot_date metadata needed
  - Worker type is determined from `WeCom Name` prefix: `v_` → Contractor, `p_` → Partner
  - Country names are in Chinese; the script has a built-in Chinese → English + Region mapping

- **Never** infer file type from the filename
- Old metadata format (key=value in row 1) is **not** supported

### Required Data Fields

The formal t

README.md

### HR Workforce Dashboard 使用手册

### 一、这个 Skill 是做什么的
`hr-workforce-dashboard` 用于把**人力在职明细**、**离职明细**和**外包人员明细**自动生成固定口径的 **5 个标准看板**,并输出一个可下载的交付包。

输出包默认包含:
- `dashboard.html`(单页交互式看板,内嵌图表与表格)

如需完整交付包,可要求额外输出:
- `png/dashboard_1.png` ~ `png/dashboard_4.png`
- `excel/workforce_dashboard.xlsx`
- `ppt/workforce_dashboard.pptx`
- `summary.md`
- `workforce_dashboard.zip`

### 二、你需要准备什么文件
建议至少上传以下三类 Excel:
- **在职明细文件(必需)**:可上传 1 份或多份,不同月份可同时上传
- **离职明细文件(建议)**:用于生成看板 4 的离职分析
- **外包人员明细文件(可选)**:用于生成看板 5 的 Contractor & Partner 分布

如果缺少离职明细,Skill 仍会继续生成,但看板 4 会提示数据不完整。
如果缺少外包人员明细,看板 5 不会生成。

### 三、Excel 填写规则
所有上传 Excel 都必须满足以下结构:
- **只读取第一个工作表**
- **第 1 行是报表名称或元数据,不是表头**
- Skill 根据第 1 行内容自动识别文件类型

#### 1)在职明细文件
- 第 1-6 行为元数据,第 7 行为表头,第 8 行起为数据
- 第 1 行:报表名称,固定值 `Overseas Active Employee Report`
- 第 4 行:切片时间,格式为 `Effective Date | <日期>`

#### 2)离职明细文件
- 第 1-7 行为元数据,第 8 行为表头,第 9 行起为数据
- 第 1 行:报表名称,固定值 `Overseas Terminated Employee Report`
- 第 4 行:统计开始日期,格式为 `Termination Date From | <日期>`
- 第 5 行:统计结束日期,格式为 `Termination Date To | <日期>`

#### 3)外包人员明细文件
- 第 1 行为报表名称(包含 `Contingent Worker` 字样)
- 第 2 行为表头,第 3 行起为数据
- 数据永远是最新切片,无需指定快照日期

### 四、字段要求
#### 1)在职明细必填字段
- `WD Employee ID`
- `Employee Type`
- `Region`
- `Country/Territory`
- `BG`

常用补充字段,可按实际情况填写:
- `Work Location`
- `Line`
- `Department`
- `Tencent Organization`
- `Hire Date`

#### 2)离职明细必填字段
- `WD Employee ID`
- `Employee Type`
- `Region`
- `Country/Territory`
- `BG`
- `Termination Date`
- `Termination Category`

常用补充字段:
- `Hire Date`
- `Last Day of Work`

#### 3)外包人员明细必填字段
- `HQ Employee ID`(或含 Employee ID 的列)
- `WeCom Name`(用于区分 Contractor / Partner,`v_` 前缀 = Contractor,`p_` 前缀 = Partner)
- `Country/Territory`(中文国家名,Skill 内置中英文映射)
- `BG`

### 五、枚举值要求
#### Employee Type
仅支持:
- `Regular`
- `Intern`

#### Region
建议统一填写:
- `Americas`
- `APAC`
- `EMEA`
- `Greater China`

#### Termination Category
仅支持:
- `Terminate Employee > Voluntary`
- `Terminate Employee > Involuntary`
- `Terminate Employee > Others`
- `Terminate Employee > Statutory Termination`

### 六、推荐使用方式
#### 场景 1:生成完整 5 个标准看板
1. 准备至少 1 份在职明细 Excel
2. 如需离职分析,再准备 1 份离职明细 Excel
3. 如需外包人员分布,再准备 1 份 Contingent Worker Excel
4. 在 CodeBuddy 中调用本 Skill
5. 上传 Excel 附件并说明"按默认看板生成"

可直接对 Skill 说:
- "请根据我上传的明细生成标准人力看板。"
- "请输出 HTML 看板。"
- "请输出 HTML、PNG、Excel、PPT 和 ZIP。"

#### 场景 2:补充历史月份做同比/环比
如果你希望看板 1 的同比/环比更完整,建议同时上传多个不同月份的在职快照文件。

#### 场景 3:仅生成外包人员看板
只上传 Contingent Worker 文件,Skill 会在有 active 文件的基础上追加看板 5。

### 七、生成结果说明
Skill 会固定输出以下 **5 个标准看板**:
- **看板 1**:正式员工趋势图(ECharts 交互式同比 + 环比分组柱状图,支持 tooltip 悬停、图例、自适应窗口)
- **看板 2**:期末在离职分析(ECharts 交互式双饼图,支持 tooltip 悬停、富文本标题高亮、自适应窗口)
- **看板 3**:Active Regular & Intern 明细汇总表
- **看板 4**:Attrition Regular 离职分析表
- **看板 5**:Active Contractor & Partner(外包人员按 BG × Region × Country 分布表)

> 看板 5 仅在上传了 Contingent Worker 文件时生成。

#### 📧 一键生成邮件功能
看板页面的 Executive Summary 区域提供 **「✉️ 生成邮件」** 按钮,点击后:
1. 自动将完整看板(含图表图片)复制到系统剪贴板
2. 自动唤起系统/企微邮件客户端
3. 邮件主题自动填充为 `YYYYMMDD在职&累计离职人员数据统计看板 - 海外各区域及国内NHS试点`
4. 邮件正文预填 Executive Summary 纯文本

_meta.json

{
  "ownerId": "kn78zkjt5gw6z88fn9jwjy6xa184geg5",
  "slug": "hr-workforce-dashboard",
  "version": "1.0.0",
  "publishedAt": 1775735025670
}

references/data_spec.md

# Workforce Data Spec

## Workbook Structure

Each uploaded Excel workbook follows a structured layout determined by its file type.
File type is always identified from **row 1 content** (report name), never from the filename.

### Active Files (在职明细)

1. **Rows 1-6 = metadata rows**
   - Row 1: report name, fixed value `Overseas Active Employee Report`
   - Row 4: `Effective Date | <date>` → used as `snapshot_date`
   - Rows 2-3, 5, 6 are ignored
2. **Row 7 = header row**
3. **Row 8+ = data rows**

### Termination Files (离职明细)

1. **Rows 1-7 = metadata rows**
   - Row 1: report name, fixed value `Overseas Terminated Employee Report`
   - Row 4: `Termination Date From | <start_date>` → used as `period_start`
   - Row 5: `Termination Date To | <end_date>` → used as `period_end`
   - Rows 2-3, 6, 7 are ignored
2. **Row 8 = header row**
3. **Row 9+ = data rows**

### Contingent Worker Files (外包人员明细)

1. **Row 1 = report name** containing `Contingent Worker` (e.g. `Overseas Contingent Worker Report`)
2. **Row 2 = header row**
3. **Row 3+ = data rows**
4. Data is always the latest snapshot; no snapshot_date metadata needed

Determine file type only from row-1 content.
Do not infer active / termination / contingent from the filename.

## Supported dataset_type Values

Normalize row-1 report name into one of these logical types:

- `active`
  - accepted keywords: `active`, `在职`, `headcount`
- `termination`
  - accepted keywords: `terminat`, `attrition`, `离职`
- `contingent`
  - accepted keywords: `contingent`, `contractor`, `partner`, `外包`

If `dataset_type` cannot be mapped, stop and report the bad metadata.

## Required Business Fields

### Active Files
- `Employee Type`
- `Region`
- `WD Employee ID`
- `Country/Territory`
- `BG`

### Termination Files
- `Employee Type`
- `Region`
- `WD Employee ID`
- `Country/Territory`
- `BG`
- `Termination Date`
- `Termination Category`

### Contingent Worker Files
- `HQ Employee ID` (or any column containing "Employee" and "ID")
- `WeCom Name` (used to classify worker type by prefix)
- `Country/Territory` (Chinese country names, auto-mapped to English)
- `BG`

## Fixed Enumerations

### Employee Type
- `Regular`
- `Intern`

### Termination Category
- `Terminate Employee > Voluntary`
- `Terminate Employee > Involuntary`
- `Terminate Employee > Others`
- `Terminate Employee > Statutory Termination`

Dashboard 4 displays `Voluntary / Involuntary` as fixed columns. `Others / Statutory` columns are conditional — shown only when data is non-empty.

### Worker Type (Contingent)
Determined by `WeCom Name` prefix:
- `v_` prefix → `Contractor`
- `p_` prefix → `Partner`
- Default (no matching prefix) → `Contractor`

## Regional Scope

### Dashboards 1, 2, 4, 5
Only include:
- `Americas`
- `APAC`
- `EMEA`

Exclude `Mainland China`.

### Dashboard 3
Display in this fixed order:
- `Americas`
- `APAC`
- `EMEA`
- `海外合计`
- `Greater China`
- `海外合计(含试点国内)`

Use `Greater China` as a dedicated block after overseas subtotal.

## BG Mappin

references/field_mapping.md

# 字段映射与输入校验

## 1. 元数据行读取规则(新模式,唯一模式)

不兼容旧模式,不读取文件名,只通过结构化元数据行解析。

### Active 文件(在职明细)
- 第 1-6 行为元数据,第 7 行为表头,第 8 行起为数据
- 第 1 行:报表名称,固定值 `Overseas Active Employee Report`
- 第 4 行:切片时间,格式为 `Effective Date | <日期>`(A列=标签,B列=日期值)
- 第 2-3、5、6 行为无效数据,忽略

### Termination 文件(离职明细)
- 第 1-7 行为元数据,第 8 行为表头,第 9 行起为数据
- 第 1 行:报表名称,固定值 `Overseas Terminated Employee Report`
- 第 4 行:统计开始日期,格式为 `Termination Date From | <日期>`
- 第 5 行:统计结束日期,格式为 `Termination Date To | <日期>`
- 第 2-3、6、7 行为无效数据,忽略

### Contingent Worker 文件(外包人员明细)
- 第 1 行为报表名称,包含 `Contingent Worker` 字样
- 第 2 行为表头,第 3 行起为数据
- 数据永远是最新切片,无需指定快照日期
- 使用独立的读取函数 `read_contingent_dataset()`

### 文件类型识别
通过第 1 行的报表名称自动识别:
- 包含 `active`、`在职`、`headcount` → active 类型
- 包含 `terminat`、`attrition`、`离职` → termination 类型
- 包含 `contingent`、`contractor`、`partner`、`外包` → contingent 类型

禁止根据文件名推断文件类型。

## 2. dataset_type 归类

推荐将元数据中的 `dataset_type` 归一到以下三类:

- `active`
  - 可接受关键词:`active`、`在职`、`headcount`
- `termination`
  - 可接受关键词:`terminat`、`attrition`、`离职`
- `contingent`
  - 可接受关键词:`contingent`、`contractor`、`partner`、`外包`

若无法识别,直接报错并提示用户检查元数据首行。

## 3. 正式表格字段

Active 文件:第 7 行为表头,第 8 行起为数据。
Termination 文件:第 8 行为表头,第 9 行起为数据。
Contingent Worker 文件:第 2 行为表头,第 3 行起为数据。

### Active 文件最低要求
- `Employee Type`
- `Region`
- `WD Employee ID`
- `Country/Territory`
- `BG`

### Termination 文件最低要求
- `Employee Type`
- `Region`
- `WD Employee ID`
- `Country/Territory`
- `BG`
- `Termination Date`
- `Termination Category`

### Contingent Worker 文件最低要求
- `HQ Employee ID`(或含 Employee ID 的列 → 重命名为 `Worker_ID`)
- `WeCom Name`(用于根据前缀分类 Worker_Type)
- `Country/Territory`(中文国家名)
- `BG`

## 4. 枚举值

### Employee Type
- `Regular`
- `Intern`

### Termination Category
- `Terminate Employee > Involuntary`
- `Terminate Employee > Voluntary`
- `Terminate Employee > Others`
- `Terminate Employee > Statutory Termination`

### Worker Type(Contingent)
通过 `WeCom Name` 前缀自动识别:
- `v_` 前缀 → `Contractor`
- `p_` 前缀 → `Partner`
- 无匹配前缀 → 默认 `Contractor`

## 5. BG 映射

| 展示列 | 原始值匹配 |
|---|---|
| `IEG` | `IEG - Interactive Entertainment Group` |
| `CSIG` | `CSIG - Cloud & Smart Industries Group` |
| `WXG` | 前缀匹配 `WXG - Weixin Group` |
| `TEG` | `TEG - Technology & Engineering Group` |
| `CDG` | `CDG - Corporate Development Group` |
| `PCG` | `PCG - Platform & Content Group` |
| `OFS` | `Overseas Functional System` |
| `S1` | `S1 - Functional Line` |
| `S2` | `S2 - Finance Line` |
| `S3` | `S3 - HR & Management Line` |

若出现未映射 BG:
- 不阻塞生成
- 在 `summary.md` 中记录未识别值
- 不自动打散到固定列之外,避免破坏版式

**注意**:BG 映射规则同时适用于 Active / Termination / Contingent Worker 三种文件。

## 6. 地域规则

### 海外范围
仅包括:
- `Americas`
- `APAC`
- `EMEA`

### Greater China
看板 3 单独保留 `Greater China` 行。
建议优先通过 `Region = Greater China` 识别;若数据源未标准化,可结合国家/地区值识别:
- `Mainland China`
- `Hong Kong`

### Mainland China
不纳入看板 1 / 2 / 4 / 5 的统计范围。

### Contingent Worker 国家映射
外包人员文件中的 `Country/Territory` 为中文国家名,脚本内置 `CONTINGENT_COUNTRY_MAP` 映射表(40+ 个国家),格式:
- 中文名 → (英文名, Region)
- 例如:`美国` → `("United States of America", "Ame

Sponsored

Ads related to HR Workforce Dashboard 人力看板 and adjacent AI workflows.