Skip to content
Back to skills

Lark Attendance

ASecurity

Use when querying Lark attendance records, checking missing clock-ins, and preparing traceable explanations for attendance exceptions.

  • 75 stars
  • 0 votes
  • 0 copies
  • 11 views
  • Added September 12, 2026
ai-agentsbashgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add seaworld008/Commonly-used-high-value-skills --skill lark-attendance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lark Attendance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lark Attendance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/seaworld008-lark-attendance/badge)](https://www.skillsdirectory.com/skills/seaworld008-lark-attendance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lark-attendance
description: 'Use when querying Lark attendance records, checking missing clock-ins, and preparing traceable explanations for attendance exceptions.'
zh_description: "用于查询飞书考勤记录、核对打卡缺失、整理异常考勤并生成可追溯说明。"
version: "1.0.7"
author: larksuite
source: "github:larksuite/cli"
source_url: "https://github.com/larksuite/cli/tree/7beffb086d7fa3c5b843d8affa7c089f49cfc65e/skills/lark-attendance"
license: MIT
tags: [feishu, lark, lark-cli, attendance]
created_at: "2026-05-19"
updated_at: "2026-11-23"
quality: 3
complexity: intermediate
metadata:
  requires:
    bins: ["lark-cli"]
  cliHelp: "lark-cli attendance --help"
---

# attendance (v1)

**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md),其中包含认证、权限处理**

## 参数与授权对象

按当前方法 schema 分别构造 `--params` 与 `--data`。员工编号类型与查询编号必须对应用户已授权的对象;不要把姓名当编号,不为所有调用固定 `employee_type` 或 `user_ids`。

只有已确认空数组的服务端语义与本次查询范围相符时才传 `user_ids=[]`;本包不能证明空数组代表当前用户、全员或其他范围。已有明确对象和编号时直接使用,不重复询问。

## API Resources

```bash
lark-cli schema attendance.<resource>.<method>   # 调用 API 前必须先查看参数结构
lark-cli attendance <resource> <method> [flags]  # 调用 API
```

> **重要**:使用原生 API 时,必须先运行 `schema` 查看 `--data` / `--params` 参数结构,不要猜测字段格式。

### user_tasks

- `query` — 查询用户考勤打卡记录

## 权限表

| 方法 | 所需 scope |
|------|-----------|
| `user_tasks.query` | `attendance:task:readonly` |

## 查询工作流

考勤查询是只读操作,但结果通常会进入异常说明或工资核对。每次查询都保留
查询时间范围、身份、原始返回和时区,避免把“没有记录”误写成“没有打卡”。

### 1. 先确认查询边界

- 明确是查询当前用户,还是用户明确授权的员工编号;没有授权时不要扩大到全员。
- 明确日期范围和组织时区。日期边界应使用业务时区解释,不要直接把本地日期拼成 UTC。
- 先读取 `../lark-shared/SKILL.md`,默认使用 `--as user`;不要用 bot 身份猜测个人考勤。

### 2. 读取当前 schema

资源字段可能随 Lark API 版本变化。先执行:

```bash
lark-cli schema attendance.user_tasks.query
```

以 schema 输出为准确认 `--params` / `--data` 的字段、时间格式、分页字段和返回结构。
不要根据旧示例补写未声明的字段,也不要把员工姓名当成 `user_ids`。

### 3. 以最小范围执行查询

按照 schema 生成参数后再调用:

```bash
lark-cli attendance user_tasks query --params '<schema-confirmed-query-json>' --data '<schema-confirmed-body-json>' --as user
```

上例为参数位置示意;只有当前 schema 声明相应位置时才传该 flag。编号类型、编号和空数组含义须与授权范围一致。一次只查询必要的日期范围;需要翻页时使用返回的分页游标,
不要通过重复请求扩大范围。

### 4. 解释结果而不是猜测原因

| 结果 | 处理 |
|------|------|
| 有打卡记录 | 按返回的事件时间和类型整理,不自行补齐缺失事件。 |
| 空结果 | 报告“该范围未返回记录”,同时保留范围、身份和 schema 版本;不要直接判定旷工。 |
| `permission denied` / `missing scope` | 停止重试,转 `lark-shared` 的权限流程;不要切换 bot 身份绕过。 |
| 参数或 schema 错误 | 重新读取当前 schema,只修正已确认的字段;不要盲目重放旧请求。 |
| rate limit 或临时网络错误 | 最多做一次有限重试;仍失败就报告未验证,不生成考勤结论。 |

如果返回记录使用 UTC 或带偏移时间,先统一显示时区,再进行“迟到、早退、缺卡”
等派生判断。派生判断必须标注规则和证据;跨午夜班次、补卡和人工修正应列为待确认。

## 可追溯输出模板

完成查询后,用简洁表格记录:

```text
身份:user(不要记录 access token)
范围:<业务时区下的开始/结束日期>
请求:attendance.user_tasks.query
参数来源:本次 schema 输出;<编号类型与已授权查询对象;不含多余个人资料>
结果:<记录数量 / 空结果 / 错误>
时区:<显示时区>
证据:<脱敏后的返回字段或原始输出位置>
限制:<权限、分页、跨午夜或服务端延迟等>
```

不要把身份证号、手机号、access token 或完整员工数据复制进报告。只保留支撑结论
所需的最小字段;如需把结果交给 HR 或财务,先按组织的数据保留和脱敏规则处理。

## 验证清单

- [ ] 已读取 `lark-shared` 并确认 `--as user` 与授权范围。
- [ ] 已在同一轮执行 `lark-cli schema attendance.user_tasks.query`。
- [ ] 参数只包含 schema 声明的字段,params/data 位置与已授权对象一致;空数组语义已核实或未使用。
- [ ] 日期范围、时区、分页游标和原始结果已记录。
- [ ] 空结果、权限错误和临时失败没有被改写成考勤结论。
- [ ] 输出已脱敏,且没有执行任何写入或权限变更命令。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.