Lunar Calendar & Almanac Tool for Openclaw

A deterministic calculation tool for precise Chinese Lunar calendar conversion, almanac lookup, and 24 solar terms tracking.

hehuibiao
v0.9.0
Feb 13, 2026
0
2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install lunar-calendar

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install lunar-calendar using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Lunar Calendar & Almanac Tool?

This skill provides a professional-grade interface for handling the complexities of the Chinese Lunar calendar (Yinli) and the traditional almanac (Huangli). Designed to overcome the common hallucinations LLMs face with leap months and precise solar term calculations, this Openclaw Skills integration uses a deterministic Python-based engine. It ensures that any agent requiring traditional date mappings, stems-and-branches (Ganzhi) notation, or zodiac information receives mathematically accurate data rather than probabilistic guesses.

By incorporating this skill, developers can enable agents to accurately identify traditional festivals, calculate the exact second a solar term begins, and provide traditional advice on suitable or unsuitable activities for specific dates. The skill covers a wide historical and future range from 1900 to 2100, making it suitable for both historical research and future event planning.

Lunar Calendar & Almanac Tool Use Cases

  • Converting standard Gregorian (Solar) dates into Lunar formats including stems-and-branches and zodiac signs.
  • Identifying the precise dates for traditional Chinese festivals like the Spring Festival or Dragon Boat Festival.
  • Querying the Huangli (Almanac) for 'Yi' (suitable) and 'Ji' (unsuitable) activities such as weddings, moving, or business openings.
  • Calculating the exact timing of the 24 solar terms (Jieqi) to the second level of precision.
  • Managing complex leap month logic for date-sensitive traditional scheduling.

How Lunar Calendar & Almanac Tool Works

  1. Intent Recognition: The AI agent detects keywords such as lunar, almanac, or specific festival names and extracts the date parameters.
  2. Parameter Extraction: The system determines the direction of conversion (Solar to Lunar or vice versa) and identifies if fortune/almanac data is required.
  3. Script Execution: The agent is strictly prohibited from manual calculation and must invoke the scripts/lunar_calculator.py utility via CLI.
  4. Context Retrieval: If detailed interpretations are requested, the skill selectively loads sections from references/fortune_rules.md or references/solar_terms.md.
  5. Standardized Response: The data is compiled into a structured XML-based template to ensure consistent and parseable output.

Lunar Calendar & Almanac Tool Setup

To integrate this tool within your Openclaw Skills environment, ensure the Python calculation script is accessible in your scripts directory.

# Test Solar to Lunar conversion
python scripts/lunar_calculator.py --solar 2026-02-13

# Test Lunar to Solar conversion with leap month logic
python scripts/lunar_calculator.py --lunar "2026-07-23" --leap false

# Query with Almanac (Fortune) data
python scripts/lunar_calculator.py --solar 2026-02-13 --with-fortune true

Lunar Calendar & Almanac Tool Data Schema & Taxonomy

The skill utilizes a combination of deterministic logic and markdown-based reference data:

Component Type Purpose
lunar_calculator.py Python Script The core engine for all calendar and solar term calculations.
fortune_rules.md Markdown Reference file containing rules for traditional 'Yi/Ji' (suitable/avoid) activities.
solar_terms.md Markdown Definitions and principles of the 24 solar terms used for contextual explanations.
lunar_query_result XML Schema The standardized format for outputting date, zodiac, and fortune data.

Lunar Calendar & Almanac Tool Advanced Features

  • Precision timing for all 24 solar terms calculated to the second level of accuracy.
  • Explicit leap month (Runyue) identification to ensure correct traditional scheduling.
  • Deterministic algorithm spanning the years 1900 to 2100 to prevent LLM date hallucinations.
  • Specialized almanac filtering that strictly adheres to traditional calendar rules without modern interpretations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*