sun-and-moon

GitHub

获取任意地点的日出日落、黄金时刻、月相及昼长。自动处理时区转换,提供摄影窗口和可复用命令,无需API密钥。

exports/openclaw/sun-and-moon/SKILL.md mohitagw15856/pm-claude-skills

Trigger Scenarios

询问日落时间 查询黄金时刻 了解昼长 查看月相

Install

npx skills add mohitagw15856/pm-claude-skills --skill sun-and-moon -g -y
More Options

Non-standard path

npx skills add https://github.com/mohitagw15856/pm-claude-skills/tree/main/exports/openclaw/sun-and-moon -g -y

Use without installing

npx skills use mohitagw15856/pm-claude-skills@sun-and-moon

指定 Agent (Claude Code)

npx skills add mohitagw15856/pm-claude-skills --skill sun-and-moon -a claude-code -g -y

安装 repo 全部 skill

npx skills add mohitagw15856/pm-claude-skills --all -g -y

预览 repo 内 skill

npx skills add mohitagw15856/pm-claude-skills --list

SKILL.md

Frontmatter
{
    "name": "sun-and-moon",
    "homepage": "https:\/\/mohitagw15856.github.io\/pm-claude-skills\/skill\/sun-and-moon.html",
    "metadata": {
        "openclaw": {
            "emoji": "🧠"
        }
    },
    "description": "Get sunrise, sunset, golden hour, day length, and moon phase for any location with zero API keys — sunrise-sunset.org and Open-Meteo via curl, times converted to local. Use when asked when is sunset today, golden hour for a photo shoot, how long is the day, what's the moon phase tonight, or sun times for a date and place. Produces the sun\/moon times in the user's local zone (the UTC trap handled), the photography windows, and the rerunnable command."
}

Sun and Moon Skill

Sunset time drives photo shoots, hikes, drone flights, fasting schedules, and the eternal "do we have time before dark" — and two keyless services answer it for any coordinates and date. This skill fetches, then does the two things the raw response doesn't: converts UTC to the place's local time (the classic wrong-answer generator in this domain), and derives the windows people actually want — golden hour, blue hour, usable daylight.

What This Skill Produces

  • The times — sunrise, sunset, solar noon, twilight bounds — in the location's local time, labeled
  • The derived windows — golden hour (~the hour after sunrise / before sunset), blue hour, day length and its current trend
  • Moon phase — tonight's phase with the plain-language name
  • The command — exact curl, rerunnable

Required Inputs

Ask for these if not provided:

  • Location — lat/lon or a place name (geocode via https://geocoding-api.open-meteo.com/v1/search?name=Lisbon&count=1)
  • The date — today default; any date works (both services take past and future dates)
  • The real question — a shoot wants golden hour, a hike wants last-light, "is it a full moon" wants the phase — lead with theirs

Framework: The Calls and the UTC Trap

  1. sunrise-sunset.org — primary: curl -s "https://api.sunrise-sunset.org/json?lat=35.68&lng=139.69&formatted=0&date=2026-07-19" → ISO times including civil_twilight_begin/end and day_length (seconds). Always formatted=0 and always convert: the times are UTC, and serving Tokyo's sunset as "09:57" is this domain's signature failure. Get the zone from the world-clock pattern or Open-Meteo's timezone=auto.
  2. Open-Meteo — fallback and bulk: curl -s "https://api.open-meteo.com/v1/forecast?latitude=35.68&longitude=139.69&daily=sunrise,sunset,daylight_duration&timezone=auto&forecast_days=7"timezone=auto returns local times directly (safer), and a week in one call for trend questions.
  3. Moon phase: curl -s "wttr.in/Tokyo?format=%m" → the phase emoji; for the name and precision, compute from the synodic cycle (29.53 days from a known new moon) and say "waxing gibbous, ~87% illuminated" — labeled as computed.
  4. The derived windows: golden hour ≈ sun within 6° of horizon — practical answer: the ~60 minutes after sunrise and before sunset; blue hour ≈ civil twilight. State them as ranges ("golden hour: 18:40–19:45"), which is what the photographer books.
  5. Trend and context: day_length compared across the week answers "are days getting longer"; near solstices, note the daily change is seconds, near equinoxes minutes — precision theater either way is avoided.

Output Format

Sun & Moon: [location] — [date]

[The lead answer: "Sunset 19:45 local; golden hour 18:45–19:45."]

Event Local time
[Sunrise · solar noon · sunset · civil twilight · day length]

Moon: [phase name, ~illumination] [Trend line if asked: day length vs. yesterday/next week]

Source: [sunrise-sunset.org / Open-Meteo] · times local to [zone] · rerun: [exact curl]

Quality Checks

  • Every time is explicitly local to the location, with the zone named
  • formatted=0 was used and UTC→local conversion applied (or timezone=auto took care of it)
  • The asked-for window (golden hour, last light) leads the answer
  • Moon phase carries its name, not just an emoji
  • Computed values (moon %, golden hour) are labeled as derived

Anti-Patterns

  • Do not serve UTC times as local — the single failure mode this skill exists to prevent
  • Do not answer from memory — sun times shift daily and by latitude dramatically
  • Do not give bare sunset when the question was a photography or safety window
  • Do not overstate moon precision — phase and rough illumination, not fake decimals
  • Do not ignore polar edge cases — high latitudes in summer/winter return no-sunset/no-sunrise; report that as the (correct) answer, not an error

Version History

  • 54fad50 Current 2026-07-19 12:35

Same Skill Collection

exports/openclaw/360-feedback-template/SKILL.md
exports/openclaw/401k-plan-decoder/SKILL.md
exports/openclaw/ab-test-planner/SKILL.md
exports/openclaw/ab-test-readout/SKILL.md
exports/openclaw/accessibility-audit/SKILL.md
exports/openclaw/account-plan/SKILL.md
exports/openclaw/acquirer-red-team/SKILL.md
exports/openclaw/ad-copy/SKILL.md
exports/openclaw/aeo-optimizer/SKILL.md
exports/openclaw/agenda-or-cancel/SKILL.md
exports/openclaw/agent-design-review/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/ai-ethics-review/SKILL.md
exports/openclaw/ai-eval-plan/SKILL.md
exports/openclaw/ai-feature-prd/SKILL.md
exports/openclaw/ai-product-canvas/SKILL.md
exports/openclaw/air-quality/SKILL.md
exports/openclaw/altitude-shifter/SKILL.md
exports/openclaw/ambiguity-resolver/SKILL.md
exports/openclaw/analyst-relations-brief/SKILL.md
exports/openclaw/announcement-card/SKILL.md
exports/openclaw/api-docs-writer/SKILL.md
exports/openclaw/api-test-plan/SKILL.md
exports/openclaw/api-versioning-strategy/SKILL.md
exports/openclaw/apology-letter/SKILL.md
exports/openclaw/architecture-decision-record/SKILL.md
exports/openclaw/architecture-diagram/SKILL.md
exports/openclaw/archive-strategy/SKILL.md
exports/openclaw/assumption-bounty/SKILL.md
exports/openclaw/assumption-mapper/SKILL.md
exports/openclaw/async-update-format/SKILL.md
exports/openclaw/auto-repair-estimate-decoder/SKILL.md
exports/openclaw/autopilot-charter/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-minutes/SKILL.md
exports/openclaw/board-pre-read/SKILL.md
exports/openclaw/bom-cost-review/SKILL.md
exports/openclaw/bookkeeping-categorization/SKILL.md
exports/openclaw/boolean-search-builder/SKILL.md
exports/openclaw/brag-doc/SKILL.md
exports/openclaw/brainstorming/SKILL.md
exports/openclaw/brief-builder/SKILL.md
exports/openclaw/briefing-note/SKILL.md
exports/openclaw/budget-builder/SKILL.md
exports/openclaw/budget-variance-analysis/SKILL.md
exports/openclaw/bug-diagnosis/SKILL.md
exports/openclaw/bug-report/SKILL.md

Metadata

Files
0
Version
471c606
Hash
562d866b
Indexed
2026-07-19 12:35

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 11:12
浙ICP备14020137号-1 $방문자$