← 返回 Skills 市场
blueworld415

Cn Holiday Calendar

作者 BlueWorld415 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
0
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cn-holiday-calendar
功能描述
Query gov.cn Chinese holiday notices to determine workdays, holidays, and make-up workdays. Use when the user needs to check whether a specific date is a wor...
使用说明 (SKILL.md)

CN Holiday Calendar

Overview

Use this skill to answer date questions that depend on China's holiday schedule rather than a simple Monday-to-Friday rule. It handles statutory holidays, weekend make-up workdays, ordinary weekdays using official gov.cn notices, and calendar queries based on lunar-python.

Input Modes

Support two input shapes:

  1. YYYY-MM
  2. YYYY-MM-DD

If the input is a month, return every date in that month with:

  • Date
  • Weekday
  • Workday status
  • Holiday or make-up shift name if present
  • Lunar date summary
  • Optional solar term summary if present

If the input is a single date, return the same fields for that date only.

When answering holiday/workday queries, always include the date's lunar summary by default and suggest that more calendar information is available. If the user asks for more, return the expanded calendar information for the date.

Workflow

Resolve the target year's holiday data first:

  1. Look for cache/YYYY.json inside this skill.

  2. If the file exists, use it to answer directly.

  3. If the file does not exist, say 正在获取{年份}年最新节假日安排 once, then call gov_search() from scripts/query_holiday.py to search gov.cn for 节假日安排.

  4. Use this prompt to pick the best search result:

    从下列查询结果的标题中选择最适配 {年份}节假日安排的一个,并给我对应查询结果的链接:{查询结果}

  5. Fetch the selected notice page body with fetch_notice_body(url).

  6. Use this prompt to turn the notice body into JSON:

    这是国务院关于节假日安排的通知,请从这个通知里解析出节假日放假的日期和因为假期调休为工作日的日期:{通知内容},以json的形式体现

  7. Validate the JSON before caching it. At minimum, it should contain:

    • year
    • notice_title
    • notice_url
    • special_days
  8. Save the validated result as cache/{年份}.json.

  9. If you need a one-shot helper, use refresh_year(year) from scripts/query_holiday.py, or the CLI refresh command.

  10. For lunar calendar data, use lunar-python through scripts/query_holiday.py.

Interpretation Rules

  • Do not infer workday status from weekdays alone.
  • Treat weekend make-up shifts as workdays.
  • Treat holiday rest days as non-workdays even if they fall on Monday to Friday.
  • If the cache has a matching date, use it first.
  • If the cache does not list a date, fall back to the normal weekday rule: Monday to Friday are workdays, Saturday and Sunday are not.
  • Do not mention cache hits, cache refresh, or other internal retrieval steps in the user-facing answer; only present the final skill result.
  • If you need a progress line, use only 正在获取{年份}年最新节假日安排 and nothing about cache.
  • For normal answers, include the lunar date summary and the most relevant solar term information if available. If the user explicitly asks for more calendar detail, return the expanded lunar calendar information.

Output Format

For a month query, output a compact table:

  • date
  • weekday
  • workday
  • kind
  • holiday
  • lunar
  • jieqi

For a single-date query, output a short structured summary with the same fields. For expanded calendar output, include a calendar object with the full lunar profile returned by lunar-python.

Lunar Coverage

The lunar-python package can provide more than lunar date and solar terms. Useful date-level information commonly available through the package includes:

  • Lunar date strings and full lunar descriptions
  • Current, previous, and next solar term information
  • Heavenly stems and earthly branches for year, month, day, and time
  • Zodiac information
  • Lunar day auspicious and inauspicious activities
  • Solar, lunar, and traditional festival names
  • Eight characters and related calendar metadata
  • Additional Chinese calendar metadata such as fu periods, seasons, and other traditional calendar attributes

Use the full calendar profile only when the user asks for more detail. For standard holiday/workday answers, keep the response concise and surface the lunar summary by default.

Script

Use scripts/query_holiday.py as the primary entry point for deterministic search, notice-body extraction, cache loading, cache refresh, and date classification.

安全使用建议
Install only if you are comfortable with this skill making outbound web requests and writing a local holiday cache. Prefer running it in an environment where arbitrary internal URLs cannot be reached, because the bundled helper can fetch any supplied URL. The publisher should restrict body fetching to approved gov.cn notice URLs and remove or replace the embedded signing values before this is treated as low-risk.
能力评估
Purpose & Capability
The stated purpose is China holiday/workday lookup from gov.cn notices, but the script also exposes generic gov.cn search and a direct body-fetch command that can retrieve any supplied URL.
Instruction Scope
The main SKILL workflow is scoped to holiday notices, but the CLI surface is broader than the documented use case and does not validate fetched URLs against gov.cn holiday notice pages.
Install Mechanism
The package is a small skill bundle with markdown, YAML, one Python helper, and a JSON cache; there is no installer, background service, or automatic package installation in the artifacts.
Credentials
Outbound network access to gov.cn is expected for refreshing holiday data, but an unrestricted requests.get URL primitive and embedded Athena signing values are overbroad for a calendar lookup skill.
Persistence & Privilege
The only persistence observed is writing yearly cache JSON under the skill cache directory, which is purpose-aligned; no privilege escalation, destructive file operations, or credential-store access was found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cn-holiday-calendar
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cn-holiday-calendar 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of cn-holiday-calendar. - Supports checking workdays, holidays, and make-up workdays in mainland China based on official State Council notices. - Handles both single date and whole month queries, including lunar date and solar term summaries. - Automatically fetches and processes official holiday arrangements if the latest data is not present. - Provides both concise results and expanded lunar calendar profiles on request.
元数据
Slug cn-holiday-calendar
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cn Holiday Calendar 是什么?

Query gov.cn Chinese holiday notices to determine workdays, holidays, and make-up workdays. Use when the user needs to check whether a specific date is a wor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 0 次。

如何安装 Cn Holiday Calendar?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cn-holiday-calendar」即可一键安装,无需额外配置。

Cn Holiday Calendar 是免费的吗?

是的,Cn Holiday Calendar 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cn Holiday Calendar 支持哪些平台?

Cn Holiday Calendar 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cn Holiday Calendar?

由 BlueWorld415(@blueworld415)开发并维护,当前版本 v1.0.0。

💬 留言讨论