← 返回 Skills 市场
541
总下载
1
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install chinese-calendar
功能描述
获取中国日历信息,包括节假日、调休安排、工作日判断。使用 timor.tech API,数据每年自动更新。Use when: 需要判断某天是否是工作日、查询节假日安排、了解调休情况。
使用说明 (SKILL.md)
Chinese Calendar Skill
获取中国日历信息,包括节假日、调休安排、工作日判断。
When to Use
✅ USE this skill when:
- 判断某天是否是工作日(考虑调休)
- 查询节假日安排
- 了解调休补班情况
- 生成工作日历提醒
❌ DON'T use this skill when:
- 只需要普通日期计算 → use built-in date tools
- 需要农历信息 → use lunar calendar tools
- 需要其他国家节假日 → use international calendar APIs
API Source
使用 timor.tech 提供的免费 API:
- 数据每年自动更新
- 包含国务院发布的节假日安排
- 包含调休、补班信息
Commands
查询某天是否是工作日
# 查询今天
curl -s "https://timor.tech/api/holiday/info/$(date +%Y-%m-%d)"
# 查询指定日期
curl -s "https://timor.tech/api/holiday/info/2026-02-28"
# 查询明天
curl -s "https://timor.tech/api/holiday/info/$(date -d 'tomorrow' +%Y-%m-%d 2>/dev/null || date -v+1d +%Y-%m-%d)"
查询指定年份的所有节假日
# 查询2026年所有节假日
curl -s "https://timor.tech/api/holiday/year/2026/"
批量查询多个日期
# 查询本周所有日期\for day in {0..6}; do
date_str=$(date -d "$day days" +%Y-%m-%d 2>/dev/null || date -v+${day}d +%Y-%m-%d)
curl -s "https://timor.tech/api/holiday/info/$date_str"
echo ""
done
Response Format
工作日/节假日信息
{
"code": 0,
"type": {
"type": 0, // 0: 工作日, 1: 周末, 2: 节日, 3: 调休
"name": "工作日",
"week": 6 // 星期几 (1-7)
},
"holiday": {
"holiday": false, // 是否放假
"name": null, // 节日名称
"wage": 1, // 工资倍数 (1, 2, 3)
"target": null, // 对应哪个节日
"after": false, // 是否是节后补班
"date": "2026-02-28", // 日期
"rest": 1 // 休息天数
}
}
Type 类型说明
| type | 含义 |
|---|---|
| 0 | 工作日 |
| 1 | 周末 |
| 2 | 节日 |
| 3 | 调休 |
Holiday 类型说明
| 场景 | holiday | after | 示例 |
|---|---|---|---|
| 正常工作日 | false | false | 周一到周五 |
| 正常周末 | true | false | 周六、周日 |
| 节假日 | true | false | 春节、国庆 |
| 调休补班 | false | true | 春节后补班 |
Usage Examples
判断明天是否需要上班
response=$(curl -s "https://timor.tech/api/holiday/info/$(date -d 'tomorrow' +%Y-%m-%d)")
if echo "$response" | grep -q '"holiday":false'; then
echo "明天是工作日,需要上班"
else
echo "明天放假,不用上班"
fi
获取下周所有工作日
for day in {1..7}; do
date_str=$(date -d "$day days" +%Y-%m-%d)
response=$(curl -s "https://timor.tech/api/holiday/info/$date_str")
if echo "$response" | grep -q '"holiday":false'; then
echo "$date_str: 工作日"
fi
done
查询节假日名称
curl -s "https://timor.tech/api/holiday/info/2026-02-17" | grep -o '"name":"[^"]*"'
PowerShell Usage (Windows)
在 Windows PowerShell 中使用:
# 查询今天
$response = Invoke-RestMethod -Uri "https://timor.tech/api/holiday/info/$(Get-Date -Format 'yyyy-MM-dd')"
$response.type.name
$response.holiday.holiday
# 查询明天
$tomorrow = (Get-Date).AddDays(1).ToString("yyyy-MM-dd")
$response = Invoke-RestMethod -Uri "https://timor.tech/api/holiday/info/$tomorrow"
$response
Integration with OpenClaw
在 Agent 中使用此 skill:
- 读取本 SKILL.md 了解 API 用法
- 使用 web_fetch 或 exec 调用 API
- 解析 JSON 响应
- 根据结果生成提醒或调整计划
Example Workflow
1. 获取明天的日期
2. 调用 timor.tech API 查询
3. 判断是否是工作日
4. 如果是工作日 → 正常发送下班提醒
5. 如果是假期 → 发送假期祝福,跳过下班提醒
Notes
- API 免费使用,无需注册
- 数据每年由 timor.tech 维护更新
- 节假日安排以国务院发布为准
- 支持年份范围:当年及前后几年
Related
- 农历查询:需配合其他农历 API
- 国际节假日:使用 date.nager.at API
安全使用建议
This skill is coherent and low-risk in isolation: it makes read-only calls to the public timor.tech API and needs only curl/PowerShell. Before enabling broadly, consider: (1) timor.tech is a third-party service — if you care about privacy/auditability, check its policy and availability; (2) test the example commands on your target OS because date flags differ between GNU (Linux) and BSD/macOS; (3) the SKILL.md contains a small formatting/glitch in one loop example — review/test scripts before running them; (4) if you prefer to avoid any autonomous network access, disable autonomous invocation for the agent or restrict this skill to manual use.
功能分析
Type: OpenClaw Skill
Name: chinese-calendar
Version: 1.0.0
The skill is designed to fetch Chinese calendar information (holidays, workdays) from the `timor.tech` API. All `curl` commands consistently target `https://timor.tech/api/holiday/` and are used to retrieve data, not to execute remote payloads or exfiltrate local data. The `SKILL.md` instructions for the AI agent are clear, align with the stated purpose, and do not contain any directives for malicious actions, data theft, or unauthorized operations. There is no evidence of obfuscation, persistence mechanisms, or attempts to compromise the system or the agent.
能力评估
Purpose & Capability
Name/description (Chinese calendar, holidays, workday checks) matches the instructions and required binary. The only required binary is curl which is appropriate for the provided curl examples. There are no unrelated credentials, binaries, or config paths requested.
Instruction Scope
SKILL.md only instructs performing HTTP GETs against timor.tech endpoints and parsing their JSON responses (bash and PowerShell examples). It does not instruct reading local secrets or arbitrary files, nor sending data to other endpoints. Note: some example date commands differ between GNU date and BSD/macOS date and one batch snippet contains a small formatting glitch, but this is an implementation detail rather than a scope issue.
Install Mechanism
No install spec or archive downloads — instruction-only skill. No packages or remote downloads are performed by the skill itself, lowering install-time risk.
Credentials
The skill requires no environment variables, credentials, or config paths. That is proportionate for a read-only public-API calendar lookup.
Persistence & Privilege
always is false and the skill does not request persistent system-level privileges. The skill can be invoked autonomously by the agent (disable-model-invocation=false), which is the platform default; this is expected for an integration but should be noted if you want to limit autonomous network calls.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install chinese-calendar - 安装完成后,直接呼叫该 Skill 的名称或使用
/chinese-calendar触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Chinese Calendar Skill v1.0.0
- Initial release providing access to Chinese calendar information via the timor.tech API.
- Supports checking if a date is a workday, holiday, or adjusted work/rest day.
- Allows retrieval of annual holiday schedules and batch queries for multiple dates.
- Includes code examples for Bash and PowerShell.
- Data auto-updates yearly with official public holiday arrangements.
- Designed for use in automation and reminders regarding workdays and holidays in China.
元数据
常见问题
中国日历 是什么?
获取中国日历信息,包括节假日、调休安排、工作日判断。使用 timor.tech API,数据每年自动更新。Use when: 需要判断某天是否是工作日、查询节假日安排、了解调休情况。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 541 次。
如何安装 中国日历?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install chinese-calendar」即可一键安装,无需额外配置。
中国日历 是免费的吗?
是的,中国日历 完全免费(开源免费),可自由下载、安装和使用。
中国日历 支持哪些平台?
中国日历 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 中国日历?
由 TEweitao(@teweitao)开发并维护,当前版本 v1.0.0。
推荐 Skills