← Back to Skills Marketplace
stoned0516

HR助手

by stoned0516 · GitHub ↗ · v1.2.5 · MIT-0
cross-platform ✓ Security Clean
256
Downloads
2
Stars
0
Active Installs
6
Versions
Install in OpenClaw
/install hr-assistant
Description
Smart HR Assistant for Chinese small and medium businesses. Handles employee roster management, organizational structure, monthly payroll calculation (indivi...
README (SKILL.md)

👔 HR助手

智能 HR 助手,支持员工花名册管理、组织架构维护、薪资自动计算(个税/社保/公积金)、年终奖优化与报表生成。

重要说明

所有数据存储在用户本地,不上云。 用户上传 Excel 文件后,系统会自动分析表格结构并识别列映射。

核心调用方式

自然语言模式(推荐)

python3 {{baseDir}}/tools/main.py "\x3C用户自然语言指令>"

脚本内部会自动完成:意图识别 → 参数提取 → 工具执行 → 响应格式化。

# 查看帮助
python3 {{baseDir}}/tools/main.py "帮助"

# 查看当前配置状态
python3 {{baseDir}}/tools/main.py "查看配置"

# 查询员工
python3 {{baseDir}}/tools/main.py "查一下张三的信息"
python3 {{baseDir}}/tools/main.py "技术部有哪些员工"

# 员工统计
python3 {{baseDir}}/tools/main.py "员工统计"

# 薪资计算
python3 {{baseDir}}/tools/main.py "计算本月薪资"
python3 {{baseDir}}/tools/main.py "年终奖36000"

# 社保公积金计算(不需要绑定表格)
python3 {{baseDir}}/tools/main.py "北京社保10000"
python3 {{baseDir}}/tools/main.py "上海五险一金15000"

子命令模式(精确操作)

# 查看配置状态
python3 {{baseDir}}/tools/main.py status

# 绑定表格(分析 + 自动映射 + 绑定 一步完成)
python3 {{baseDir}}/tools/main.py bind organization /path/to/org.xlsx
python3 {{baseDir}}/tools/main.py bind employee /path/to/employee.xlsx
python3 {{baseDir}}/tools/main.py bind salary /path/to/salary.xlsx

# 仅分析表格结构(不绑定)
python3 {{baseDir}}/tools/main.py analyze /path/to/file.xlsx [sheet_name]

初始化流程(核心)

⚡ 关键设计:直接读取用户上传的文件

当用户说「开始初始化」或上传了 Excel 文件时:

  1. 先运行 python3 {{baseDir}}/tools/main.py status 查看当前状态

  2. 如果未选择存储方式,引导用户使用 Excel 本地存储(默认)

  3. 然后引导用户依次上传三张表:

    • 「请上传你的组织架构 Excel 文件」
    • 「请上传你的员工花名册 Excel 文件」
    • 「请上传你的薪资表 Excel 文件」
  4. 当用户上传文件后,使用上传后的文件路径执行绑定:

# 绑定组织架构表
python3 {{baseDir}}/tools/main.py bind organization "\x3C上传文件路径>"

# 绑定员工花名册
python3 {{baseDir}}/tools/main.py bind employee "\x3C上传文件路径>"

# 绑定薪资表
python3 {{baseDir}}/tools/main.py bind salary "\x3C上传文件路径>"

安全提示:仅接受用户主动上传的文件路径,不要读取或处理非 Excel 文件。

  1. 脚本会自动完成:读取 Excel → 分析列名 → 匹配标准字段 → 完成绑定
  2. 三张表全部绑定后,初始化完成,可以直接使用

用户可能一次上传多个文件

如果用户一次上传了多个 Excel 文件:

  • 先读取每个文件的内容,根据列名判断是组织架构/花名册/薪资表
  • bind \x3Ctype> \x3Cpath> 依次绑定
  • 如果无法自动判断,询问用户哪个文件对应什么

列映射说明

bind 命令会自动识别常见列名别名,包括:

标准字段 常见列名
工号 (empNo) 工号、员工编号、员工ID、编号
姓名 (name) 姓名、员工姓名、名字
部门 (deptCode) 部门编码、部门ID、所属部门
基本工资 (baseSalary) 基本工资、底薪、基础工资
入职日期 (hireDate) 入职日期、入职时间、到岗日期
在职状态 (status) 在职状态、状态、员工状态

如果自动匹配有误,系统会提示用户确认。


功能清单

员工管理

操作 示例指令
查询员工 「查一下张三的信息」「E001的信息」
员工列表 「所有员工」「花名册」「在职多少人」
搜索筛选 「技术部员工」「试用期员工」「姓李的」
添加员工 「添加员工 E020 王五 技术部 工程师」
修改员工 「张三转正」「李四调到市场部」「E003调薪到20000」
删除员工 「E010离职」「删除E020」
批量操作 「E001到E010批量转正」

组织架构

操作 示例指令
查看部门 「组织架构」「有哪些部门」「技术部信息」
部门树 「部门树」「组织架构图」
汇报关系 「张三的汇报链」「张三向谁汇报」

薪资计算

操作 示例指令
批量薪资 「计算本月薪资」「跑工资」「算2月工资」
单人薪资 「算一下张三的工资」
年终奖 「年终奖36000」「年终奖50000月薪2万」
社保公积金 「北京社保10000」「上海五险一金15000」
个税税率 「个税税率」「税率表」

报表与校验

操作 示例指令
员工统计 「员工统计」「人数统计」「合同到期提醒」
数据校验 「校验花名册」「检查数据质量」
导出报表 「导出报表」「生成Excel」
审计日志 「查看操作日志」「最近操作记录」

数据存储

所有数据存储在用户本地,不上云:

文件 说明
.hr-data/config.json 绑定状态、列映射、初始化配置
.hr-data/audit.log.jsonl 操作审计日志(append-only)
.hr-data/payroll/YYYY-MM.json 月度薪资计算结果(按月归档)
.hr-data/conversations/ 对话历史记录

交互规范

  1. 首次使用:如果用户提到员工/薪资等操作但未初始化,先引导完成初始化
  2. 文件上传:初始化时引导用户直接上传 Excel 文件,不要让用户手动填写路径
  3. 参数缺失:当用户提供的信息不完整时,主动追问缺失参数
  4. 中文回复:所有响应使用中文
  5. 操作确认:增删改操作执行前,向用户确认
  6. 错误处理:遇到错误时给出清晰的错误原因和建议
  7. 文件路径:仅处理用户上传的 Excel 文件(.xlsx/.xls),使用上传后的文件路径调用 bind 子命令

注意事项

  • 不需要绑定表格即可使用:社保计算、公积金计算、年终奖计算、个税税率查询
  • 批量薪资计算结果会自动持久化到 .hr-data/payroll/ 目录
  • 所有写操作(增/删/改/薪资计算)自动记录审计日志
  • Python 脚本路径为 {{baseDir}}/tools/main.py,所有 .py 文件在 tools/ 目录下
  • 本 Skill 仅处理 Excel 文件(.xlsx/.xls),不会访问其他类型的系统文件
Usage Guidance
This package looks like a legitimate local Excel-based HR/payroll tool whose code and instructions match the advertised purpose. Before installing or running it: 1) Verify dependencies (python3, openpyxl, xlrd) are installed in an isolated environment (venv/container). 2) Inspect the omitted/truncated files for any network calls or telemetry (none were visible in provided excerpts, but some files were truncated). 3) Only supply Excel files you trust — the tool will open any user-provided path, so do not point it at system/private files. 4) Review prompts/onboarding.md and SKILL.md if you are concerned about prompt content influencing the agent. 5) If you will run this in production or with real employee data, run the test suite locally and store .hr-data in a controlled location with backups and access controls. If you want me to, I can scan the remaining truncated files for network or credential-usage patterns before you install.
Capability Analysis
Type: OpenClaw Skill Name: hr-assistant Version: 1.2.5 The hr-assistant skill is a well-structured tool for local HR management, including payroll calculation, attendance tracking, and organizational mapping. The code operates exclusively on local Excel and JSON files within a designated `.hr-data` directory and includes basic path sanitization (e.g., using `os.path.realpath`) in `onboarding.py` to mitigate path traversal risks. The instructions in `SKILL.md` are safety-conscious, explicitly directing the AI agent to only process user-uploaded Excel files and avoid accessing unrelated system data. No network calls, obfuscation, or malicious execution patterns were found.
Capability Assessment
Purpose & Capability
Name/description (HR assistant for local Excel-based payroll/attendance) align with the shipped code: many Python modules (payroll_engine, attendance_manager, employee_manager, excel_adapter, hr_store) implement the advertised features. The declared manifest permissions (filesystem read/write) match the stated need to load and persist Excel/JSON files. One minor inconsistency: top-level registry summary lists no required binaries, while skill.yaml requires python3 and packages (openpyxl, xlrd) — this is likely an authoring mismatch but not a functional surprise.
Instruction Scope
SKILL.md explicitly instructs the agent to only process user-uploaded Excel files and to store all data locally (.hr-data). The code shown reads given file paths via ExcelAdapter/EmployeeManager and persists to .hr-data, which is coherent. Caveat: the skill accepts arbitrary file paths provided by the user; if a user (or attacker via UI) supplies a path to a sensitive file, the skill will attempt to open/read it according to its Excel handling logic. The SKILL.md states it will not process non-Excel files, but some code paths fall back to attempting to open unknown extensions with openpyxl/xlrd — so user input of paths should be treated carefully.
Install Mechanism
There is no install spec (instruction-only install), so nothing is downloaded at install time — lower installation risk. However skill.yaml declares Python dependencies (openpyxl, xlrd). That means running the skill requires installing these packages but the skill does not include an automated installer; this is normal but worth noting. No network endpoints (external URLs) were found in the provided file excerpts.
Credentials
The skill requests no environment variables or external credentials. It requires filesystem read/write which is justified by local Excel import and .hr-data persistence. No extra secrets or unrelated service tokens are requested.
Persistence & Privilege
The skill persists its own data under .hr-data in the user's workspace and does not claim to alter other skills or system-wide settings. always:false (default) and model invocation is allowed (normal). The persistence behavior (write audit logs, conversations, payroll JSON) is expected for an HR assistant but is privacy-sensitive — data remains local per the docs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hr-assistant
  3. After installation, invoke the skill by name or use /hr-assistant
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.5
- English description updated for better clarity and broader HR business scenarios. - No functionality changes; all features and usage remain the same. - Internal documentation improvements for more explicit onboarding use cases.
v1.2.4
- Updated version to 1.2.4. - Improved documentation formatting and clarity in SKILL.md. - Shortened the main title from “HR 智能体” to “HR助手”. - No logic or feature changes; this is a documentation and presentation update only.
v1.2.3
- Expanded description and keywords to clarify features and target audience (Chinese SMEs, Excel integration, local storage). - Description and trigger text updated to emphasize attendance auto-deduction and support for cumulative tax calculation. - Enhanced Chinese description for SME use-case, rapid setup, and supported HR scenarios. - Added more detailed and relevant keywords/tags in both Chinese and English. - No changes to functionality or core usage; documentation and metadata improvements only.
v1.2.2
hr-assistant 1.2.2 - Improved code structure across onboarding, intent routing, and HR data store modules. - Metadata and documentation updates in SKILL.md, including new versioning. - skill.yaml updated to match latest requirements and dependencies. - Internal logic refinements for onboarding and intent handling processes. - Minor bug fixes and stability improvements.
v1.2.1
安全修复:移除提示注入信号,限制文件访问范围为 Excel 文件,修正功能描述一致性
v1.2.0
- 增强初始化流程:支持用户上传组织架构、员工花名册、薪资表 Excel 文件,自动识别和绑定,无需手动配置路径。 - 新增文件批量上传和自动识别功能,智能判断每个 Excel 文件的类型并引导绑定,优化用户体验。 - 支持员工管理、组织架构、薪资计算、社保公积金计算、年终奖优化、报表生成等全流程 HR 操作。 - 全部数据本地存储,严格保护用户隐私,自动生成和归档薪资、审计日志、对话历史等文件。 - 完善中文交互规范,主动追问缺失参数,所有操作均需用户确认并提供详细错误提示。
Metadata
Slug hr-assistant
Version 1.2.5
License MIT-0
All-time Installs 1
Active Installs 0
Total Versions 6
Frequently Asked Questions

What is HR助手?

Smart HR Assistant for Chinese small and medium businesses. Handles employee roster management, organizational structure, monthly payroll calculation (indivi... It is an AI Agent Skill for Claude Code / OpenClaw, with 256 downloads so far.

How do I install HR助手?

Run "/install hr-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is HR助手 free?

Yes, HR助手 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does HR助手 support?

HR助手 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created HR助手?

It is built and maintained by stoned0516 (@stoned0516); the current version is v1.2.5.

💬 Comments