← 返回
开发者工具 中文

Clawlendar

Timestamp-first perpetual calendar interop for AI agents. Use when agents need cross-calendar conversion (Gregorian/Julian/ISO/ROC/Buddhist/Japanese era/sexa...
**时间戳优先的AI代理万年历互操作:跨日历转换(公历/儒略历/ISO/ROC/佛历/日本年号/六十甲子)**
hosuke hosuke 来源
开发者工具 clawhub v0.3.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 818
下载
💾 10
安装
1
版本
#astrology#bazi#calendar#conversion#east-asian#i18n#latest#mcp-server#metaphysics#python#timestamp

概述

Clawlendar

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

  1. Call capabilities first to discover supported calendars, optional providers, and locale support.
  2. For calendar conversion, parse source payload in declared calendar and bridge through Gregorian.
  3. For instant-based workflows, use timeline (timestamp-first) instead of direct date conversion.
  4. Use calendar_month when UI needs true month boundaries in non-Gregorian systems.
  5. Use day_profile for one-call details (sexagenary, solar_term_24, chinese_lunar, optional astro, optional metaphysics).
  6. Always pass locale (en, zh-CN, zh-TW) when user-facing text is required.

Quick Start (MCP Server)

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.

版本历史

共 1 个版本

  • v0.3.1 当前
    2026-03-29 21:47 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,082 📥 811,679

Llmwiki

hosuke
LLM驱动的个人知识库。将原始文档输入后,LLM将其编译为结构化互链的维基,包含三语文章、涌现式分类体系等功能。
★ 0 📥 673
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,228 📥 267,973