简介
AI agents 的多历法互操作桥接器,支持公历/民国纪年/干支/节气等 10+ 种历法转换,提供时间戳优先的标准化 JSON 接口
原始描述
Timestamp-first perpetual calendar interop for AI agents. Use when agents need cross-calendar conversion (Gregorian/Julian/ISO/ROC/Buddhist/Japanese era/sexa...
通过你的 Agent 添加
安装目录:clawlendar/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: clawlendar
version: 0.3.1
description: 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.
author: Huang Geyang
metadata:
openclaw:
homepage: https://github.com/Hosuke/Clawlender
requires:
bins:
- python3
- pip
Clawlendar
Overview
Overview
Provide a single, agent-friendly bridge layer so different tools can ask calendar questions in a common schema and receive normalized JSON. Treat this skill as the date interoperability baseline for multi-agent ecosystems.
Workflow
- Call
capabilities first to discover supported calendars, optional providers, and locale support.
- For calendar conversion, parse source payload in declared calendar and bridge through Gregorian.
- For instant-based workflows, use
timeline (timestamp-first) instead of direct date conversion.
- Use
calendar_month when UI needs true month boundaries in non-Gregorian systems.
- Use
day_profile for one-call details (sexagenary, solar_term_24, chinese_lunar, optional astro, optional metaphysics).
- Always pass
locale (en, zh-CN, zh-TW) when user-facing text is required.
Quick Start (MCP Server)
capabilities first to discover supported calendars, optional providers, and locale support.timeline (timestamp-first) instead of direct date conversion.calendar_month when UI needs true month boundaries in non-Gregorian systems.day_profile for one-call details (sexagenary, solar_term_24, chinese_lunar, optional astro, optional metaphysics).locale (en, zh-CN, zh-TW) when user-facing text is required.Install and run as an MCP server for Claude Desktop / Claude Code:
python3 -m pip install -U "clawlendar[all]"
clawlendar
One-line registration in Claude Code:
python3 -m pip install -U "clawlendar[all]" && claude mcp add clawlendar -- clawlendar
Or run directly from source:
pip install -e .
python -m clawlendar.server
CLI Usage
List supported calendars and optional backends:
pip install -e .
python3 scripts/calendar_bridge.py capabilities
Convert one date into multiple targets:
python3 scripts/calendar_bridge.py convert \
--source gregorian \
--targets julian,iso_week,minguo,buddhist,japanese_era,sexagenary,solar_term_24 \
--date-json '{"year": 2026, "month": 3, "day": 9}'
Normalize one instant with timestamp-first model (external time wheel):
python3 scripts/calendar_bridge.py timeline \
--input-json '{"timestamp": 1773014400}' \
--timezone 'Asia/Taipei' \
--date-basis local \
--targets minguo,japanese_era,sexagenary,solar_term_24
Generate an astro snapshot for zodiac wheel rendering:
python3 scripts/calendar_bridge.py astro \
--input-json '{"timestamp": 1773014400}' \
--timezone 'Asia/Taipei'
Get true month boundaries for non-Gregorian month mode:
python3 scripts/calendar_bridge.py calendar-month \
--source minguo \
--month-json '{"year":115,"month":3}'
Get unified daily profile payload:
python3 scripts/calendar_bridge.py day-profile \
--input-json '{"timestamp": 1773014400}' \
--timezone 'Asia/Taipei' \
--locale 'zh-TW'
Include full metaphysics block (Bazi/Huangli + Western almanac):
python3 scripts/calendar_bridge.py day-profile \
--input-json '{"timestamp": 1773014400}' \
--timezone 'Asia/Taipei' \
--locale 'zh-CN'
HTTP API
Run HTTP API for multi-claw integration:
pip install -e ".[api]"
./scripts/run_api.sh
Run with Docker:
docker build -t clawlendar:mvp .
docker run --rm -p 8000:8000 clawlendar:mvp
Contract
Use the JSON contract in references/integration-contract.md for tool-to-tool integration. Keep payload keys calendar-specific and avoid ambiguous fields.
Tool Mapping
- MCP tools:
capabilities, convert, timeline, astro_snapshot, calendar_month, day_profile
- CLI commands:
capabilities, convert, timeline, astro, calendar-month, day-profile
- FastAPI endpoints:
GET /capabilities, POST /convert, POST /timeline, POST /astro, POST /calendar-month, POST /day-profile
References
- Use
references/integration-contract.md for request/response schema and compatibility guidance.
- Use
references/calendar-landscape.md for East/West major calendar systems and rollout priorities.
- Use
references/time-wheel-model.md for timestamp-first design and instant/date projection rules.
- Use
references/mvp-release-notes.md as GitHub release draft baseline.
Notes
- Treat Gregorian as the canonical bridge format.
- Return warnings instead of hard-failing for optional providers that are not installed.
- Mark approximate outputs explicitly (for example, sexagenary year boundaries and fixed-date solar-term approximation).
- Treat
timeline as the default bridge for multi-agent scheduling and event processing.
chinese_lunar conversion payload is numeric; Chinese textual month/day labels are exposed via day_profile.metaphysics.eastern.lunar_date when lunar_python is available.
capabilities, convert, timeline, astro_snapshot, calendar_month, day_profilecapabilities, convert, timeline, astro, calendar-month, day-profileGET /capabilities, POST /convert, POST /timeline, POST /astro, POST /calendar-month, POST /day-profile- Use
references/integration-contract.mdfor request/response schema and compatibility guidance. - Use
references/calendar-landscape.mdfor East/West major calendar systems and rollout priorities. - Use
references/time-wheel-model.mdfor timestamp-first design and instant/date projection rules. - Use
references/mvp-release-notes.mdas GitHub release draft baseline.
Notes
- Treat Gregorian as the canonical bridge format.
- Return warnings instead of hard-failing for optional providers that are not installed.
- Mark approximate outputs explicitly (for example, sexagenary year boundaries and fixed-date solar-term approximation).
- Treat
timeline as the default bridge for multi-agent scheduling and event processing.
chinese_lunar conversion payload is numeric; Chinese textual month/day labels are exposed via day_profile.metaphysics.eastern.lunar_date when lunar_python is available.
timeline as the default bridge for multi-agent scheduling and event processing.chinese_lunar conversion payload is numeric; Chinese textual month/day labels are exposed via day_profile.metaphysics.eastern.lunar_date when lunar_python is available.正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。