← Back to Skills Marketplace
bettersao

huangli-almanac

by bettersao · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
89
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install huangli-almanac
Description
查询任意日期的黄历信息,包括公历、农历、干支、五行、宜忌等。使用 tiax.cn 的黄历 API 接口, 无需 API 密钥,支持指定年、月、日查询,适合查询结婚、开业、搬家、装修等吉日。
README (SKILL.md)

📅 黄历万年历

查询任意日期的黄历信息,包括公历、农历、干支、五行、宜忌等。使用 tiax.cn 的黄历 API 接口,无需 API 密钥,免费使用。


使用方法

# 查询指定日期(年 月 日)
/almanac 2023 3 2

# 查询今天(自动获取当前日期)
/almanac today

# 查询明天
/almanac tomorrow

# 查询特定节日
/almanac 2024 2 10

# 查询农历生日对应的公历
/almanac 2025 5 1

或者直接对话:

  • "查一下 2024 年 1 月 1 日的黄历"
  • "今天适合结婚吗?"
  • "2024 年 5 月 1 日是什么日子?"
  • "查一下 2023 年 10 月 1 日的宜忌"

返回信息

接口返回完整的黄历信息:

字段 说明
公历日期 西历日期,星期几
农历日期 农历日期,大小月
黄历日期 完整黄历表述
回历日期 伊斯兰历日期
干支日期 年柱、月柱、日柱
五行纳音 日柱五行
值日星神 当日神煞(吉/凶)
适合做的事
不适合做的事

示例

查询 2023 年 3 月 2 日

curl 'api.tiax.cn/almanac/?year=2023&month=3&day=2'

返回结果:

{
  "公历日期": "2023 年 3 月 2 日 星期四",
  "农历日期": "农历二零二三年 二月 (大) 十一",
  "干支日期": "癸卯年 甲寅月 己未日",
  "五行纳音": "天上火",
  "值日星神": "玉堂(吉星)",
  "宜": "动土、入殓、结婚 嫁娶、移柩、安葬、破土",
  "忌": "开业 开幕 开市 作灶 安床 搬迁新宅 乔迁新居 入宅 上梁 裁衣"
}

常见应用场景

1. 查询结婚吉日

/almanac 2024 5 20
/almanac 2024 6 6

2. 查询开业/装修吉日

/almanac 2024 8 18
/almanac 2024 9 9

3. 查询搬家吉日

/almanac 2024 3 16
/almanac 2024 4 4

4. 查询安葬/入殓吉日

/almanac 2024 1 15
/almanac 2024 2 2

实现说明

当调用此技能时,执行以下步骤:

  1. 解析参数 - 提取年、月、日(或 today/tomorrow)
  2. 构建 API 请求 - 使用 curl 调用接口
  3. 处理响应 - 格式化输出 JSON 数据
  4. 解读结果 - 根据宜忌给出建议

API 调用示例

curl -s 'api.tiax.cn/almanac/?year=2023&month=3&day=2' | jq .

自动获取今天日期

YEAR=$(date +%Y)
MONTH=$(date +%m)
DAY=$(date +%d)
curl -s "api.tiax.cn/almanac/?year=$YEAR&month=$MONTH&day=$DAY" | jq .

注意事项

  1. 日期格式:年月日均为数字,月份和日期不足两位时补零(如 2024-01-05)
  2. 范围限制:API 支持 1900-2100 年之间的日期
  3. 无需密钥:接口完全免费,无需 API 密钥
  4. 即时响应:查询结果实时返回,无缓存延迟

错误处理

日期格式错误 → 确保年月日均为数字,格式如 2024 01 15

日期超出范围 → 支持 1900-2100 年之间的日期

网络错误 → 检查网络连接,重试请求


Powered by tiax.cn — 免费黄历 API 服务.

Usage Guidance
This skill appears to do exactly what it says: call https://api.tiax.cn/almanac/ with a year/month/day and print the almanac. Before installing, note the following: (1) The package declares curl and jq but the provided almanac.sh uses python3 to parse JSON and the test script uses the requests library — ensure python3 and the requests package are available or adjust the script; (2) SKILL.md examples sometimes pipe to jq and omit the https:// scheme — use the full https URL as in almanac.sh to avoid errors; (3) The skill makes outbound HTTPS requests to api.tiax.cn (no API key) — if you run this in a sensitive or air-gapped environment, consider whether outbound network calls are acceptable and review tiax.cn's privacy/trustworthiness; (4) There are no credential or file-access requests, so privacy risk is limited to the data you explicitly query (dates). If you need higher assurance, run the scripts locally first and verify their network behavior (e.g., with a proxy) and add python3/requests or modify scripts to use jq consistently.
Capability Assessment
Purpose & Capability
Name/description (黄历查询 via tiax.cn) align with the code and SKILL.md: scripts only call the external API and format results. However, declared required binaries include curl and jq while the shipped shell script uses python3 (and the test script uses the requests library). jq is referenced in examples but not used by almanac.sh; python3/requests are required by the included code but not declared. This is an inconsistency but not evidence of misdirection.
Instruction Scope
SKILL.md and almanac.sh only instruct the agent to construct a date, call the external API at api.tiax.cn, and format output. There are no instructions to read other files, environment variables, or send data to unexpected endpoints. Note: some examples in SKILL.md omit the URL scheme (use 'api.tiax.cn/...' without 'https://') and suggest piping to jq, but the actual almanac.sh parses JSON with python — a mismatch that could confuse runtime behavior.
Install Mechanism
No install spec; this is instruction-only with small helper scripts. Nothing is downloaded from arbitrary URLs or written to system locations. Risk is low from installation perspective.
Credentials
The skill requests no environment variables or credentials and the code does not access secrets or config paths. It only performs outbound HTTPS requests to the stated API, which is appropriate for the stated purpose.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills or global agent settings. Autonomous invocation is allowed (platform default) but not combined with other red flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install huangli-almanac
  3. After installation, invoke the skill by name or use /huangli-almanac
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- 首次发布 huangli-almanac 1.0.0,支持查询任意日期的黄历信息。 - 提供公历、农历、干支、五行、宜忌等多项内容,适合结婚、开业、搬家、安葬等吉日查询。 - 接入 tiax.cn 的黄历 API,无需 API 密钥,支持 today、tomorrow、指定日期查询。 - 命令行和自然语言查询示例丰富,返回数据结构清晰。 - 免费、实时响应,支持 1900–2100 年日期范围。 - 使用了https://u61zgru758.apifox.cn/ 提供的免费API查询接口
Metadata
Slug huangli-almanac
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is huangli-almanac?

查询任意日期的黄历信息,包括公历、农历、干支、五行、宜忌等。使用 tiax.cn 的黄历 API 接口, 无需 API 密钥,支持指定年、月、日查询,适合查询结婚、开业、搬家、装修等吉日。 It is an AI Agent Skill for Claude Code / OpenClaw, with 89 downloads so far.

How do I install huangli-almanac?

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

Is huangli-almanac free?

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

Which platforms does huangli-almanac support?

huangli-almanac is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created huangli-almanac?

It is built and maintained by bettersao (@bettersao); the current version is v1.0.0.

💬 Comments