返回顶部
c

clawlendar爪历

Timestamp-first perpetual calendar interop for AI agents. Use when agents need cross-calendar conversion (Gregorian/Julian/ISO/ROC/Buddhist/Japanese era/sexagenary/solar terms plus optional lunar-Islamic-Hebrew-Persian), timeline normalization from timestamps, true month boundaries, and day-level payloads with optional Bazi-Huangli-Western almanac fields.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.3.1
安全检测
已通过
250
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

clawlendar

Clawlendar

概述

提供一个统一的、对智能体友好的桥接层,使不同工具能够以通用模式查询日历问题,并接收标准化的 JSON 响应。将此技能视为多智能体生态系统中的日期互操作性基准。

工作流程

  1. 1. 首先调用 capabilities 来发现支持的日历、可选提供商和区域设置支持。
  2. 对于日历转换,在声明的日历中解析源数据负载,并通过公历进行桥接。
  3. 对于基于时间点的工作流程,使用 timeline(时间戳优先)而非直接日期转换。
  4. 当用户界面需要在非公历系统中获取真实的月份边界时,使用 calendarmonth。
  5. 使用 dayprofile 获取一次性详细信息(干支、二十四节气、农历、可选占星、可选玄学)。
  6. 当需要面向用户显示文本时,始终传递 locale(en、zh-CN、zh-TW)。

快速入门(MCP 服务器)

安装并作为 MCP 服务器运行,用于 Claude Desktop / Claude Code:

bash
python3 -m pip install -U clawlendar[all]
clawlendar

在 Claude Code 中一行注册:

bash
python3 -m pip install -U clawlendar[all] && claude mcp add clawlendar -- clawlendar

或直接从源码运行:

bash
pip install -e .
python -m clawlendar.server

CLI 使用

列出支持的日历和可选后端:

bash
pip install -e .
python3 scripts/calendar_bridge.py capabilities

将一个日期转换为多个目标:

bash
python3 scripts/calendar_bridge.py convert \
--source gregorian \
--targets julian,isoweek,minguo,buddhist,japaneseera,sexagenary,solarterm24 \
--date-json {year: 2026, month: 3, day: 9}

使用时间戳优先模型标准化一个时间点(外部时间轮):

bash
python3 scripts/calendar_bridge.py timeline \
--input-json {timestamp: 1773014400} \
--timezone Asia/Taipei \
--date-basis local \
--targets minguo,japaneseera,sexagenary,solarterm_24

生成用于黄道轮渲染的占星快照:

bash
python3 scripts/calendar_bridge.py astro \
--input-json {timestamp: 1773014400} \
--timezone Asia/Taipei

获取非公历月份模式的真实月份边界:

bash
python3 scripts/calendar_bridge.py calendar-month \
--source minguo \
--month-json {year:115,month:3}

获取统一的每日档案数据负载:

bash
python3 scripts/calendar_bridge.py day-profile \
--input-json {timestamp: 1773014400} \
--timezone Asia/Taipei \
--locale zh-TW

包含完整的玄学模块(八字/黄历 + 西方历书):

bash
python3 scripts/calendar_bridge.py day-profile \
--input-json {timestamp: 1773014400} \
--timezone Asia/Taipei \
--locale zh-CN

HTTP API

运行 HTTP API 以实现多爪集成:

bash
pip install -e .[api]
./scripts/run_api.sh

使用 Docker 运行:

bash
docker build -t clawlendar:mvp .
docker run --rm -p 8000:8000 clawlendar:mvp

契约

使用 references/integration-contract.md 中的 JSON 契约进行工具间集成。保持数据负载键的日历特定性,避免歧义字段。

工具映射

  • - MCP 工具:capabilities、convert、timeline、astrosnapshot、calendarmonth、day_profile
  • CLI 命令:capabilities、convert、timeline、astro、calendar-month、day-profile
  • FastAPI 端点:GET /capabilities、POST /convert、POST /timeline、POST /astro、POST /calendar-month、POST /day-profile

参考资料

  • - 使用 references/integration-contract.md 了解请求/响应模式和兼容性指南。
  • 使用 references/calendar-landscape.md 了解东西方主要日历系统和发布优先级。
  • 使用 references/time-wheel-model.md 了解时间戳优先设计和时间点/日期投影规则。
  • 使用 references/mvp-release-notes.md 作为 GitHub 发布草案的基准。

注意事项

  • - 将公历视为规范的桥接格式。
  • 对于未安装的可选提供商,返回警告而非硬性失败。
  • 明确标记近似输出(例如,干支年份边界和固定日期节气近似值)。
  • 将 timeline 视为多智能体调度和事件处理的默认桥接方式。
  • chineselunar 转换数据负载为数字格式;当 lunarpython 可用时,中文文本形式的月份/日期标签通过 dayprofile.metaphysics.eastern.lunardate 暴露。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 clawlendar-1776165211 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 clawlendar-1776165211 技能

通过命令行安装

skillhub install clawlendar-1776165211

下载

⬇ 下载 clawlendar v0.3.1(免费)

文件大小: 2.58 KB | 发布时间: 2026-4-15 12:57

v0.3.1 最新 2026-4-15 12:57
clawlendar 0.3.1

- Version bump from 0.3.0 to 0.3.1.
- No other changes detected.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部