moon-phase

Computes tonight's moon phase and illumination for AI DJ on-air mentions.

1.3k|113|Updated May 11, 2026
One-click install
npx skills add https://github.com/perminder-klair/subwave --skill moon-phase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moon-phase
Source: https://github.com/perminder-klair/subwave/tree/main/docs/examples/skills/moon-phase
Command: npx skills add https://github.com/perminder-klair/subwave --skill moon-phase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Radio DJs often reference the night sky to add atmosphere, but manually checking the lunar phase before every broadcast is impractical. This Skill gives the SUB/WAVE AI DJ a computed moon phase and illumination value so it can decide whether a lunar mention is worth airing.

Core Features & Use Cases

  • Offline Lunar Calculation: Computes the current moon phase from the date using a synodic-month approximation, with no API key or network access required.
  • Notability Filtering: Returns an available flag that is only true for headline phases (full moon, new moon, crescents), so unremarkable phases are skipped automatically.
  • Use Case: During a late-night broadcast, the segment director calls this tool, sees a full moon at 100% illumination, and the DJ works a short in-character line about the moon into the talk break between tracks.

Quick Start

Ask the DJ to check tonight's moon phase and mention it on air only if it is a full moon, new moon, or sharp crescent.

Frequently Asked Questions about moon-phase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate the moon phase in JavaScript without an API?

Compute the days elapsed since a known new moon epoch, take the modulo of the 29.53-day synodic month, and map the result to one of eight phase names. Illumination follows a cosine curve over the cycle, requiring no network calls.

How does the moon-phase skill decide what is worth mentioning on air?

The tool returns an available flag that is true only for full moon, new moon, waxing crescent, and waning crescent phases. Unremarkable phases like gibbous return available false, telling the agent to skip the mention.

Does the moon phase calculation require an API key or internet access?

No, the calculation is fully offline. It uses a synodic-month approximation anchored to the known new moon of January 6, 2000, so no API keys, environment variables, or network requests are needed.

How accurate is a synodic-month approximation for moon phases?

The approximation uses the mean synodic month of 29.530588853 days, which is accurate enough for casual on-air mentions but can drift from precise astronomical ephemeris data. It is unsuitable for scientific or navigation purposes.

What happens if the moon-phase tool throws an error during a broadcast?

The custom skill call is timeout-guarded at 8 seconds, and any thrown error degrades cleanly to a no-data result. The segment director simply treats it as nothing worth airing and the broadcast continues normally.