Xpersona
M

Meal Subsidy

CLAWHUB · Unverified

2号人事部餐补申请自动化 — 读考勤判断下班时间,全自动填表提交。触发方式:"申请餐补"查昨天;"申请4月7日餐补"查指定日期;"申请4月餐补"查整月批量申请;"本周餐补"查本周批量申请。 Skill: Meal Subsidy Owner: jamy-lei Summary: 2号人事部餐补申请自动化 — 读考勤判断下班时间,全自动填表提交。触发方式:"申请餐补"查昨天;"申请4月7日餐补"查指定日期;"申请4月餐补"查整月批量申请;"本周餐补"查本周批量申请。 Tags: latest:1.3.0 Version history: v1.3.0 | 2026-04-29T06:24:58.799Z | user Switch from Selenium to Playwright; update docs to reflect actual file paths and dependencies v1.2.2 | 2026-04-15T08:00:14.655Z | auto - Migrated from Playwright to Selenium for browser automation. - Upd

62
Rank
84
Safety
978
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 978 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 s17bq0a9525xvr0qvvj22b09ah83p6ey:meal-subsidy
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jamy-lei-meal-subsidy/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

26,621 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: meal-subsidy
description: 2号人事部餐补申请自动化 — 读考勤判断下班时间,全自动填表提交。触发方式:"申请餐补"查昨天;"申请4月7日餐补"查指定日期;"申请4月餐补"查整月批量申请;"本周餐补"查本周批量申请。
---

# 餐补申请自动化

自动读取2号人事部考勤,判断下班时间是否满足餐补条件,全自动填写并提交。

## 申请条件

| 下班时间 | 餐补 |
|---------|------|
| ≥ 20:30 | 20元 |
| 00:00 ~ 06:00(跨天) | 40元 |
| 其他 | 不申请 |

**跨天**:结束时间日期+1天(如 00:30 → 第二天00:30)

---

## 触发指令

| 指令 | 效果 |
|------|------|
| "申请餐补" | 查昨天,满足则申请 |
| "申请4月7日餐补" | 查指定日期(默认当年,如2026年4月7日)|
| "申请4月餐补" | 查整个4月(默认当年),批量申请所有满足条件的日期 |
| "本周餐补" | 批量申请本周所有满足条件的日期 |

---

## 快速开始

### 第一步:安装依赖

```bash
pip install playwright
playwright install chromium
```

> 只需安装一次。依赖 Playwright 而非 Selenium,无需额外配置 ChromeDriver。

### 第二步:启动 Chrome 远程调试(只需一次)

```bash
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
```

> Mac:`/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222`

打开后扫码登录 `https://i-wework.2haohr.com/desk/home`,之后运行无需重复登录。

> 如果脚本报错 "Cannot connect to Chrome",先执行此步骤

### 第三步:运行脚本

```bash
# 申请指定日期(默认昨天)
py -3 meal_subsidy.py --date 2026-04-07

# 申请整月(批量)
py -3 meal_subsidy.py --mode month --year 2026 --month 4
```

---

## 截图说明

| 文件 | 内容 |
|------|------|
| `screenshots/att_YYYYMMDD.png` | 考勤截图(上传用) |
| `screenshots/meal_form_*.png` | 餐补表单截图 |
| `screenshots/meal_before_submit_*.png` | 提交前确认 |
| `screenshots/after_submit_*.png` | 提交后截图 |
| `screenshots/late_YYYYMM.csv` | 申请记录表 |

---

## 依赖

| 依赖 | 说明 |
|------|------|
| Python 3.8+ | 语言环境 |
| playwright | `pip install playwright` |
| Chrome 浏览器 | 系统已安装即可 |

---

## 常见问题

**Q: 报错 "Cannot connect to Chrome"**
A: Chrome 没有以远程调试模式启动。按第二步重新启动 Chrome。

**Q: 提示 "登录超时"**
A: 需要先在 Chrome 里手动扫码登录一次(只需一次)。

**Q: 提交流程正常但上传的截图不对**
A: 请确保 Chrome 打开了考勤页面(显示日期和下班时间),再运行脚本。

---

## 技术说明

- **浏览器连接**:通过 CDP(Chrome DevTools Protocol)连接端口 9222,已登录状态不丢失
- **iView picker 填写**:直接 send_keys 无效,必须用 JS 原生 setter 触发 Vue 响应式
- **iframe 处理**:餐补表单在 iframe 内,JS 直接跨帧操作 `.ivu-date-picker`
- **自动启动**:端口 9222 不可用时,脚本会自动启动新的带调试端口的 Chrome

_meta.json

{
  "ownerId": "kn7egcd9ec7cddw82j22wbs0p983q1bg",
  "slug": "meal-subsidy",
  "version": "1.3.0",
  "publishedAt": 1777443898799
}

skill-card.md

## Description:

Automates 2hao HR meal-subsidy requests by reading attendance, checking late-departure eligibility, and filling and submitting eligible claims for a date, week, or month.

This skill is ready for commercial/non-commercial use.

## Publisher:

[jamy-lei](https://clawhub.ai/user/jamy-lei)

### License/Terms of Use:

MIT-0

## Use Case:

Employees using 2hao HR use this skill to check whether attendance records meet meal-subsidy rules and submit eligible claims for a specific date, the current week, or a month.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill can submit HR meal-subsidy claims through a remotely debuggable browser.

Mitigation: Run it only in an isolated, trusted user account or disposable browser profile and require confirmation before each HR submission.

Risk: Chrome remote debugging can expose an authenticated browser session if it is left open.

Mitigation: Open the debugging port only while running the skill, close it afterward, and avoid shared machines or untrusted networks.

Risk: Generated screenshots, CSVs, logs, and browser profile data can contain sensitive work records.

Mitigation: Store generated files in a restricted location, clean them after review, and avoid sharing the artifacts.

Risk: The script may launch Chrome with `--no-sandbox` during automatic startup.

Mitigation: Remove `--no-sandbox` where possible and run the browser with least-privilege account permissions.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/jamy-lei/skills/meal-subsidy)
- [2hao HR Desk](https://i-wework.2haohr.com/desk/home)

## Skill Output:

**Output Type(s):** [Text, Shell commands, Files]

**Output Format:** [Markdown guidance with CLI commands plus generated PNG screenshots, CSV records, and log text.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Uses Playwright with an authenticated Chrome session; generated files may include attendance screenshots, form screenshots, late-record CSVs, and logs.]

## Skill Version(s):

1.3.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Meal Subsidy and adjacent AI workflows.