{"id":"6a94b02d-1869-4b03-8ae0-840320a3c6c7","entityType":"agent","slug":"clawhub-dynamicsalex-astro-lunar-insights","name":"Astro Lunar Insights","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dynamicsalex-astro-lunar-insights","canonicalPath":"/agent/clawhub-dynamicsalex-astro-lunar-insights","generatedAt":"2026-10-11T10:51:54.361Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":null},"description":"Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Skill: Astro Lunar Insights Owner: dynamicsalex Summary: Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Tags: latest:1.3.3 Version history: v1.3.3 | 2026-06-24T18:57:39.579Z | user QR code now renders by default via bundled frame_small.png.dat; --frame no longer required v1.3.2 | 2026-06-10T11:45:26.595Z | user Embed","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17f1j49zad5p9q8z82sw3me2d87esv0:astro-lunar-insights","sourceUrl":"https://clawhub.ai/dynamicsalex/astro-lunar-insights","homepage":"https://clawhub.ai/dynamicsalex/skills/astro-lunar-insights","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dynamicsalex/astro-lunar-insights","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dynamicsalex/skills/astro-lunar-insights","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Skill: Astr"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":null},"stars":null,"forks":null,"downloads":1116,"packageName":null,"latestVersion":"1.3.3","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:12:07.357Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T08:12:07.429Z","lastCrawledAt":"2026-10-11T08:12:07.357Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T08:12:07.357Z","lastVerifiedAt":null,"highlights":[{"version":"1.3.3","createdAt":"2026-06-24T18:57:39.579Z","changelog":"QR code now renders by default via bundled frame_small.png.dat; --frame no longer required","fileCount":11,"zipByteSize":2927377},{"version":"1.3.2","createdAt":"2026-06-10T11:45:26.595Z","changelog":"Embed QR frame image (.png.dat) after conclusion, right-aligned to text block. Compact AI interpretation. No .png files in skill directory.","fileCount":11,"zipByteSize":2926947},{"version":"1.3.1","createdAt":"2026-06-10T11:36:03.588Z","changelog":"Embed QR frame image after conclusion, right-aligned to text block. Compact AI interpretation (120-180 words per metric). Assets folder for images.","fileCount":10,"zipByteSize":2895017},{"version":"1.3.0","createdAt":"2026-06-10T08:59:40.369Z","changelog":"Fix planet symbol rendering: add planet symbols (U+2609-U+2647) to _SYM_SET so they render via symbol font instead of text font. Remove debug stderr output from rtext().","fileCount":10,"zipByteSize":2894641},{"version":"1.2.0","createdAt":"2026-06-07T03:00:20.105Z","changelog":"v1.2.0: aspect symbols in text panel, dual date format, --target-date in draw_lunar - Section 8 (Aspects) now renders graphical aspect symbols from seguisym.ttf instead of text names (Trine, Square, etc.), with per-aspect color coding - draw_lunar.py now accepts --target-date flag and passes to subprocess - lunar_analysis.py --target-date parsed as explicit flag (not just positional) - Support both DD.MM.YYYY and YYYY-MM-DD date formats - AI Conclusion rule: agents MUST always provide extended interpretation when possible - Updated AI workflow to 4-step process with conclusion file","fileCount":10,"zipByteSize":2893335},{"version":"1.1.0","createdAt":"2026-06-06T11:40:11.956Z","changelog":"v1.1.0 cosmetic overhaul: font sizes match natal chart, colored planet/aspect names in text, raised wheel titles, faster text wrapping, always-visible conclusion section, fixed aspect list rendering, improved interp_text robustness","fileCount":9,"zipByteSize":2889624},{"version":"1.0.2","createdAt":"2026-06-06T05:20:40.548Z","changelog":"v1.0.2: AI conclusion rendering restructured - AI interpretations distributed across metric sections (1-8) instead of piled into section 9. New AI conclusion JSON format with metric keys at top level. Helper functions interp_text() and show_interp() for unified text extraction. AI mode shows full text without truncation. Section 8 (Aspects) gets AI interpretation after aspect list. Section 9 (Conclusion) shows only overall summary. Updated SKILL.md with AI Conclusion JSON Format specification.","fileCount":9,"zipByteSize":2888027},{"version":"1.0.1","createdAt":"2026-06-05T11:50:25.106Z","changelog":"astro-lunar-insights 1.0.1 - Added --output CLI argument to write JSON output directly to file (UTF-8), improving automation and encoding compatibility. - Documentation updated to include the new --output flag and its usage. - Removed obsolete skill-card.md file for a cleaner repo.","fileCount":9,"zipByteSize":2887252}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f1j49zad5p9q8z82sw3me2d87esv0:astro-lunar-insights","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T10:51:54.358Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dynamicsalex-astro-lunar-insights/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":null},"readme":"Skill: Astro Lunar Insights\n\nOwner: dynamicsalex\n\nSummary: Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis.\n\nTags: latest:1.3.3\n\nVersion history:\n\nv1.3.3 | 2026-06-24T18:57:39.579Z | user\n\nQR code now renders by default via bundled frame_small.png.dat; --frame no longer required\n\nv1.3.2 | 2026-06-10T11:45:26.595Z | user\n\nEmbed QR frame image (.png.dat) after conclusion, right-aligned to text block. Compact AI interpretation. No .png files in skill directory.\n\nv1.3.1 | 2026-06-10T11:36:03.588Z | user\n\nEmbed QR frame image after conclusion, right-aligned to text block. Compact AI interpretation (120-180 words per metric). Assets folder for images.\n\nv1.3.0 | 2026-06-10T08:59:40.369Z | user\n\nFix planet symbol rendering: add planet symbols (U+2609-U+2647) to _SYM_SET so they render via symbol font instead of text font. Remove debug stderr output from rtext().\n\nv1.2.0 | 2026-06-07T03:00:20.105Z | user\n\nv1.2.0: aspect symbols in text panel, dual date format, --target-date in draw_lunar\n\n- Section 8 (Aspects) now renders graphical aspect symbols from seguisym.ttf instead of text names (Trine, Square, etc.), with per-aspect color coding\n- draw_lunar.py now accepts --target-date flag and passes to subprocess\n- lunar_analysis.py --target-date parsed as explicit flag (not just positional)\n- Support both DD.MM.YYYY and YYYY-MM-DD date formats\n- AI Conclusion rule: agents MUST always provide extended interpretation when possible\n- Updated AI workflow to 4-step process with conclusion file\n\nv1.1.0 | 2026-06-06T11:40:11.956Z | user\n\nv1.1.0 cosmetic overhaul: font sizes match natal chart, colored planet/aspect names in text, raised wheel titles, faster text wrapping, always-visible conclusion section, fixed aspect list rendering, improved interp_text robustness\n\nv1.0.2 | 2026-06-06T05:20:40.548Z | user\n\nv1.0.2: AI conclusion rendering restructured - AI interpretations distributed across metric sections (1-8) instead of piled into section 9. New AI conclusion JSON format with metric keys at top level. Helper functions interp_text() and show_interp() for unified text extraction. AI mode shows full text without truncation. Section 8 (Aspects) gets AI interpretation after aspect list. Section 9 (Conclusion) shows only overall summary. Updated SKILL.md with AI Conclusion JSON Format specification.\n\nv1.0.1 | 2026-06-05T11:50:25.106Z | auto\n\nastro-lunar-insights 1.0.1\n\n- Added --output CLI argument to write JSON output directly to file (UTF-8), improving automation and encoding compatibility.\n- Documentation updated to include the new --output flag and its usage.\n- Removed obsolete skill-card.md file for a cleaner repo.\n\nv1.0.0 | 2026-06-05T11:04:17.668Z | auto\n\nastro-lunar-insights 1.0.0 — Initial Release\n\n- Provides comprehensive personal lunar phase and Moon influence analysis using Swiss Ephemeris (pyswisseph).\n- Calculates Moon phases, transit Moon aspects to natal Moon, personal solar-lunar phase, lunar day (tithi), Moon speed/illumination, perigee/apogee, and transit Moon aspects to all natal planets.\n- Analyzes and displays transit Moon in natal houses with detailed interpretations.\n- Outputs results as text, JSON, and graphical 2-wheel chart with bilingual (RU/EN) support.\n- Includes precise astronomical calculations (~0.003° accuracy), requires Python 3.14, Pillow 12.x, MSVC++ 2015–2022 (Windows 10/11 supported).\n- Related to astro-daily-transits and astro-natal-chart skills.\n\nArchive index:\n\nArchive v1.3.3: 11 files, 2927377 bytes\n\nFiles: _meta.json (139b), README.md (4907b), scripts/draw_lunar.py (38557b), scripts/frame_small.png.dat (32356b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (26093b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2582b), SKILL.md (24315b)\n\nFile v1.3.3:SKILL.md\n\n---\r\nname: astro-lunar-insights\r\nversion: 1.3.3\r\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend, text panel, and QR code for donations. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3\r\n    emoji: \"🌙\"\r\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\r\n---\r\n\r\n# Astrology — Lunar Phase & Influence Analysis\r\n\r\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\r\n\r\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\r\n\r\nThe chart **always includes a QR code** (for donations) at the bottom of the text panel. By default the bundled \frame_small.png.dat is used; users can override with --frame.\r\n\r\n### 🔬 Precision\r\n\r\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\r\n\r\n---\r\n\r\n## ⚠️ Requirements\r\n\r\n| Requirement | Details |\r\n|---|---|\r\n| **OS** | Windows (x64) |\r\n| **Python** | **3.14.x** |\r\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\r\n| **Pillow** | **12.x** — `pip install pillow` |\r\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\r\n\r\n---\r\n\r\n## Architecture\r\n\r\n```\r\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\r\n         ↕\r\n   lunar_analysis.py  →  text analysis output\r\n```\r\n\r\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\r\n\r\n---\r\n\r\n## What This Skill Calculates\r\n\r\n### 1. Current Moon Phase\r\nThe Moon's position relative to the Sun (elongation angle):\r\n- **0°** = New Moon (🌑) — conjunction\r\n- **90°** = First Quarter (🌓) — waxing\r\n- **180°** = Full Moon (🌕) — opposition\r\n- **270°** = Last Quarter (🌗) — waning\r\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\r\n\r\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\r\n\r\n### 2. Transit Moon → Natal Moon (Personal Lunar Cycle)\r\nThe most important personal lunar metric. The transit Moon forms aspects to the natal Moon over a ~28-day cycle:\r\n\r\n| Aspect | Timing | Meaning |\r\n|---|---|---|\r\n| **Conjunction** | Every ~28 days | Personal New Moon — emotional reset, new cycle begins |\r\n| **Square** | ~7 & 21 days | Crisis point — need for action, tension |\r\n| **Opposition** | ~14 days | Personal Full Moon — emotional climax, awareness |\r\n| **Trine** | ~7 & 21 days | Harmony — intuition flows, good for planning |\r\n| **Sextile** | ~4 & 24 days | Opportunity — gentle support |\r\n| **Quincunx** | ~11 & 17 days | Adjustment — something needs realignment |\r\n| **Semisquare** | ~3.5 & 10.5 days | Minor irritation |\r\n| **Sesquiquadrate** | ~10.5 & 17.5 days | Restlessness — break patterns |\r\n| **Semisextile** | ~2 & 16 days | Subtle influence |\r\n\r\n### 3. Personal Solar-Lunar Phase (Transit Moon → Natal Sun)\r\nThe Moon's position relative to the natal Sun defines a **personal lunar month** (~29.5 days):\r\n\r\n| Phase | Elongation | Meaning |\r\n|---|---|---|\r\n| **Personal New Moon** | 0° | Beginning of personal cycle. Inward energy. Start new projects. |\r\n| **Personal Crescent** | 45° | Emerging. Energy builds. First steps. |\r\n| **Personal First Quarter** | 90° | Action point. Challenges arise. Push through. |\r\n| **Personal Gibbous** | 135° | Refinement. Fine-tune approach. |\r\n| **Personal Full Moon** | 180° | CLIMAX. Maximum awareness. Emotional revelation. |\r\n| **Personal Disseminating** | 225° | Sharing. Teach what you've learned. |\r\n| **Personal Last Quarter** | 270° | Crisis of consciousness. Let go. |\r\n| **Personal Balsamic** | 315° | Rest. Reflection. Prepare for next cycle. |\r\n\r\n### 4. Transit Moon Through Natal Houses\r\nShows which life area is emotionally activated:\r\n\r\n| House | Life Area |\r\n|---|---|\r\n| I | Personality, appearance, self |\r\n| II | Money, values, resources |\r\n| III | Communication, siblings, learning |\r\n| IV | Home, family, roots |\r\n| V | Creativity, children, romance |\r\n| VI | Health, work, routine |\r\n| VII | Partnership, marriage |\r\n| VIII | Transformation, shared resources |\r\n| IX | Philosophy, travel, higher education |\r\n| X | Career, reputation, public life |\r\n| XI | Friends, groups, hopes |\r\n| XII | Subconscious, solitude, karma |\r\n\r\n### 5. Lunar Day (Tithi) — Vedic System\r\n30 lunar days from New Moon to New Moon, each with specific energy:\r\n- **Day 1**: New beginning, planning\r\n- **Day 14**: Peak energy — best for starting anything\r\n- **Day 20**: Eagle day — see the big picture\r\n- **Day 29**: Difficult day, caution\r\n- **Day 30**: Blessing, gratitude, cycle completion\r\n\r\n### 6. Moon Speed Analysis\r\nMoon's daily motion affects emotional processing:\r\n- **>14.5°/day**: Very fast — quick events, less depth\r\n- **13.5–14.5°**: Fast — rapid emotional shifts\r\n- **11.5–13.5°**: Normal — balanced processing\r\n- **10–11.5°**: Slow — lingering feelings, deeper impact\r\n- **<10°/day**: Very slow — prolonged emotional intensity\r\n\r\nAlso tracks approach to perigee (closer = stronger) or apogee (farther = weaker).\r\n\r\n### 7. Transit Moon Aspects to All Natal Planets\r\nComplete picture of how the transit Moon interacts with every natal planet — shows which psychological functions are emotionally activated.\r\n\r\n---\r\n\r\n## Usage\r\n\r\n### Text Analysis (CLI)\r\n\r\n```bash\r\n# Analysis for today\r\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\r\n\r\n# Analysis for any specific date\r\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\r\n\r\n# English output\r\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\r\n\r\n# JSON output (for renderers / AI)\r\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json\r\n```\r\n\r\n### Graphical Chart\r\n\r\n```bash\r\n# Chart for today (Russian)\r\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\r\n\r\n# Chart for any specific date\r\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\r\n\r\n# English\r\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\"\r\n```\r\n\r\n### CLI Arguments\r\n\r\n| Argument | Description |\r\n|---|---|\r\n| `date` | Birth date DD.MM.YYYY |\r\n| `time` | Birth time HH:MM |\r\n| `city` | Birth city |\r\n| `--target-date` | Target date in DD.MM.YYYY or YYYY-MM-DD format (default: today). Supports any past, present, or future date. **When omitted, uses current system date.** Supported in both `lunar_analysis.py` and `draw_lunar.py`. |\r\n| `--lang` | Language: `ru` or `en` (default: `ru`) |\r\n| `--name` | Person's name for display |\r\n| `--json` | Output JSON instead of text |\r\n| `--output` | Write JSON directly to file (UTF-8, bypasses console encoding) |\r\n| `--conclusion` | Path to JSON file with AI-generated conclusion |\r\n\r\n---\r\n\r\n## JSON Output Format\r\n\r\n```json\r\n{\r\n  \"name\": \"Алексей\",\r\n  \"birth_date\": \"24.04.1983\",\r\n  \"birth_time\": \"07:00\",\r\n  \"birth_city\": \"Ижевск, Россия\",\r\n  \"target_date\": \"05.06.2026\",\r\n  \"moon_phase\": {\r\n    \"name\": \"Waning Gibbous\",\r\n    \"elongation\": 236.33,\r\n    \"illumination\": 77.7,\r\n    \"distance_au\": 0.002669,\r\n    \"distance_km\": 399206\r\n  },\r\n  \"nearest_phases\": {\r\n    \"New Moon\": {\"date\": \"15.06.2026\", \"days_diff\": 9.6},\r\n    \"Full Moon\": {\"date\": \"31.05.2026\", \"days_diff\": -5.1}\r\n  },\r\n  \"lunar_day\": {\"number\": 20, \"meaning_ru\": \"День орла...\"},\r\n  \"transit_moon\": {\"lon\": 311.18, \"sign\": \"Capricorn\", \"speed\": 12.14},\r\n  \"transit_moon_to_natal_moon\": {\"aspect\": \"Sesquiquadrate\", \"orb\": 0.91},\r\n  \"personal_phase\": {\"key\": \"last_quarter\", \"name_ru\": \"Персональная последняя четверть\"},\r\n  \"transit_moon_house\": {\"house\": 7, \"title_ru\": \"Партнёрство, брак...\"},\r\n  \"moon_speed\": {\"speed\": 12.14, \"description_ru\": \"Нормальная...\"},\r\n  \"transit_moon_aspects\": [\r\n    {\"transit\": \"Moon\", \"natal\": \"Sun\", \"aspect\": \"Square\", \"major\": true, \"orb\": 7.6}\r\n  ],\r\n  \"engine\": \"Swiss Ephemeris v20230604\"\r\n}\r\n```\r\n\r\n---\r\n\r\n## Image Layout (5760×2880 px)\r\n\r\n```\r\n+---------------------------+---------------------------+-------------------+\r\n|                           |                           |                   |\r\n|     ФАЗА ЛУНЫ             |     НАТАЛЬНОЕ КОЛЕСО      |   TEXT ANALYSIS   |\r\n|     MOON PHASE WHEEL      |     NATAL CHART WHEEL     |   PANEL           |\r\n|     (3400/2 = 1700 wide)  |     (1700 wide)           |   (2360×2880)     |\r\n|                           |                           |                   |\r\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\r\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\r\n|  - Phase degree markers   |  - Natal planets (circles |  - Lunar day      |\r\n|  - Current position       |    with letter codes)     |  - Moon aspects   |\r\n|    indicator (yellow)     |  - Transit Moon (outer    |  - Personal phase |\r\n|                           |    orbit, highlighted)    |  - House          |\r\n|                           |  - ASC/MC lines           |  - Moon speed     |\r\n|                           |  - Aspect lines (colored) |  - All aspects    |\r\n|                           |                           |  - Conclusion     |\r\n|                           |                           |                   |\r\n+---------------------------+---------------------------+-------------------+\r\n\r\nLegend (below wheels, 3 uniform-height groups side by side):\r\n┌─────────────────┬─────────────────┬─────────────────┐\r\n│  ПЛАНЕТЫ        │  АСПЕКТЫ        │  СТИХИИ         │\r\n│  (PLANETS)      │  (ASPECTS)      │  (ELEMENTS)     │\r\n│                 │                 │                 │\r\n│  ♈ SU Sun      │  □ Conj          │  ■ Огонь        │\r\n│  ♉ MO Moon     │  ✶ Sext          │  ■ Земля        │\r\n│  ♊ ME Mercury  │  □ Sqr           │  ■ Воздух       │\r\n│  ...            │  △ Trine         │  ■ Вода         │\r\n│                 │  □ Qnc           │                 │\r\n│                 │  ☍ Opp           │                 │\r\n└─────────────────┴─────────────────┴─────────────────┘\r\n```\r\n\r\n- Wheels centered vertically in the image (cy=1440)\r\n- Wheels radius: 640px each\r\n- Legend: 3 groups of uniform height below wheels\r\n- Left panel: 3400px (2 wheels × 1700px)\r\n- Right panel: 2360px text interpretation\r\n\r\n---\r\n\r\n## Font Handling\r\n\r\nTwo bundled fonts in `scripts/`:\r\n\r\n| Font | Purpose | Extension |\r\n|---|---|---|\r\n| `seguisym.ttf.dat` | Zodiac symbols ♈♉♊... + planet symbols ☉☽☿... | `.dat` (ClawHub-compatible) |\r\n| `segoeuisl.ttf.dat` | Cyrillic, latin, digits | `.dat` (ClawHub-compatible) |\r\n\r\nBoth are auto-copied to `.ttf` at runtime for Pillow compatibility.\r\n\r\n---\r\n\r\n## Scripts Reference\r\n\r\n| Script | Purpose | Dependencies |\r\n|---|---|---|\r\n| `scripts/lunar_analysis.py` | **Sole calculation engine.** All lunar metrics, text + JSON output. | swisseph, math, json |\r\n| `scripts/draw_lunar.py` | **Renderer.** Calls lunar_analysis.py --json, draws 5760×2880 chart. | subprocess, json, math, Pillow |\r\n| `scripts/swisseph.cp314-win_amd64.pyd.dat` | Swiss Ephemeris binary (2 MB) — JPL DE431 ephemerides | MSVC++ Redist |\r\n| `scripts/seguisym.ttf.dat` | Zodiac + planet symbol font | — |\r\n| `scripts/segoeuisl.ttf.dat` | Cyrillic/latin font | — |\r\n\r\n---\r\n\r\n## AI Conclusion Workflow (for OpenClaw agents)\r\n\r\n```\r\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\r\nStep 2: AI analyzes JSON and writes enhanced conclusion to a JSON file\r\n        (see AI Conclusion JSON Format below)\r\nStep 3: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\r\n```\r\n\r\nWhen `--conclusion` is provided, the AI-generated text is used verbatim in the chart.\r\nEach metric gets its own interpretation section (1–8), and the overall summary\r\nis shown in section 9 (Conclusion). Without `--conclusion`, the script generates\r\nbuilt-in autonomous interpretations.\r\n\r\n### AI Conclusion JSON Format\r\n\r\nThe conclusion file must have metric keys at the **top level** (not nested under `metrics`).\r\nEach metric contains an `interpretation` field (string, dict with `description`, or tuple).\r\nThe `overall` field contains the general summary for section 9.\r\n\r\n```json\r\n{\r\n  \"overall\": \"General summary text for section 9...\",\r\n  \"moon_phase\": {\r\n    \"interpretation\": {\r\n      \"name\": \"Waning Gibbous\",\r\n      \"description\": \"Full interpretation text for section 1...\"\r\n    }\r\n  },\r\n  \"nearest_phases\": {\r\n    \"interpretation\": \"Interpretation text for section 2...\"\r\n  },\r\n  \"lunar_day\": {\r\n    \"interpretation\": \"Interpretation text for section 3...\"\r\n  },\r\n  \"transit_moon_to_natal_moon\": {\r\n    \"interpretation\": \"Interpretation text for section 4...\"\r\n  },\r\n  \"personal_phase\": {\r\n    \"interpretation\": [\"Phase Name\", \"Interpretation text for section 5...\"]\r\n  },\r\n  \"transit_moon_house\": {\r\n    \"interpretation\": \"Interpretation text for section 6...\"\r\n  },\r\n  \"moon_speed\": {\r\n    \"interpretation\": \"Interpretation text for section 7...\"\r\n  },\r\n  \"transit_moon_aspects\": {\r\n    \"interpretation\": \"Interpretation text for section 8...\"\r\n  }\r\n}\r\n```\r\n\r\n**Supported `interpretation` formats:**\r\n- `dict` with `description` key — used by autonomous mode\r\n- `tuple/list` of `[title, text]` — used by autonomous mode for personal_phase\r\n- `string` — plain text interpretation (AI mode)\r\n\r\nThe renderer (`draw_text_panel`) automatically detects the format and extracts\r\nthe text accordingly. AI mode shows full text without truncation; autonomous mode\r\nlimits text to keep the chart compact.\r\n\r\n## AI Workflow (for OpenClaw agents)\r\n\r\n**⚠️ ПРАВИЛО: ВСЕГДА предоставляй расширенную интерпретацию ИИ, когда это возможно.**\r\n\r\nАвтономная интерпретация (встроенная в скрипт) — это fallback для CLI-использования. Когда скилл вызывается через OpenClaw агент, агент **обязан** проанализировать JSON и сгенерировать расширенную интерпретацию по всем метрикам. Это ключевое отличие качественного прогноза от шаблонного.\r\n\r\n```\r\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\r\nStep 2: AI analyzes JSON and provides extended interpretation for ALL metrics\r\nStep 3: AI writes conclusion JSON file with overall summary\r\nStep 4: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\r\n```\r\n\r\n**Без шага 3-4 карта будет содержать только автономную (краткую) интерпретацию.**\r\n\r\nThe AI should focus on:\r\n- **Personal New/Full Moon** — most significant events\r\n- **Transit Moon house** — which life area is emotionally active\r\n- **Transit Moon → Natal Moon aspect** — emotional cycle phase\r\n- **Moon speed** — depth vs. speed of emotional processing\r\n- **Lunar day meaning** — Vedic tithi guidance\r\n- **Transit Moon aspects to all natal planets** — detailed psychological analysis\r\n- **Overall synthesis** — practical recommendations for the day\r\n\r\n---\r\n\r\n## Encoding & Console Handling\r\n\r\n**Problem:** Windows console (cmd/PowerShell) redirects stdout in cp1251/cp866, breaking UTF-8 output even with `PYTHONIOENCODING=utf-8`.\r\n\r\n**Solution:** `lunar_analysis.py` supports `--output file.json` which writes JSON directly to a file via `open(..., encoding='utf-8')`, completely bypassing the console. `draw_lunar.py` uses this internally — it passes `--output /tmp/lunar_analysis_tmp.json` to the subprocess and reads the file directly.\r\n\r\n**For CLI users:** Use `--output` when redirecting to files:\r\n```bash\r\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --json --output result.json\r\n```\r\n\r\nFor text output in terminal, set `PYTHONIOENCODING=utf-8` and `chcp 65001` (cmd) or use PowerShell with `$env:PYTHONIOENCODING='utf-8'`.\r\n\r\n---\r\n\r\n## Disclaimer\r\n\r\nThis is an entertainment/educational tool, not a scientific method. Do not make medical or financial decisions based on astrological readings.\r\n\r\n---\r\n\r\n## Changelog\r\n\r\n### v1.3.3 (2026-06-24)\r\n- **QR code is now always rendered by default** — --frame parameter now defaults to bundled \frame_small.png.dat instead of being optional. Users no longer need to pass --frame explicitly.\r\n- **Updated description** (frontmatter + intro) to mention QR code for donations as a feature\r\n- **Updated CLI args table** — --frame now documented as having a bundled default\r\n\r\n### v1.3.2 (2026-06-07)\r\n\r\n### v1.0.1 (2026-06-05)\r\n- **Encoding fix:** Added `--output file.json` flag to `lunar_analysis.py` — writes JSON directly to file in UTF-8, bypassing Windows console cp1251 encoding issues\r\n- **draw_lunar.py** now uses `--output` internally via temp file for subprocess communication\r\n- **Layout redesign:** 2 wheels side-by-side (horizontal), vertically centered (cy=1440)\r\n- **Legend:** 3 uniform-height groups (planets, aspects, elements) arranged horizontally below wheels\r\n- **Planet circles** with 2-letter codes (SU, MO, ME...) matching astro-natal-chart style\r\n- **Colored aspect lines** on natal wheel (red=square, blue=trine, green=sextile, etc.)\r\n- **Text panel** widened to 2360px with smaller fonts for better text fit\r\n- **Output filename** now includes person name: `lunar_{name}_{date}_{lang}.png`\r\n- **Target date** shown in text panel instead of \"today\"\r\n- **Font/binary setup:** All `.ttf` and `.pyd` files shipped as `.dat` (ClawHub-compatible), auto-copied at runtime\r\n- Removed `__pycache__` and generated `.ttf`/`.pyd` from skill directory\r\n- Updated SKILL.md with encoding guide, new CLI args, and updated layout diagram\r\n\r\n### v1.0.0 (2026-06-05)\r\n\r\n### v1.2.0 (2026-06-07)\r\n- **Cosmetic: aspect symbols in text panel** — Section 8 (Aspects) now renders graphical aspect symbols (△ □ ✶ ☌ ☍ ⚹ ⚺ ∠) from `seguisym.ttf` instead of text names (Trine, Square, etc.), matching the legend style\r\n- **Symbol color coding**: aspect glyphs are rendered in their astrological colors (green △, red □, blue ✶, etc.) via `_get_word_color` + `ASP_SYMBOL_COLORS` map\r\n- **`draw_lunar.py` now supports `--target-date` flag** — previously only `lunar_analysis.py` supported target dates via positional arg; now both scripts accept `--target-date`\r\n- **Subprocess propagation**: `draw_lunar.py` passes `--target-date` through to `lunar_analysis.py` subprocess call\r\n- **`lunar_analysis.py` `--target-date` as explicit flag** — previously only supported as 4th positional argument; now also parsed as `--target-date` flag for consistency\r\n- **Dual date format support**: both `DD.MM.YYYY` and `YYYY-MM-DD` formats accepted for `--target-date`\r\n- **AI Conclusion rule added**: SKILL.md now explicitly states that agents MUST always provide extended AI interpretation when possible; autonomous interpretation is a CLI fallback only\r\n- **Updated AI workflow**: 4-step process (analyze → interpret → write conclusion → render chart) documented with explicit warning about missing conclusion = short output only\r\n\r\n### v1.1.0 (2026-06-06)\r\n- **Cosmetic overhaul of text panel:** Font sizes now match astro-natal-chart (FS=19, FM=22, FL=26, LH=22)\r\n- **Text wrapping improved:** Line width reduced to half (`max_w = w // 2 - 20`) for 2x faster line breaks\r\n- **Section headers raised:** Title labels above both wheels moved up (80px from wheel edge) for better visual balance\r\n- **Colored planet names in text:** Planet names in interpretation text are now rendered in their astrological colors (e.g., Марс in red, Венера in green, Уран in cyan)\r\n- **Colored aspect type names:** Aspect type names (Square, Trine, Sextile, Quincunx, etc.) in text are colored to match the legend\r\n- **Section 9 (Conclusion) always visible:** Now displays for both AI mode (`overall` text) and autonomous mode (`summary.cycle_energy` + `summary.intensity`)\r\n- **Fixed aspect list rendering:** Transit Moon aspects in section 8 now show readable text instead of raw dict representation\r\n- **Fixed `interp_text()` robustness:** Now handles all conclusion data formats — string, list, dict with `description`, dict with `interpretation` key, tuple\r\n- **Fixed nested function scope:** Replaced `nonlocal y` pattern with mutable list `_y = [y]` to avoid UnboundLocalError in nested drawing functions\r\n- **Backup files preserved:** `draw_lunar.py.bak` and `draw_lunar.py.bak2` kept for rollback\r\n\r\n### v1.0.2 (2026-06-06)\r\n- **AI conclusion rendering restructured:** AI interpretations are now distributed across\r\n  metric sections (1–8) instead of being piled into section 9 (Conclusion)\r\n- **New AI conclusion JSON format:** Metric keys at top level (`moon_phase`, `lunar_day`, etc.),\r\n  each with `interpretation` field; `overall` field for section 9 summary only\r\n- **Helper functions `interp_text()` and `show_interp()`** in `draw_text_panel`:\r\n  unified extraction of interpretation text from dict, tuple, or string formats\r\n- **AI mode:** full text displayed without truncation in sections 1–8; section 9 shows only `overall`\r\n- **Autonomous mode:** preserved with text limits for compact layout\r\n- **Section 8 (Aspects):** added AI interpretation of transit Moon aspects after the aspect list\r\n- **Conclusion JSON format documented** in SKILL.md with examples for all supported formats\r\n- Updated SKILL.md with AI Conclusion JSON Format specification\r\n\r\n### v1.0.1 (2026-06-05)\r\n- Initial release\r\n- Moon phase calculation (8 phases) with Swiss Ephemeris\r\n- Exact phase date prediction (New Moon, First Quarter, Full Moon, Last Quarter)\r\n- Transit Moon → Natal Moon aspects (personal lunar cycle)\r\n- Personal solar-lunar phase (Moon → Natal Sun)\r\n- Transit Moon through natal houses (Placidus)\r\n- Lunar day (tithi) with 30-day Vedic meanings\r\n- Moon speed analysis (fast/slow emotional processing)\r\n- Illumination percentage and Earth distance\r\n- Perigee/Apogee tracking\r\n- Transit Moon aspects to all natal planets\r\n- Bilingual text output (RU/EN)\r\n- JSON export for AI integration\r\n- 2-wheel side-by-side chart layout (5760×2880 px)\r\n- Horizontal 3-group legend below wheels (planets, aspects, elements — uniform height)\r\n- Text analysis panel with target date and person name\r\n- Output filename includes person name and date: `lunar_{name}_{date}_{lang}.png`\r\n- Bundled fonts and swisseph as .dat files (ClawHub-compatible, auto-copied at runtime)\r\n- Vertical wheel centers at image middle (cy=1440), legend fits below\n\nFile v1.3.3:README.md\n\n# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nCalculates Moon phases, transit Moon aspects to natal Moon, transit Moon through natal houses, personal solar-lunar phase, lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text analysis panel.\n\n## 🔬 Engine\n\n- **Swiss Ephemeris** (pyswisseph 2.10.3.2) — JPL DE431 ephemerides, ~0.003° precision\n- **Pillow 12.x** — chart rendering\n- House cusps: **Placidus system**\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | 3.14.x |\n| **Runtime** | MSVC++ Redistributable 2015–2022 (x64) |\n| **Pillow** | `pip install pillow` |\n\n## Usage\n\n```bash\n# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json\n```\n\n## CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Analysis date (default: today) |\n| `--lang` | `ru` or `en` |\n| `--name` | Person's name |\n| `--json` | JSON output |\n| `--output` | Write JSON to file (UTF-8) |\n| `--conclusion` | Path to AI conclusion JSON |\n\n## Chart Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO Moon    │ ✶ Sext       │ ■ Земля       │\n│ ♊ ME Mercury │ □ Sqr        │ ■ Воздух      │\n│ ...           │ △ Trine       │ ■ Вода        │\n│               │ □ Qnc         │               │\n│               │ ☍ Opp         │               │\n└───────────────┴───────────────┴───────────────┘\n```\n\n## What It Calculates\n\n1. **Current Moon Phase** — 8 phases with illumination %, distance, exact dates\n2. **Transit Moon → Natal Moon** — Personal lunar cycle (~28 days)\n3. **Personal Solar-Lunar Phase** — Personal lunar month (~29.5 days)\n4. **Transit Moon Through Natal Houses** — Which life area is emotionally active\n5. **Lunar Day (Tithi)** — 30 Vedic lunar days with specific energy\n6. **Moon Speed** — Fast/slow emotional processing\n7. **Transit Moon Aspects to All Natal Planets** — Complete psychological picture\n\n## AI Conclusion Format\n\nWhen using `--conclusion`, provide a JSON file with top-level metric keys:\n\n```json\n{\n  \"overall\": \"General summary for section 9...\",\n  \"moon_phase\": { \"interpretation\": \"...\" },\n  \"lunar_day\": { \"interpretation\": \"...\" },\n  \"personal_phase\": { \"interpretation\": [\"Name\", \"Details...\"] },\n  \"transit_moon_aspects\": { \"interpretation\": \"...\" }\n}\n```\n\n## Links\n\n- **ClawHub**: https://clawhub.ai/dynamicsalex/astro-lunar-insights\n- **Related**: [astro-natal-chart](https://github.com/dynamicsAlex/astro-natal-chart)\n\n## License\n\nThis is an entertainment/educational tool. Do not make medical or financial decisions based on astrological readings.\n\nFile v1.3.3:_meta.json\n\n{\n  \"ownerId\": \"kn775k2zzav7y8rpwwm218x0b587f0hj\",\n  \"slug\": \"astro-lunar-insights\",\n  \"version\": \"1.3.3\",\n  \"publishedAt\": 1782327459579\n}\n\nFile v1.3.3:skill-card.md\n\n## Description:\n\nLunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph), producing bilingual astrological analysis, structured lunar metrics, and rendered charts.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dynamicsalex](https://clawhub.ai/user/dynamicsalex)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and agents use this skill to calculate personal lunar astrology metrics from birth details and a target date, then generate text, JSON, or chart outputs for entertainment and educational interpretation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill copies and runs bundled executable dependency files, including a Windows Swiss Ephemeris binary.\n\nMitigation: Run it only in an isolated Python environment and use the bundled native binary only when the publisher and package source are trusted.\n\nRisk: The chart renderer may install Pillow automatically at runtime.\n\nMitigation: Preinstall a pinned Pillow version in the environment before running the skill.\n\nRisk: Birth details can be written to temporary JSON files and generated chart files.\n\nMitigation: Avoid using sensitive personal data unless needed, restrict access to the workspace and temp directory, and remove generated files after use.\n\nRisk: Generated charts include donation or promotional QR content by default.\n\nMitigation: Inspect generated images before sharing and override or remove the frame asset when promotional content is not appropriate.\n\nRisk: Astrological output may be mistaken for decision-grade advice.\n\nMitigation: Present results as entertainment or educational interpretation and do not rely on them for medical, financial, or other high-impact decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dynamicsalex/skills/astro-lunar-insights)\n\n## Skill Output:\n\n**Output Type(s):** [Text, JSON, Image files, Guidance]\n\n**Output Format:** [Plain text analysis, structured JSON lunar metrics, and PNG chart files with optional AI conclusion JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports Russian and English output; chart renderer produces a 5760x2880 PNG.]\n\n## Skill Version(s):\n\n1.3.3 (source: server release evidence and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.3.2: 11 files, 2926947 bytes\n\nFiles: _meta.json (139b), README.md (4907b), scripts/draw_lunar.py (38477b), scripts/frame_small.png.dat (32356b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (26093b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2434b), SKILL.md (23226b)\n\nFile v1.3.2:SKILL.md\n\n---\nname: astro-lunar-insights\nversion: 1.3.2\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text panel. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    emoji: \"🌙\"\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\n---\n\n# Astrology — Lunar Phase & Influence Analysis\n\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\n\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\n\n### 🔬 Precision\n\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\n\n---\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | **3.14.x** |\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\n| **Pillow** | **12.x** — `pip install pillow` |\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\n\n---\n\n## Architecture\n\n```\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\n         ↕\n   lunar_analysis.py  →  text analysis output\n```\n\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\n\n---\n\n## What This Skill Calculates\n\n### 1. Current Moon Phase\nThe Moon's position relative to the Sun (elongation angle):\n- **0°** = New Moon (🌑) — conjunction\n- **90°** = First Quarter (🌓) — waxing\n- **180°** = Full Moon (🌕) — opposition\n- **270°** = Last Quarter (🌗) — waning\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\n\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\n\n### 2. Transit Moon → Natal Moon (Personal Lunar Cycle)\nThe most important personal lunar metric. The transit Moon forms aspects to the natal Moon over a ~28-day cycle:\n\n| Aspect | Timing | Meaning |\n|---|---|---|\n| **Conjunction** | Every ~28 days | Personal New Moon — emotional reset, new cycle begins |\n| **Square** | ~7 & 21 days | Crisis point — need for action, tension |\n| **Opposition** | ~14 days | Personal Full Moon — emotional climax, awareness |\n| **Trine** | ~7 & 21 days | Harmony — intuition flows, good for planning |\n| **Sextile** | ~4 & 24 days | Opportunity — gentle support |\n| **Quincunx** | ~11 & 17 days | Adjustment — something needs realignment |\n| **Semisquare** | ~3.5 & 10.5 days | Minor irritation |\n| **Sesquiquadrate** | ~10.5 & 17.5 days | Restlessness — break patterns |\n| **Semisextile** | ~2 & 16 days | Subtle influence |\n\n### 3. Personal Solar-Lunar Phase (Transit Moon → Natal Sun)\nThe Moon's position relative to the natal Sun defines a **personal lunar month** (~29.5 days):\n\n| Phase | Elongation | Meaning |\n|---|---|---|\n| **Personal New Moon** | 0° | Beginning of personal cycle. Inward energy. Start new projects. |\n| **Personal Crescent** | 45° | Emerging. Energy builds. First steps. |\n| **Personal First Quarter** | 90° | Action point. Challenges arise. Push through. |\n| **Personal Gibbous** | 135° | Refinement. Fine-tune approach. |\n| **Personal Full Moon** | 180° | CLIMAX. Maximum awareness. Emotional revelation. |\n| **Personal Disseminating** | 225° | Sharing. Teach what you've learned. |\n| **Personal Last Quarter** | 270° | Crisis of consciousness. Let go. |\n| **Personal Balsamic** | 315° | Rest. Reflection. Prepare for next cycle. |\n\n### 4. Transit Moon Through Natal Houses\nShows which life area is emotionally activated:\n\n| House | Life Area |\n|---|---|\n| I | Personality, appearance, self |\n| II | Money, values, resources |\n| III | Communication, siblings, learning |\n| IV | Home, family, roots |\n| V | Creativity, children, romance |\n| VI | Health, work, routine |\n| VII | Partnership, marriage |\n| VIII | Transformation, shared resources |\n| IX | Philosophy, travel, higher education |\n| X | Career, reputation, public life |\n| XI | Friends, groups, hopes |\n| XII | Subconscious, solitude, karma |\n\n### 5. Lunar Day (Tithi) — Vedic System\n30 lunar days from New Moon to New Moon, each with specific energy:\n- **Day 1**: New beginning, planning\n- **Day 14**: Peak energy — best for starting anything\n- **Day 20**: Eagle day — see the big picture\n- **Day 29**: Difficult day, caution\n- **Day 30**: Blessing, gratitude, cycle completion\n\n### 6. Moon Speed Analysis\nMoon's daily motion affects emotional processing:\n- **>14.5°/day**: Very fast — quick events, less depth\n- **13.5–14.5°**: Fast — rapid emotional shifts\n- **11.5–13.5°**: Normal — balanced processing\n- **10–11.5°**: Slow — lingering feelings, deeper impact\n- **<10°/day**: Very slow — prolonged emotional intensity\n\nAlso tracks approach to perigee (closer = stronger) or apogee (farther = weaker).\n\n### 7. Transit Moon Aspects to All Natal Planets\nComplete picture of how the transit Moon interacts with every natal planet — shows which psychological functions are emotionally activated.\n\n---\n\n## Usage\n\n### Text Analysis (CLI)\n\n```bash\n# Analysis for today\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Analysis for any specific date\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\n\n# English output\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\n\n# JSON output (for renderers / AI)\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json\n```\n\n### Graphical Chart\n\n```bash\n# Chart for today (Russian)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Chart for any specific date\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\n\n# English\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\"\n```\n\n### CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Target date in DD.MM.YYYY or YYYY-MM-DD format (default: today). Supports any past, present, or future date. **When omitted, uses current system date.** Supported in both `lunar_analysis.py` and `draw_lunar.py`. |\n| `--lang` | Language: `ru` or `en` (default: `ru`) |\n| `--name` | Person's name for display |\n| `--json` | Output JSON instead of text |\n| `--output` | Write JSON directly to file (UTF-8, bypasses console encoding) |\n| `--conclusion` | Path to JSON file with AI-generated conclusion |\n\n---\n\n## JSON Output Format\n\n```json\n{\n  \"name\": \"Алексей\",\n  \"birth_date\": \"24.04.1983\",\n  \"birth_time\": \"07:00\",\n  \"birth_city\": \"Ижевск, Россия\",\n  \"target_date\": \"05.06.2026\",\n  \"moon_phase\": {\n    \"name\": \"Waning Gibbous\",\n    \"elongation\": 236.33,\n    \"illumination\": 77.7,\n    \"distance_au\": 0.002669,\n    \"distance_km\": 399206\n  },\n  \"nearest_phases\": {\n    \"New Moon\": {\"date\": \"15.06.2026\", \"days_diff\": 9.6},\n    \"Full Moon\": {\"date\": \"31.05.2026\", \"days_diff\": -5.1}\n  },\n  \"lunar_day\": {\"number\": 20, \"meaning_ru\": \"День орла...\"},\n  \"transit_moon\": {\"lon\": 311.18, \"sign\": \"Capricorn\", \"speed\": 12.14},\n  \"transit_moon_to_natal_moon\": {\"aspect\": \"Sesquiquadrate\", \"orb\": 0.91},\n  \"personal_phase\": {\"key\": \"last_quarter\", \"name_ru\": \"Персональная последняя четверть\"},\n  \"transit_moon_house\": {\"house\": 7, \"title_ru\": \"Партнёрство, брак...\"},\n  \"moon_speed\": {\"speed\": 12.14, \"description_ru\": \"Нормальная...\"},\n  \"transit_moon_aspects\": [\n    {\"transit\": \"Moon\", \"natal\": \"Sun\", \"aspect\": \"Square\", \"major\": true, \"orb\": 7.6}\n  ],\n  \"engine\": \"Swiss Ephemeris v20230604\"\n}\n```\n\n---\n\n## Image Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|                           |                           |                   |\n|     ФАЗА ЛУНЫ             |     НАТАЛЬНОЕ КОЛЕСО      |   TEXT ANALYSIS   |\n|     MOON PHASE WHEEL      |     NATAL CHART WHEEL     |   PANEL           |\n|     (3400/2 = 1700 wide)  |     (1700 wide)           |   (2360×2880)     |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets (circles |  - Lunar day      |\n|  - Current position       |    with letter codes)     |  - Moon aspects   |\n|    indicator (yellow)     |  - Transit Moon (outer    |  - Personal phase |\n|                           |    orbit, highlighted)    |  - House          |\n|                           |  - ASC/MC lines           |  - Moon speed     |\n|                           |  - Aspect lines (colored) |  - All aspects    |\n|                           |                           |  - Conclusion     |\n|                           |                           |                   |\n+---------------------------+---------------------------+-------------------+\n\nLegend (below wheels, 3 uniform-height groups side by side):\n┌─────────────────┬─────────────────┬─────────────────┐\n│  ПЛАНЕТЫ        │  АСПЕКТЫ        │  СТИХИИ         │\n│  (PLANETS)      │  (ASPECTS)      │  (ELEMENTS)     │\n│                 │                 │                 │\n│  ♈ SU Sun      │  □ Conj          │  ■ Огонь        │\n│  ♉ MO Moon     │  ✶ Sext          │  ■ Земля        │\n│  ♊ ME Mercury  │  □ Sqr           │  ■ Воздух       │\n│  ...            │  △ Trine         │  ■ Вода         │\n│                 │  □ Qnc           │                 │\n│                 │  ☍ Opp           │                 │\n└─────────────────┴─────────────────┴─────────────────┘\n```\n\n- Wheels centered vertically in the image (cy=1440)\n- Wheels radius: 640px each\n- Legend: 3 groups of uniform height below wheels\n- Left panel: 3400px (2 wheels × 1700px)\n- Right panel: 2360px text interpretation\n\n---\n\n## Font Handling\n\nTwo bundled fonts in `scripts/`:\n\n| Font | Purpose | Extension |\n|---|---|---|\n| `seguisym.ttf.dat` | Zodiac symbols ♈♉♊... + planet symbols ☉☽☿... | `.dat` (ClawHub-compatible) |\n| `segoeuisl.ttf.dat` | Cyrillic, latin, digits | `.dat` (ClawHub-compatible) |\n\nBoth are auto-copied to `.ttf` at runtime for Pillow compatibility.\n\n---\n\n## Scripts Reference\n\n| Script | Purpose | Dependencies |\n|---|---|---|\n| `scripts/lunar_analysis.py` | **Sole calculation engine.** All lunar metrics, text + JSON output. | swisseph, math, json |\n| `scripts/draw_lunar.py` | **Renderer.** Calls lunar_analysis.py --json, draws 5760×2880 chart. | subprocess, json, math, Pillow |\n| `scripts/swisseph.cp314-win_amd64.pyd.dat` | Swiss Ephemeris binary (2 MB) — JPL DE431 ephemerides | MSVC++ Redist |\n| `scripts/seguisym.ttf.dat` | Zodiac + planet symbol font | — |\n| `scripts/segoeuisl.ttf.dat` | Cyrillic/latin font | — |\n\n---\n\n## AI Conclusion Workflow (for OpenClaw agents)\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and writes enhanced conclusion to a JSON file\n        (see AI Conclusion JSON Format below)\nStep 3: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\nWhen `--conclusion` is provided, the AI-generated text is used verbatim in the chart.\nEach metric gets its own interpretation section (1–8), and the overall summary\nis shown in section 9 (Conclusion). Without `--conclusion`, the script generates\nbuilt-in autonomous interpretations.\n\n### AI Conclusion JSON Format\n\nThe conclusion file must have metric keys at the **top level** (not nested under `metrics`).\nEach metric contains an `interpretation` field (string, dict with `description`, or tuple).\nThe `overall` field contains the general summary for section 9.\n\n```json\n{\n  \"overall\": \"General summary text for section 9...\",\n  \"moon_phase\": {\n    \"interpretation\": {\n      \"name\": \"Waning Gibbous\",\n      \"description\": \"Full interpretation text for section 1...\"\n    }\n  },\n  \"nearest_phases\": {\n    \"interpretation\": \"Interpretation text for section 2...\"\n  },\n  \"lunar_day\": {\n    \"interpretation\": \"Interpretation text for section 3...\"\n  },\n  \"transit_moon_to_natal_moon\": {\n    \"interpretation\": \"Interpretation text for section 4...\"\n  },\n  \"personal_phase\": {\n    \"interpretation\": [\"Phase Name\", \"Interpretation text for section 5...\"]\n  },\n  \"transit_moon_house\": {\n    \"interpretation\": \"Interpretation text for section 6...\"\n  },\n  \"moon_speed\": {\n    \"interpretation\": \"Interpretation text for section 7...\"\n  },\n  \"transit_moon_aspects\": {\n    \"interpretation\": \"Interpretation text for section 8...\"\n  }\n}\n```\n\n**Supported `interpretation` formats:**\n- `dict` with `description` key — used by autonomous mode\n- `tuple/list` of `[title, text]` — used by autonomous mode for personal_phase\n- `string` — plain text interpretation (AI mode)\n\nThe renderer (`draw_text_panel`) automatically detects the format and extracts\nthe text accordingly. AI mode shows full text without truncation; autonomous mode\nlimits text to keep the chart compact.\n\n## AI Workflow (for OpenClaw agents)\n\n**⚠️ ПРАВИЛО: ВСЕГДА предоставляй расширенную интерпретацию ИИ, когда это возможно.**\n\nАвтономная интерпретация (встроенная в скрипт) — это fallback для CLI-использования. Когда скилл вызывается через OpenClaw агент, агент **обязан** проанализировать JSON и сгенерировать расширенную интерпретацию по всем метрикам. Это ключевое отличие качественного прогноза от шаблонного.\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and provides extended interpretation for ALL metrics\nStep 3: AI writes conclusion JSON file with overall summary\nStep 4: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\n**Без шага 3-4 карта будет содержать только автономную (краткую) интерпретацию.**\n\nThe AI should focus on:\n- **Personal New/Full Moon** — most significant events\n- **Transit Moon house** — which life area is emotionally active\n- **Transit Moon → Natal Moon aspect** — emotional cycle phase\n- **Moon speed** — depth vs. speed of emotional processing\n- **Lunar day meaning** — Vedic tithi guidance\n- **Transit Moon aspects to all natal planets** — detailed psychological analysis\n- **Overall synthesis** — practical recommendations for the day\n\n---\n\n## Encoding & Console Handling\n\n**Problem:** Windows console (cmd/PowerShell) redirects stdout in cp1251/cp866, breaking UTF-8 output even with `PYTHONIOENCODING=utf-8`.\n\n**Solution:** `lunar_analysis.py` supports `--output file.json` which writes JSON directly to a file via `open(..., encoding='utf-8')`, completely bypassing the console. `draw_lunar.py` uses this internally — it passes `--output /tmp/lunar_analysis_tmp.json` to the subprocess and reads the file directly.\n\n**For CLI users:** Use `--output` when redirecting to files:\n```bash\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --json --output result.json\n```\n\nFor text output in terminal, set `PYTHONIOENCODING=utf-8` and `chcp 65001` (cmd) or use PowerShell with `$env:PYTHONIOENCODING='utf-8'`.\n\n---\n\n## Disclaimer\n\nThis is an entertainment/educational tool, not a scientific method. Do not make medical or financial decisions based on astrological readings.\n\n---\n\n## Changelog\n\n### v1.0.1 (2026-06-05)\n- **Encoding fix:** Added `--output file.json` flag to `lunar_analysis.py` — writes JSON directly to file in UTF-8, bypassing Windows console cp1251 encoding issues\n- **draw_lunar.py** now uses `--output` internally via temp file for subprocess communication\n- **Layout redesign:** 2 wheels side-by-side (horizontal), vertically centered (cy=1440)\n- **Legend:** 3 uniform-height groups (planets, aspects, elements) arranged horizontally below wheels\n- **Planet circles** with 2-letter codes (SU, MO, ME...) matching astro-natal-chart style\n- **Colored aspect lines** on natal wheel (red=square, blue=trine, green=sextile, etc.)\n- **Text panel** widened to 2360px with smaller fonts for better text fit\n- **Output filename** now includes person name: `lunar_{name}_{date}_{lang}.png`\n- **Target date** shown in text panel instead of \"today\"\n- **Font/binary setup:** All `.ttf` and `.pyd` files shipped as `.dat` (ClawHub-compatible), auto-copied at runtime\n- Removed `__pycache__` and generated `.ttf`/`.pyd` from skill directory\n- Updated SKILL.md with encoding guide, new CLI args, and updated layout diagram\n\n### v1.0.0 (2026-06-05)\n\n### v1.2.0 (2026-06-07)\n- **Cosmetic: aspect symbols in text panel** — Section 8 (Aspects) now renders graphical aspect symbols (△ □ ✶ ☌ ☍ ⚹ ⚺ ∠) from `seguisym.ttf` instead of text names (Trine, Square, etc.), matching the legend style\n- **Symbol color coding**: aspect glyphs are rendered in their astrological colors (green △, red □, blue ✶, etc.) via `_get_word_color` + `ASP_SYMBOL_COLORS` map\n- **`draw_lunar.py` now supports `--target-date` flag** — previously only `lunar_analysis.py` supported target dates via positional arg; now both scripts accept `--target-date`\n- **Subprocess propagation**: `draw_lunar.py` passes `--target-date` through to `lunar_analysis.py` subprocess call\n- **`lunar_analysis.py` `--target-date` as explicit flag** — previously only supported as 4th positional argument; now also parsed as `--target-date` flag for consistency\n- **Dual date format support**: both `DD.MM.YYYY` and `YYYY-MM-DD` formats accepted for `--target-date`\n- **AI Conclusion rule added**: SKILL.md now explicitly states that agents MUST always provide extended AI interpretation when possible; autonomous interpretation is a CLI fallback only\n- **Updated AI workflow**: 4-step process (analyze → interpret → write conclusion → render chart) documented with explicit warning about missing conclusion = short output only\n\n### v1.1.0 (2026-06-06)\n- **Cosmetic overhaul of text panel:** Font sizes now match astro-natal-chart (FS=19, FM=22, FL=26, LH=22)\n- **Text wrapping improved:** Line width reduced to half (`max_w = w // 2 - 20`) for 2x faster line breaks\n- **Section headers raised:** Title labels above both wheels moved up (80px from wheel edge) for better visual balance\n- **Colored planet names in text:** Planet names in interpretation text are now rendered in their astrological colors (e.g., Марс in red, Венера in green, Уран in cyan)\n- **Colored aspect type names:** Aspect type names (Square, Trine, Sextile, Quincunx, etc.) in text are colored to match the legend\n- **Section 9 (Conclusion) always visible:** Now displays for both AI mode (`overall` text) and autonomous mode (`summary.cycle_energy` + `summary.intensity`)\n- **Fixed aspect list rendering:** Transit Moon aspects in section 8 now show readable text instead of raw dict representation\n- **Fixed `interp_text()` robustness:** Now handles all conclusion data formats — string, list, dict with `description`, dict with `interpretation` key, tuple\n- **Fixed nested function scope:** Replaced `nonlocal y` pattern with mutable list `_y = [y]` to avoid UnboundLocalError in nested drawing functions\n- **Backup files preserved:** `draw_lunar.py.bak` and `draw_lunar.py.bak2` kept for rollback\n\n### v1.0.2 (2026-06-06)\n- **AI conclusion rendering restructured:** AI interpretations are now distributed across\n  metric sections (1–8) instead of being piled into section 9 (Conclusion)\n- **New AI conclusion JSON format:** Metric keys at top level (`moon_phase`, `lunar_day`, etc.),\n  each with `interpretation` field; `overall` field for section 9 summary only\n- **Helper functions `interp_text()` and `show_interp()`** in `draw_text_panel`:\n  unified extraction of interpretation text from dict, tuple, or string formats\n- **AI mode:** full text displayed without truncation in sections 1–8; section 9 shows only `overall`\n- **Autonomous mode:** preserved with text limits for compact layout\n- **Section 8 (Aspects):** added AI interpretation of transit Moon aspects after the aspect list\n- **Conclusion JSON format documented** in SKILL.md with examples for all supported formats\n- Updated SKILL.md with AI Conclusion JSON Format specification\n\n### v1.0.1 (2026-06-05)\n- Initial release\n- Moon phase calculation (8 phases) with Swiss Ephemeris\n- Exact phase date prediction (New Moon, First Quarter, Full Moon, Last Quarter)\n- Transit Moon → Natal Moon aspects (personal lunar cycle)\n- Personal solar-lunar phase (Moon → Natal Sun)\n- Transit Moon through natal houses (Placidus)\n- Lunar day (tithi) with 30-day Vedic meanings\n- Moon speed analysis (fast/slow emotional processing)\n- Illumination percentage and Earth distance\n- Perigee/Apogee tracking\n- Transit Moon aspects to all natal planets\n- Bilingual text output (RU/EN)\n- JSON export for AI integration\n- 2-wheel side-by-side chart layout (5760×2880 px)\n- Horizontal 3-group legend below wheels (planets, aspects, elements — uniform height)\n- Text analysis panel with target date and person name\n- Output filename includes person name and date: `lunar_{name}_{date}_{lang}.png`\n- Bundled fonts and swisseph as .dat files (ClawHub-compatible, auto-copied at runtime)\n- Vertical wheel centers at image middle (cy=1440), legend fits below\n\nFile v1.3.2:README.md\n\n# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nCalculates Moon phases, transit Moon aspects to natal Moon, transit Moon through natal houses, personal solar-lunar phase, lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text analysis panel.\n\n## 🔬 Engine\n\n- **Swiss Ephemeris** (pyswisseph 2.10.3.2) — JPL DE431 ephemerides, ~0.003° precision\n- **Pillow 12.x** — chart rendering\n- House cusps: **Placidus system**\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | 3.14.x |\n| **Runtime** | MSVC++ Redistributable 2015–2022 (x64) |\n| **Pillow** | `pip install pillow` |\n\n## Usage\n\n```bash\n# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json\n```\n\n## CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Analysis date (default: today) |\n| `--lang` | `ru` or `en` |\n| `--name` | Person's name |\n| `--json` | JSON output |\n| `--output` | Write JSON to file (UTF-8) |\n| `--conclusion` | Path to AI conclusion JSON |\n\n## Chart Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO Moon    │ ✶ Sext       │ ■ Земля       │\n│ ♊ ME Mercury │ □ Sqr        │ ■ Воздух      │\n│ ...           │ △ Trine       │ ■ Вода        │\n│               │ □ Qnc         │               │\n│               │ ☍ Opp         │               │\n└───────────────┴───────────────┴───────────────┘\n```\n\n## What It Calculates\n\n1. **Current Moon Phase** — 8 phases with illumination %, distance, exact dates\n2. **Transit Moon → Natal Moon** — Personal lunar cycle (~28 days)\n3. **Personal Solar-Lunar Phase** — Personal lunar month (~29.5 days)\n4. **Transit Moon Through Natal Houses** — Which life area is emotionally active\n5. **Lunar Day (Tithi)** — 30 Vedic lunar days with specific energy\n6. **Moon Speed** — Fast/slow emotional processing\n7. **Transit Moon Aspects to All Natal Planets** — Complete psychological picture\n\n## AI Conclusion Format\n\nWhen using `--conclusion`, provide a JSON file with top-level metric keys:\n\n```json\n{\n  \"overall\": \"General summary for section 9...\",\n  \"moon_phase\": { \"interpretation\": \"...\" },\n  \"lunar_day\": { \"interpretation\": \"...\" },\n  \"personal_phase\": { \"interpretation\": [\"Name\", \"Details...\"] },\n  \"transit_moon_aspects\": { \"interpretation\": \"...\" }\n}\n```\n\n## Links\n\n- **ClawHub**: https://clawhub.ai/dynamicsalex/astro-lunar-insights\n- **Related**: [astro-natal-chart](https://github.com/dynamicsAlex/astro-natal-chart)\n\n## License\n\nThis is an entertainment/educational tool. Do not make medical or financial decisions based on astrological readings.\n\nFile v1.3.2:_meta.json\n\n{\n  \"ownerId\": \"kn775k2zzav7y8rpwwm218x0b587f0hj\",\n  \"slug\": \"astro-lunar-insights\",\n  \"version\": \"1.3.2\",\n  \"publishedAt\": 1781091926595\n}\n\nFile v1.3.2:skill-card.md\n\n## Description: <br>\nCalculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with bilingual text analysis and chart output. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[dynamicsalex](https://clawhub.ai/user/dynamicsalex) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to generate lunar astrology reports and chart images from birth details and an analysis date. It supports RU/EN output, JSON data for downstream interpretation, and optional AI-authored conclusions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill bundles a Windows native Swiss Ephemeris module. <br>\nMitigation: Review or replace the bundled native module when your environment requires stricter native-code provenance controls. <br>\nRisk: The chart renderer may install Pillow automatically if it is missing. <br>\nMitigation: Preinstall Pillow from a trusted source before running the renderer in controlled environments. <br>\nRisk: Astrology output may be mistaken for decision-grade advice. <br>\nMitigation: Treat the reports as entertainment or educational material and do not use them for medical, financial, or other high-impact decisions. <br>\nRisk: An optional bundled frame image includes donation-oriented content when used with the frame option. <br>\nMitigation: Review frame assets before enabling optional frame embedding in generated charts. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/dynamicsalex/astro-lunar-insights) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, JSON, Files, Guidance] <br>\n**Output Format:** [Bilingual text reports, JSON data, and generated PNG chart files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Optional AI conclusion JSON can be supplied; graphical output depends on Python 3.14.x, Pillow, Windows x64, and bundled font/native data files.] <br>\n\n## Skill Version(s): <br>\n1.3.2 (source: server release evidence and skill frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.3.1: 10 files, 2895017 bytes\n\nFiles: _meta.json (139b), README.md (4907b), scripts/draw_lunar.py (38474b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (26093b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2248b), SKILL.md (23226b)\n\nFile v1.3.1:SKILL.md\n\n---\nname: astro-lunar-insights\nversion: 1.3.1\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text panel. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    emoji: \"🌙\"\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\n---\n\n# Astrology — Lunar Phase & Influence Analysis\n\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\n\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\n\n### 🔬 Precision\n\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\n\n---\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | **3.14.x** |\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\n| **Pillow** | **12.x** — `pip install pillow` |\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\n\n---\n\n## Architecture\n\n```\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\n         ↕\n   lunar_analysis.py  →  text analysis output\n```\n\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\n\n---\n\n## What This Skill Calculates\n\n### 1. Current Moon Phase\nThe Moon's position relative to the Sun (elongation angle):\n- **0°** = New Moon (🌑) — conjunction\n- **90°** = First Quarter (🌓) — waxing\n- **180°** = Full Moon (🌕) — opposition\n- **270°** = Last Quarter (🌗) — waning\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\n\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\n\n### 2. Transit Moon → Natal Moon (Personal Lunar Cycle)\nThe most important personal lunar metric. The transit Moon forms aspects to the natal Moon over a ~28-day cycle:\n\n| Aspect | Timing | Meaning |\n|---|---|---|\n| **Conjunction** | Every ~28 days | Personal New Moon — emotional reset, new cycle begins |\n| **Square** | ~7 & 21 days | Crisis point — need for action, tension |\n| **Opposition** | ~14 days | Personal Full Moon — emotional climax, awareness |\n| **Trine** | ~7 & 21 days | Harmony — intuition flows, good for planning |\n| **Sextile** | ~4 & 24 days | Opportunity — gentle support |\n| **Quincunx** | ~11 & 17 days | Adjustment — something needs realignment |\n| **Semisquare** | ~3.5 & 10.5 days | Minor irritation |\n| **Sesquiquadrate** | ~10.5 & 17.5 days | Restlessness — break patterns |\n| **Semisextile** | ~2 & 16 days | Subtle influence |\n\n### 3. Personal Solar-Lunar Phase (Transit Moon → Natal Sun)\nThe Moon's position relative to the natal Sun defines a **personal lunar month** (~29.5 days):\n\n| Phase | Elongation | Meaning |\n|---|---|---|\n| **Personal New Moon** | 0° | Beginning of personal cycle. Inward energy. Start new projects. |\n| **Personal Crescent** | 45° | Emerging. Energy builds. First steps. |\n| **Personal First Quarter** | 90° | Action point. Challenges arise. Push through. |\n| **Personal Gibbous** | 135° | Refinement. Fine-tune approach. |\n| **Personal Full Moon** | 180° | CLIMAX. Maximum awareness. Emotional revelation. |\n| **Personal Disseminating** | 225° | Sharing. Teach what you've learned. |\n| **Personal Last Quarter** | 270° | Crisis of consciousness. Let go. |\n| **Personal Balsamic** | 315° | Rest. Reflection. Prepare for next cycle. |\n\n### 4. Transit Moon Through Natal Houses\nShows which life area is emotionally activated:\n\n| House | Life Area |\n|---|---|\n| I | Personality, appearance, self |\n| II | Money, values, resources |\n| III | Communication, siblings, learning |\n| IV | Home, family, roots |\n| V | Creativity, children, romance |\n| VI | Health, work, routine |\n| VII | Partnership, marriage |\n| VIII | Transformation, shared resources |\n| IX | Philosophy, travel, higher education |\n| X | Career, reputation, public life |\n| XI | Friends, groups, hopes |\n| XII | Subconscious, solitude, karma |\n\n### 5. Lunar Day (Tithi) — Vedic System\n30 lunar days from New Moon to New Moon, each with specific energy:\n- **Day 1**: New beginning, planning\n- **Day 14**: Peak energy — best for starting anything\n- **Day 20**: Eagle day — see the big picture\n- **Day 29**: Difficult day, caution\n- **Day 30**: Blessing, gratitude, cycle completion\n\n### 6. Moon Speed Analysis\nMoon's daily motion affects emotional processing:\n- **>14.5°/day**: Very fast — quick events, less depth\n- **13.5–14.5°**: Fast — rapid emotional shifts\n- **11.5–13.5°**: Normal — balanced processing\n- **10–11.5°**: Slow — lingering feelings, deeper impact\n- **<10°/day**: Very slow — prolonged emotional intensity\n\nAlso tracks approach to perigee (closer = stronger) or apogee (farther = weaker).\n\n### 7. Transit Moon Aspects to All Natal Planets\nComplete picture of how the transit Moon interacts with every natal planet — shows which psychological functions are emotionally activated.\n\n---\n\n## Usage\n\n### Text Analysis (CLI)\n\n```bash\n# Analysis for today\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Analysis for any specific date\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\n\n# English output\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\n\n# JSON output (for renderers / AI)\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json\n```\n\n### Graphical Chart\n\n```bash\n# Chart for today (Russian)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Chart for any specific date\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\n\n# English\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\"\n```\n\n### CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Target date in DD.MM.YYYY or YYYY-MM-DD format (default: today). Supports any past, present, or future date. **When omitted, uses current system date.** Supported in both `lunar_analysis.py` and `draw_lunar.py`. |\n| `--lang` | Language: `ru` or `en` (default: `ru`) |\n| `--name` | Person's name for display |\n| `--json` | Output JSON instead of text |\n| `--output` | Write JSON directly to file (UTF-8, bypasses console encoding) |\n| `--conclusion` | Path to JSON file with AI-generated conclusion |\n\n---\n\n## JSON Output Format\n\n```json\n{\n  \"name\": \"Алексей\",\n  \"birth_date\": \"24.04.1983\",\n  \"birth_time\": \"07:00\",\n  \"birth_city\": \"Ижевск, Россия\",\n  \"target_date\": \"05.06.2026\",\n  \"moon_phase\": {\n    \"name\": \"Waning Gibbous\",\n    \"elongation\": 236.33,\n    \"illumination\": 77.7,\n    \"distance_au\": 0.002669,\n    \"distance_km\": 399206\n  },\n  \"nearest_phases\": {\n    \"New Moon\": {\"date\": \"15.06.2026\", \"days_diff\": 9.6},\n    \"Full Moon\": {\"date\": \"31.05.2026\", \"days_diff\": -5.1}\n  },\n  \"lunar_day\": {\"number\": 20, \"meaning_ru\": \"День орла...\"},\n  \"transit_moon\": {\"lon\": 311.18, \"sign\": \"Capricorn\", \"speed\": 12.14},\n  \"transit_moon_to_natal_moon\": {\"aspect\": \"Sesquiquadrate\", \"orb\": 0.91},\n  \"personal_phase\": {\"key\": \"last_quarter\", \"name_ru\": \"Персональная последняя четверть\"},\n  \"transit_moon_house\": {\"house\": 7, \"title_ru\": \"Партнёрство, брак...\"},\n  \"moon_speed\": {\"speed\": 12.14, \"description_ru\": \"Нормальная...\"},\n  \"transit_moon_aspects\": [\n    {\"transit\": \"Moon\", \"natal\": \"Sun\", \"aspect\": \"Square\", \"major\": true, \"orb\": 7.6}\n  ],\n  \"engine\": \"Swiss Ephemeris v20230604\"\n}\n```\n\n---\n\n## Image Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|                           |                           |                   |\n|     ФАЗА ЛУНЫ             |     НАТАЛЬНОЕ КОЛЕСО      |   TEXT ANALYSIS   |\n|     MOON PHASE WHEEL      |     NATAL CHART WHEEL     |   PANEL           |\n|     (3400/2 = 1700 wide)  |     (1700 wide)           |   (2360×2880)     |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets (circles |  - Lunar day      |\n|  - Current position       |    with letter codes)     |  - Moon aspects   |\n|    indicator (yellow)     |  - Transit Moon (outer    |  - Personal phase |\n|                           |    orbit, highlighted)    |  - House          |\n|                           |  - ASC/MC lines           |  - Moon speed     |\n|                           |  - Aspect lines (colored) |  - All aspects    |\n|                           |                           |  - Conclusion     |\n|                           |                           |                   |\n+---------------------------+---------------------------+-------------------+\n\nLegend (below wheels, 3 uniform-height groups side by side):\n┌─────────────────┬─────────────────┬─────────────────┐\n│  ПЛАНЕТЫ        │  АСПЕКТЫ        │  СТИХИИ         │\n│  (PLANETS)      │  (ASPECTS)      │  (ELEMENTS)     │\n│                 │                 │                 │\n│  ♈ SU Sun      │  □ Conj          │  ■ Огонь        │\n│  ♉ MO Moon     │  ✶ Sext          │  ■ Земля        │\n│  ♊ ME Mercury  │  □ Sqr           │  ■ Воздух       │\n│  ...            │  △ Trine         │  ■ Вода         │\n│                 │  □ Qnc           │                 │\n│                 │  ☍ Opp           │                 │\n└─────────────────┴─────────────────┴─────────────────┘\n```\n\n- Wheels centered vertically in the image (cy=1440)\n- Wheels radius: 640px each\n- Legend: 3 groups of uniform height below wheels\n- Left panel: 3400px (2 wheels × 1700px)\n- Right panel: 2360px text interpretation\n\n---\n\n## Font Handling\n\nTwo bundled fonts in `scripts/`:\n\n| Font | Purpose | Extension |\n|---|---|---|\n| `seguisym.ttf.dat` | Zodiac symbols ♈♉♊... + planet symbols ☉☽☿... | `.dat` (ClawHub-compatible) |\n| `segoeuisl.ttf.dat` | Cyrillic, latin, digits | `.dat` (ClawHub-compatible) |\n\nBoth are auto-copied to `.ttf` at runtime for Pillow compatibility.\n\n---\n\n## Scripts Reference\n\n| Script | Purpose | Dependencies |\n|---|---|---|\n| `scripts/lunar_analysis.py` | **Sole calculation engine.** All lunar metrics, text + JSON output. | swisseph, math, json |\n| `scripts/draw_lunar.py` | **Renderer.** Calls lunar_analysis.py --json, draws 5760×2880 chart. | subprocess, json, math, Pillow |\n| `scripts/swisseph.cp314-win_amd64.pyd.dat` | Swiss Ephemeris binary (2 MB) — JPL DE431 ephemerides | MSVC++ Redist |\n| `scripts/seguisym.ttf.dat` | Zodiac + planet symbol font | — |\n| `scripts/segoeuisl.ttf.dat` | Cyrillic/latin font | — |\n\n---\n\n## AI Conclusion Workflow (for OpenClaw agents)\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and writes enhanced conclusion to a JSON file\n        (see AI Conclusion JSON Format below)\nStep 3: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\nWhen `--conclusion` is provided, the AI-generated text is used verbatim in the chart.\nEach metric gets its own interpretation section (1–8), and the overall summary\nis shown in section 9 (Conclusion). Without `--conclusion`, the script generates\nbuilt-in autonomous interpretations.\n\n### AI Conclusion JSON Format\n\nThe conclusion file must have metric keys at the **top level** (not nested under `metrics`).\nEach metric contains an `interpretation` field (string, dict with `description`, or tuple).\nThe `overall` field contains the general summary for section 9.\n\n```json\n{\n  \"overall\": \"General summary text for section 9...\",\n  \"moon_phase\": {\n    \"interpretation\": {\n      \"name\": \"Waning Gibbous\",\n      \"description\": \"Full interpretation text for section 1...\"\n    }\n  },\n  \"nearest_phases\": {\n    \"interpretation\": \"Interpretation text for section 2...\"\n  },\n  \"lunar_day\": {\n    \"interpretation\": \"Interpretation text for section 3...\"\n  },\n  \"transit_moon_to_natal_moon\": {\n    \"interpretation\": \"Interpretation text for section 4...\"\n  },\n  \"personal_phase\": {\n    \"interpretation\": [\"Phase Name\", \"Interpretation text for section 5...\"]\n  },\n  \"transit_moon_house\": {\n    \"interpretation\": \"Interpretation text for section 6...\"\n  },\n  \"moon_speed\": {\n    \"interpretation\": \"Interpretation text for section 7...\"\n  },\n  \"transit_moon_aspects\": {\n    \"interpretation\": \"Interpretation text for section 8...\"\n  }\n}\n```\n\n**Supported `interpretation` formats:**\n- `dict` with `description` key — used by autonomous mode\n- `tuple/list` of `[title, text]` — used by autonomous mode for personal_phase\n- `string` — plain text interpretation (AI mode)\n\nThe renderer (`draw_text_panel`) automatically detects the format and extracts\nthe text accordingly. AI mode shows full text without truncation; autonomous mode\nlimits text to keep the chart compact.\n\n## AI Workflow (for OpenClaw agents)\n\n**⚠️ ПРАВИЛО: ВСЕГДА предоставляй расширенную интерпретацию ИИ, когда это возможно.**\n\nАвтономная интерпретация (встроенная в скрипт) — это fallback для CLI-использования. Когда скилл вызывается через OpenClaw агент, агент **обязан** проанализировать JSON и сгенерировать расширенную интерпретацию по всем метрикам. Это ключевое отличие качественного прогноза от шаблонного.\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and provides extended interpretation for ALL metrics\nStep 3: AI writes conclusion JSON file with overall summary\nStep 4: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\n**Без шага 3-4 карта будет содержать только автономную (краткую) интерпретацию.**\n\nThe AI should focus on:\n- **Personal New/Full Moon** — most significant events\n- **Transit Moon house** — which life area is emotionally active\n- **Transit Moon → Natal Moon aspect** — emotional cycle phase\n- **Moon speed** — depth vs. speed of emotional processing\n- **Lunar day meaning** — Vedic tithi guidance\n- **Transit Moon aspects to all natal planets** — detailed psychological analysis\n- **Overall synthesis** — practical recommendations for the day\n\n---\n\n## Encoding & Console Handling\n\n**Problem:** Windows console (cmd/PowerShell) redirects stdout in cp1251/cp866, breaking UTF-8 output even with `PYTHONIOENCODING=utf-8`.\n\n**Solution:** `lunar_analysis.py` supports `--output file.json` which writes JSON directly to a file via `open(..., encoding='utf-8')`, completely bypassing the console. `draw_lunar.py` uses this internally — it passes `--output /tmp/lunar_analysis_tmp.json` to the subprocess and reads the file directly.\n\n**For CLI users:** Use `--output` when redirecting to files:\n```bash\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --json --output result.json\n```\n\nFor text output in terminal, set `PYTHONIOENCODING=utf-8` and `chcp 65001` (cmd) or use PowerShell with `$env:PYTHONIOENCODING='utf-8'`.\n\n---\n\n## Disclaimer\n\nThis is an entertainment/educational tool, not a scientific method. Do not make medical or financial decisions based on astrological readings.\n\n---\n\n## Changelog\n\n### v1.0.1 (2026-06-05)\n- **Encoding fix:** Added `--output file.json` flag to `lunar_analysis.py` — writes JSON directly to file in UTF-8, bypassing Windows console cp1251 encoding issues\n- **draw_lunar.py** now uses `--output` internally via temp file for subprocess communication\n- **Layout redesign:** 2 wheels side-by-side (horizontal), vertically centered (cy=1440)\n- **Legend:** 3 uniform-height groups (planets, aspects, elements) arranged horizontally below wheels\n- **Planet circles** with 2-letter codes (SU, MO, ME...) matching astro-natal-chart style\n- **Colored aspect lines** on natal wheel (red=square, blue=trine, green=sextile, etc.)\n- **Text panel** widened to 2360px with smaller fonts for better text fit\n- **Output filename** now includes person name: `lunar_{name}_{date}_{lang}.png`\n- **Target date** shown in text panel instead of \"today\"\n- **Font/binary setup:** All `.ttf` and `.pyd` files shipped as `.dat` (ClawHub-compatible), auto-copied at runtime\n- Removed `__pycache__` and generated `.ttf`/`.pyd` from skill directory\n- Updated SKILL.md with encoding guide, new CLI args, and updated layout diagram\n\n### v1.0.0 (2026-06-05)\n\n### v1.2.0 (2026-06-07)\n- **Cosmetic: aspect symbols in text panel** — Section 8 (Aspects) now renders graphical aspect symbols (△ □ ✶ ☌ ☍ ⚹ ⚺ ∠) from `seguisym.ttf` instead of text names (Trine, Square, etc.), matching the legend style\n- **Symbol color coding**: aspect glyphs are rendered in their astrological colors (green △, red □, blue ✶, etc.) via `_get_word_color` + `ASP_SYMBOL_COLORS` map\n- **`draw_lunar.py` now supports `--target-date` flag** — previously only `lunar_analysis.py` supported target dates via positional arg; now both scripts accept `--target-date`\n- **Subprocess propagation**: `draw_lunar.py` passes `--target-date` through to `lunar_analysis.py` subprocess call\n- **`lunar_analysis.py` `--target-date` as explicit flag** — previously only supported as 4th positional argument; now also parsed as `--target-date` flag for consistency\n- **Dual date format support**: both `DD.MM.YYYY` and `YYYY-MM-DD` formats accepted for `--target-date`\n- **AI Conclusion rule added**: SKILL.md now explicitly states that agents MUST always provide extended AI interpretation when possible; autonomous interpretation is a CLI fallback only\n- **Updated AI workflow**: 4-step process (analyze → interpret → write conclusion → render chart) documented with explicit warning about missing conclusion = short output only\n\n### v1.1.0 (2026-06-06)\n- **Cosmetic overhaul of text panel:** Font sizes now match astro-natal-chart (FS=19, FM=22, FL=26, LH=22)\n- **Text wrapping improved:** Line width reduced to half (`max_w = w // 2 - 20`) for 2x faster line breaks\n- **Section headers raised:** Title labels above both wheels moved up (80px from wheel edge) for better visual balance\n- **Colored planet names in text:** Planet names in interpretation text are now rendered in their astrological colors (e.g., Марс in red, Венера in green, Уран in cyan)\n- **Colored aspect type names:** Aspect type names (Square, Trine, Sextile, Quincunx, etc.) in text are colored to match the legend\n- **Section 9 (Conclusion) always visible:** Now displays for both AI mode (`overall` text) and autonomous mode (`summary.cycle_energy` + `summary.intensity`)\n- **Fixed aspect list rendering:** Transit Moon aspects in section 8 now show readable text instead of raw dict representation\n- **Fixed `interp_text()` robustness:** Now handles all conclusion data formats — string, list, dict with `description`, dict with `interpretation` key, tuple\n- **Fixed nested function scope:** Replaced `nonlocal y` pattern with mutable list `_y = [y]` to avoid UnboundLocalError in nested drawing functions\n- **Backup files preserved:** `draw_lunar.py.bak` and `draw_lunar.py.bak2` kept for rollback\n\n### v1.0.2 (2026-06-06)\n- **AI conclusion rendering restructured:** AI interpretations are now distributed across\n  metric sections (1–8) instead of being piled into section 9 (Conclusion)\n- **New AI conclusion JSON format:** Metric keys at top level (`moon_phase`, `lunar_day`, etc.),\n  each with `interpretation` field; `overall` field for section 9 summary only\n- **Helper functions `interp_text()` and `show_interp()`** in `draw_text_panel`:\n  unified extraction of interpretation text from dict, tuple, or string formats\n- **AI mode:** full text displayed without truncation in sections 1–8; section 9 shows only `overall`\n- **Autonomous mode:** preserved with text limits for compact layout\n- **Section 8 (Aspects):** added AI interpretation of transit Moon aspects after the aspect list\n- **Conclusion JSON format documented** in SKILL.md with examples for all supported formats\n- Updated SKILL.md with AI Conclusion JSON Format specification\n\n### v1.0.1 (2026-06-05)\n- Initial release\n- Moon phase calculation (8 phases) with Swiss Ephemeris\n- Exact phase date prediction (New Moon, First Quarter, Full Moon, Last Quarter)\n- Transit Moon → Natal Moon aspects (personal lunar cycle)\n- Personal solar-lunar phase (Moon → Natal Sun)\n- Transit Moon through natal houses (Placidus)\n- Lunar day (tithi) with 30-day Vedic meanings\n- Moon speed analysis (fast/slow emotional processing)\n- Illumination percentage and Earth distance\n- Perigee/Apogee tracking\n- Transit Moon aspects to all natal planets\n- Bilingual text output (RU/EN)\n- JSON export for AI integration\n- 2-wheel side-by-side chart layout (5760×2880 px)\n- Horizontal 3-group legend below wheels (planets, aspects, elements — uniform height)\n- Text analysis panel with target date and person name\n- Output filename includes person name and date: `lunar_{name}_{date}_{lang}.png`\n- Bundled fonts and swisseph as .dat files (ClawHub-compatible, auto-copied at runtime)\n- Vertical wheel centers at image middle (cy=1440), legend fits below\n\nFile v1.3.1:README.md\n\n# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nCalculates Moon phases, transit Moon aspects to natal Moon, transit Moon through natal houses, personal solar-lunar phase, lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text analysis panel.\n\n## 🔬 Engine\n\n- **Swiss Ephemeris** (pyswisseph 2.10.3.2) — JPL DE431 ephemerides, ~0.003° precision\n- **Pillow 12.x** — chart rendering\n- House cusps: **Placidus system**\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | 3.14.x |\n| **Runtime** | MSVC++ Redistributable 2015–2022 (x64) |\n| **Pillow** | `pip install pillow` |\n\n## Usage\n\n```bash\n# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json\n```\n\n## CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Analysis date (default: today) |\n| `--lang` | `ru` or `en` |\n| `--name` | Person's name |\n| `--json` | JSON output |\n| `--output` | Write JSON to file (UTF-8) |\n| `--conclusion` | Path to AI conclusion JSON |\n\n## Chart Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO Moon    │ ✶ Sext       │ ■ Земля       │\n│ ♊ ME Mercury │ □ Sqr        │ ■ Воздух      │\n│ ...           │ △ Trine       │ ■ Вода        │\n│               │ □ Qnc         │               │\n│               │ ☍ Opp         │               │\n└───────────────┴───────────────┴───────────────┘\n```\n\n## What It Calculates\n\n1. **Current Moon Phase** — 8 phases with illumination %, distance, exact dates\n2. **Transit Moon → Natal Moon** — Personal lunar cycle (~28 days)\n3. **Personal Solar-Lunar Phase** — Personal lunar month (~29.5 days)\n4. **Transit Moon Through Natal Houses** — Which life area is emotionally active\n5. **Lunar Day (Tithi)** — 30 Vedic lunar days with specific energy\n6. **Moon Speed** — Fast/slow emotional processing\n7. **Transit Moon Aspects to All Natal Planets** — Complete psychological picture\n\n## AI Conclusion Format\n\nWhen using `--conclusion`, provide a JSON file with top-level metric keys:\n\n```json\n{\n  \"overall\": \"General summary for section 9...\",\n  \"moon_phase\": { \"interpretation\": \"...\" },\n  \"lunar_day\": { \"interpretation\": \"...\" },\n  \"personal_phase\": { \"interpretation\": [\"Name\", \"Details...\"] },\n  \"transit_moon_aspects\": { \"interpretation\": \"...\" }\n}\n```\n\n## Links\n\n- **ClawHub**: https://clawhub.ai/dynamicsalex/astro-lunar-insights\n- **Related**: [astro-natal-chart](https://github.com/dynamicsAlex/astro-natal-chart)\n\n## License\n\nThis is an entertainment/educational tool. Do not make medical or financial decisions based on astrological readings.\n\nFile v1.3.1:_meta.json\n\n{\n  \"ownerId\": \"kn775k2zzav7y8rpwwm218x0b587f0hj\",\n  \"slug\": \"astro-lunar-insights\",\n  \"version\": \"1.3.1\",\n  \"publishedAt\": 1781091363588\n}\n\nFile v1.3.1:skill-card.md\n\n## Description: <br>\nCalculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[dynamicsalex](https://clawhub.ai/user/dynamicsalex) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to generate bilingual lunar astrology reports, JSON metrics, and rendered chart images from birth data and a target date. The outputs are intended for entertainment and educational interpretation, not high-stakes decisions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill runs local Python code and uses a bundled Windows native module. <br>\nMitigation: Review the bundled Swiss Ephemeris binary provenance before deployment, especially in sensitive environments. <br>\nRisk: The renderer may install Pillow with pip if it is missing. <br>\nMitigation: Preinstall and manage Pillow through the deployment environment's normal dependency controls. <br>\nRisk: Astrology output can be misapplied to medical, financial, or other high-stakes decisions. <br>\nMitigation: Present the generated readings as entertainment or educational content and avoid using them as decision authority. <br>\n\n\n## Reference(s): <br>\n- [ClawHub release page](https://clawhub.ai/dynamicsalex/astro-lunar-insights) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Text reports, JSON metrics, and PNG chart files produced through Python CLI commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports Russian and English output; chart rendering can include an AI-generated conclusion JSON.] <br>\n\n## Skill Version(s): <br>\n1.3.1 (source: server release evidence and skill frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.3.0: 10 files, 2894641 bytes\n\nFiles: _meta.json (139b), README.md (4907b), scripts/draw_lunar.py (37009b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (26093b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2399b), SKILL.md (23226b)\n\nFile v1.3.0:SKILL.md\n\n---\nname: astro-lunar-insights\nversion: 1.3.0\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text panel. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    emoji: \"🌙\"\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\n---\n\n# Astrology — Lunar Phase & Influence Analysis\n\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\n\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\n\n### 🔬 Precision\n\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\n\n---\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | **3.14.x** |\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\n| **Pillow** | **12.x** — `pip install pillow` |\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\n\n---\n\n## Architecture\n\n```\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\n         ↕\n   lunar_analysis.py  →  text analysis output\n```\n\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\n\n---\n\n## What This Skill Calculates\n\n### 1. Current Moon Phase\nThe Moon's position relative to the Sun (elongation angle):\n- **0°** = New Moon (🌑) — conjunction\n- **90°** = First Quarter (🌓) — waxing\n- **180°** = Full Moon (🌕) — opposition\n- **270°** = Last Quarter (🌗) — waning\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\n\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\n\n### 2. Transit Moon → Natal Moon (Personal Lunar Cycle)\nThe most important personal lunar metric. The transit Moon forms aspects to the natal Moon over a ~28-day cycle:\n\n| Aspect | Timing | Meaning |\n|---|---|---|\n| **Conjunction** | Every ~28 days | Personal New Moon — emotional reset, new cycle begins |\n| **Square** | ~7 & 21 days | Crisis point — need for action, tension |\n| **Opposition** | ~14 days | Personal Full Moon — emotional climax, awareness |\n| **Trine** | ~7 & 21 days | Harmony — intuition flows, good for planning |\n| **Sextile** | ~4 & 24 days | Opportunity — gentle support |\n| **Quincunx** | ~11 & 17 days | Adjustment — something needs realignment |\n| **Semisquare** | ~3.5 & 10.5 days | Minor irritation |\n| **Sesquiquadrate** | ~10.5 & 17.5 days | Restlessness — break patterns |\n| **Semisextile** | ~2 & 16 days | Subtle influence |\n\n### 3. Personal Solar-Lunar Phase (Transit Moon → Natal Sun)\nThe Moon's position relative to the natal Sun defines a **personal lunar month** (~29.5 days):\n\n| Phase | Elongation | Meaning |\n|---|---|---|\n| **Personal New Moon** | 0° | Beginning of personal cycle. Inward energy. Start new projects. |\n| **Personal Crescent** | 45° | Emerging. Energy builds. First steps. |\n| **Personal First Quarter** | 90° | Action point. Challenges arise. Push through. |\n| **Personal Gibbous** | 135° | Refinement. Fine-tune approach. |\n| **Personal Full Moon** | 180° | CLIMAX. Maximum awareness. Emotional revelation. |\n| **Personal Disseminating** | 225° | Sharing. Teach what you've learned. |\n| **Personal Last Quarter** | 270° | Crisis of consciousness. Let go. |\n| **Personal Balsamic** | 315° | Rest. Reflection. Prepare for next cycle. |\n\n### 4. Transit Moon Through Natal Houses\nShows which life area is emotionally activated:\n\n| House | Life Area |\n|---|---|\n| I | Personality, appearance, self |\n| II | Money, values, resources |\n| III | Communication, siblings, learning |\n| IV | Home, family, roots |\n| V | Creativity, children, romance |\n| VI | Health, work, routine |\n| VII | Partnership, marriage |\n| VIII | Transformation, shared resources |\n| IX | Philosophy, travel, higher education |\n| X | Career, reputation, public life |\n| XI | Friends, groups, hopes |\n| XII | Subconscious, solitude, karma |\n\n### 5. Lunar Day (Tithi) — Vedic System\n30 lunar days from New Moon to New Moon, each with specific energy:\n- **Day 1**: New beginning, planning\n- **Day 14**: Peak energy — best for starting anything\n- **Day 20**: Eagle day — see the big picture\n- **Day 29**: Difficult day, caution\n- **Day 30**: Blessing, gratitude, cycle completion\n\n### 6. Moon Speed Analysis\nMoon's daily motion affects emotional processing:\n- **>14.5°/day**: Very fast — quick events, less depth\n- **13.5–14.5°**: Fast — rapid emotional shifts\n- **11.5–13.5°**: Normal — balanced processing\n- **10–11.5°**: Slow — lingering feelings, deeper impact\n- **<10°/day**: Very slow — prolonged emotional intensity\n\nAlso tracks approach to perigee (closer = stronger) or apogee (farther = weaker).\n\n### 7. Transit Moon Aspects to All Natal Planets\nComplete picture of how the transit Moon interacts with every natal planet — shows which psychological functions are emotionally activated.\n\n---\n\n## Usage\n\n### Text Analysis (CLI)\n\n```bash\n# Analysis for today\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Analysis for any specific date\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\n\n# English output\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\n\n# JSON output (for renderers / AI)\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json\n```\n\n### Graphical Chart\n\n```bash\n# Chart for today (Russian)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Chart for any specific date\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\n\n# English\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\"\n```\n\n### CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Target date in DD.MM.YYYY or YYYY-MM-DD format (default: today). Supports any past, present, or future date. **When omitted, uses current system date.** Supported in both `lunar_analysis.py` and `draw_lunar.py`. |\n| `--lang` | Language: `ru` or `en` (default: `ru`) |\n| `--name` | Person's name for display |\n| `--json` | Output JSON instead of text |\n| `--output` | Write JSON directly to file (UTF-8, bypasses console encoding) |\n| `--conclusion` | Path to JSON file with AI-generated conclusion |\n\n---\n\n## JSON Output Format\n\n```json\n{\n  \"name\": \"Алексей\",\n  \"birth_date\": \"24.04.1983\",\n  \"birth_time\": \"07:00\",\n  \"birth_city\": \"Ижевск, Россия\",\n  \"target_date\": \"05.06.2026\",\n  \"moon_phase\": {\n    \"name\": \"Waning Gibbous\",\n    \"elongation\": 236.33,\n    \"illumination\": 77.7,\n    \"distance_au\": 0.002669,\n    \"distance_km\": 399206\n  },\n  \"nearest_phases\": {\n    \"New Moon\": {\"date\": \"15.06.2026\", \"days_diff\": 9.6},\n    \"Full Moon\": {\"date\": \"31.05.2026\", \"days_diff\": -5.1}\n  },\n  \"lunar_day\": {\"number\": 20, \"meaning_ru\": \"День орла...\"},\n  \"transit_moon\": {\"lon\": 311.18, \"sign\": \"Capricorn\", \"speed\": 12.14},\n  \"transit_moon_to_natal_moon\": {\"aspect\": \"Sesquiquadrate\", \"orb\": 0.91},\n  \"personal_phase\": {\"key\": \"last_quarter\", \"name_ru\": \"Персональная последняя четверть\"},\n  \"transit_moon_house\": {\"house\": 7, \"title_ru\": \"Партнёрство, брак...\"},\n  \"moon_speed\": {\"speed\": 12.14, \"description_ru\": \"Нормальная...\"},\n  \"transit_moon_aspects\": [\n    {\"transit\": \"Moon\", \"natal\": \"Sun\", \"aspect\": \"Square\", \"major\": true, \"orb\": 7.6}\n  ],\n  \"engine\": \"Swiss Ephemeris v20230604\"\n}\n```\n\n---\n\n## Image Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|                           |                           |                   |\n|     ФАЗА ЛУНЫ             |     НАТАЛЬНОЕ КОЛЕСО      |   TEXT ANALYSIS   |\n|     MOON PHASE WHEEL      |     NATAL CHART WHEEL     |   PANEL           |\n|     (3400/2 = 1700 wide)  |     (1700 wide)           |   (2360×2880)     |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets (circles |  - Lunar day      |\n|  - Current position       |    with letter codes)     |  - Moon aspects   |\n|    indicator (yellow)     |  - Transit Moon (outer    |  - Personal phase |\n|                           |    orbit, highlighted)    |  - House          |\n|                           |  - ASC/MC lines           |  - Moon speed     |\n|                           |  - Aspect lines (colored) |  - All aspects    |\n|                           |                           |  - Conclusion     |\n|                           |                           |                   |\n+---------------------------+---------------------------+-------------------+\n\nLegend (below wheels, 3 uniform-height groups side by side):\n┌─────────────────┬─────────────────┬─────────────────┐\n│  ПЛАНЕТЫ        │  АСПЕКТЫ        │  СТИХИИ         │\n│  (PLANETS)      │  (ASPECTS)      │  (ELEMENTS)     │\n│                 │                 │                 │\n│  ♈ SU Sun      │  □ Conj          │  ■ Огонь        │\n│  ♉ MO Moon     │  ✶ Sext          │  ■ Земля        │\n│  ♊ ME Mercury  │  □ Sqr           │  ■ Воздух       │\n│  ...            │  △ Trine         │  ■ Вода         │\n│                 │  □ Qnc           │                 │\n│                 │  ☍ Opp           │                 │\n└─────────────────┴─────────────────┴─────────────────┘\n```\n\n- Wheels centered vertically in the image (cy=1440)\n- Wheels radius: 640px each\n- Legend: 3 groups of uniform height below wheels\n- Left panel: 3400px (2 wheels × 1700px)\n- Right panel: 2360px text interpretation\n\n---\n\n## Font Handling\n\nTwo bundled fonts in `scripts/`:\n\n| Font | Purpose | Extension |\n|---|---|---|\n| `seguisym.ttf.dat` | Zodiac symbols ♈♉♊... + planet symbols ☉☽☿... | `.dat` (ClawHub-compatible) |\n| `segoeuisl.ttf.dat` | Cyrillic, latin, digits | `.dat` (ClawHub-compatible) |\n\nBoth are auto-copied to `.ttf` at runtime for Pillow compatibility.\n\n---\n\n## Scripts Reference\n\n| Script | Purpose | Dependencies |\n|---|---|---|\n| `scripts/lunar_analysis.py` | **Sole calculation engine.** All lunar metrics, text + JSON output. | swisseph, math, json |\n| `scripts/draw_lunar.py` | **Renderer.** Calls lunar_analysis.py --json, draws 5760×2880 chart. | subprocess, json, math, Pillow |\n| `scripts/swisseph.cp314-win_amd64.pyd.dat` | Swiss Ephemeris binary (2 MB) — JPL DE431 ephemerides | MSVC++ Redist |\n| `scripts/seguisym.ttf.dat` | Zodiac + planet symbol font | — |\n| `scripts/segoeuisl.ttf.dat` | Cyrillic/latin font | — |\n\n---\n\n## AI Conclusion Workflow (for OpenClaw agents)\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and writes enhanced conclusion to a JSON file\n        (see AI Conclusion JSON Format below)\nStep 3: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\nWhen `--conclusion` is provided, the AI-generated text is used verbatim in the chart.\nEach metric gets its own interpretation section (1–8), and the overall summary\nis shown in section 9 (Conclusion). Without `--conclusion`, the script generates\nbuilt-in autonomous interpretations.\n\n### AI Conclusion JSON Format\n\nThe conclusion file must have metric keys at the **top level** (not nested under `metrics`).\nEach metric contains an `interpretation` field (string, dict with `description`, or tuple).\nThe `overall` field contains the general summary for section 9.\n\n```json\n{\n  \"overall\": \"General summary text for section 9...\",\n  \"moon_phase\": {\n    \"interpretation\": {\n      \"name\": \"Waning Gibbous\",\n      \"description\": \"Full interpretation text for section 1...\"\n    }\n  },\n  \"nearest_phases\": {\n    \"interpretation\": \"Interpretation text for section 2...\"\n  },\n  \"lunar_day\": {\n    \"interpretation\": \"Interpretation text for section 3...\"\n  },\n  \"transit_moon_to_natal_moon\": {\n    \"interpretation\": \"Interpretation text for section 4...\"\n  },\n  \"personal_phase\": {\n    \"interpretation\": [\"Phase Name\", \"Interpretation text for section 5...\"]\n  },\n  \"transit_moon_house\": {\n    \"interpretation\": \"Interpretation text for section 6...\"\n  },\n  \"moon_speed\": {\n    \"interpretation\": \"Interpretation text for section 7...\"\n  },\n  \"transit_moon_aspects\": {\n    \"interpretation\": \"Interpretation text for section 8...\"\n  }\n}\n```\n\n**Supported `interpretation` formats:**\n- `dict` with `description` key — used by autonomous mode\n- `tuple/list` of `[title, text]` — used by autonomous mode for personal_phase\n- `string` — plain text interpretation (AI mode)\n\nThe renderer (`draw_text_panel`) automatically detects the format and extracts\nthe text accordingly. AI mode shows full text without truncation; autonomous mode\nlimits text to keep the chart compact.\n\n## AI Workflow (for OpenClaw agents)\n\n**⚠️ ПРАВИЛО: ВСЕГДА предоставляй расширенную интерпретацию ИИ, когда это возможно.**\n\nАвтономная интерпретация (встроенная в скрипт) — это fallback для CLI-использования. Когда скилл вызывается через OpenClaw агент, агент **обязан** проанализировать JSON и сгенерировать расширенную интерпретацию по всем метрикам. Это ключевое отличие качественного прогноза от шаблонного.\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and provides extended interpretation for ALL metrics\nStep 3: AI writes conclusion JSON file with overall summary\nStep 4: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\n**Без шага 3-4 карта будет содержать только автономную (краткую) интерпретацию.**\n\nThe AI should focus on:\n- **Personal New/Full Moon** — most significant events\n- **Transit Moon house** — which life area is emotionally active\n- **Transit Moon → Natal Moon aspect** — emotional cycle phase\n- **Moon speed** — depth vs. speed of emotional processing\n- **Lunar day meaning** — Vedic tithi guidance\n- **Transit Moon aspects to all natal planets** — detailed psychological analysis\n- **Overall synthesis** — practical recommendations for the day\n\n---\n\n## Encoding & Console Handling\n\n**Problem:** Windows console (cmd/PowerShell) redirects stdout in cp1251/cp866, breaking UTF-8 output even with `PYTHONIOENCODING=utf-8`.\n\n**Solution:** `lunar_analysis.py` supports `--output file.json` which writes JSON directly to a file via `open(..., encoding='utf-8')`, completely bypassing the console. `draw_lunar.py` uses this internally — it passes `--output /tmp/lunar_analysis_tmp.json` to the subprocess and reads the file directly.\n\n**For CLI users:** Use `--output` when redirecting to files:\n```bash\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --json --output result.json\n```\n\nFor text output in terminal, set `PYTHONIOENCODING=utf-8` and `chcp 65001` (cmd) or use PowerShell with `$env:PYTHONIOENCODING='utf-8'`.\n\n---\n\n## Disclaimer\n\nThis is an entertainment/educational tool, not a scientific method. Do not make medical or financial decisions based on astrological readings.\n\n---\n\n## Changelog\n\n### v1.0.1 (2026-06-05)\n- **Encoding fix:** Added `--output file.json` flag to `lunar_analysis.py` — writes JSON directly to file in UTF-8, bypassing Windows console cp1251 encoding issues\n- **draw_lunar.py** now uses `--output` internally via temp file for subprocess communication\n- **Layout redesign:** 2 wheels side-by-side (horizontal), vertically centered (cy=1440)\n- **Legend:** 3 uniform-height groups (planets, aspects, elements) arranged horizontally below wheels\n- **Planet circles** with 2-letter codes (SU, MO, ME...) matching astro-natal-chart style\n- **Colored aspect lines** on natal wheel (red=square, blue=trine, green=sextile, etc.)\n- **Text panel** widened to 2360px with smaller fonts for better text fit\n- **Output filename** now includes person name: `lunar_{name}_{date}_{lang}.png`\n- **Target date** shown in text panel instead of \"today\"\n- **Font/binary setup:** All `.ttf` and `.pyd` files shipped as `.dat` (ClawHub-compatible), auto-copied at runtime\n- Removed `__pycache__` and generated `.ttf`/`.pyd` from skill directory\n- Updated SKILL.md with encoding guide, new CLI args, and updated layout diagram\n\n### v1.0.0 (2026-06-05)\n\n### v1.2.0 (2026-06-07)\n- **Cosmetic: aspect symbols in text panel** — Section 8 (Aspects) now renders graphical aspect symbols (△ □ ✶ ☌ ☍ ⚹ ⚺ ∠) from `seguisym.ttf` instead of text names (Trine, Square, etc.), matching the legend style\n- **Symbol color coding**: aspect glyphs are rendered in their astrological colors (green △, red □, blue ✶, etc.) via `_get_word_color` + `ASP_SYMBOL_COLORS` map\n- **`draw_lunar.py` now supports `--target-date` flag** — previously only `lunar_analysis.py` supported target dates via positional arg; now both scripts accept `--target-date`\n- **Subprocess propagation**: `draw_lunar.py` passes `--target-date` through to `lunar_analysis.py` subprocess call\n- **`lunar_analysis.py` `--target-date` as explicit flag** — previously only supported as 4th positional argument; now also parsed as `--target-date` flag for consistency\n- **Dual date format support**: both `DD.MM.YYYY` and `YYYY-MM-DD` formats accepted for `--target-date`\n- **AI Conclusion rule added**: SKILL.md now explicitly states that agents MUST always provide extended AI interpretation when possible; autonomous interpretation is a CLI fallback only\n- **Updated AI workflow**: 4-step process (analyze → interpret → write conclusion → render chart) documented with explicit warning about missing conclusion = short output only\n\n### v1.1.0 (2026-06-06)\n- **Cosmetic overhaul of text panel:** Font sizes now match astro-natal-chart (FS=19, FM=22, FL=26, LH=22)\n- **Text wrapping improved:** Line width reduced to half (`max_w = w // 2 - 20`) for 2x faster line breaks\n- **Section headers raised:** Title labels above both wheels moved up (80px from wheel edge) for better visual balance\n- **Colored planet names in text:** Planet names in interpretation text are now rendered in their astrological colors (e.g., Марс in red, Венера in green, Уран in cyan)\n- **Colored aspect type names:** Aspect type names (Square, Trine, Sextile, Quincunx, etc.) in text are colored to match the legend\n- **Section 9 (Conclusion) always visible:** Now displays for both AI mode (`overall` text) and autonomous mode (`summary.cycle_energy` + `summary.intensity`)\n- **Fixed aspect list rendering:** Transit Moon aspects in section 8 now show readable text instead of raw dict representation\n- **Fixed `interp_text()` robustness:** Now handles all conclusion data formats — string, list, dict with `description`, dict with `interpretation` key, tuple\n- **Fixed nested function scope:** Replaced `nonlocal y` pattern with mutable list `_y = [y]` to avoid UnboundLocalError in nested drawing functions\n- **Backup files preserved:** `draw_lunar.py.bak` and `draw_lunar.py.bak2` kept for rollback\n\n### v1.0.2 (2026-06-06)\n- **AI conclusion rendering restructured:** AI interpretations are now distributed across\n  metric sections (1–8) instead of being piled into section 9 (Conclusion)\n- **New AI conclusion JSON format:** Metric keys at top level (`moon_phase`, `lunar_day`, etc.),\n  each with `interpretation` field; `overall` field for section 9 summary only\n- **Helper functions `interp_text()` and `show_interp()`** in `draw_text_panel`:\n  unified extraction of interpretation text from dict, tuple, or string formats\n- **AI mode:** full text displayed without truncation in sections 1–8; section 9 shows only `overall`\n- **Autonomous mode:** preserved with text limits for compact layout\n- **Section 8 (Aspects):** added AI interpretation of transit Moon aspects after the aspect list\n- **Conclusion JSON format documented** in SKILL.md with examples for all supported formats\n- Updated SKILL.md with AI Conclusion JSON Format specification\n\n### v1.0.1 (2026-06-05)\n- Initial release\n- Moon phase calculation (8 phases) with Swiss Ephemeris\n- Exact phase date prediction (New Moon, First Quarter, Full Moon, Last Quarter)\n- Transit Moon → Natal Moon aspects (personal lunar cycle)\n- Personal solar-lunar phase (Moon → Natal Sun)\n- Transit Moon through natal houses (Placidus)\n- Lunar day (tithi) with 30-day Vedic meanings\n- Moon speed analysis (fast/slow emotional processing)\n- Illumination percentage and Earth distance\n- Perigee/Apogee tracking\n- Transit Moon aspects to all natal planets\n- Bilingual text output (RU/EN)\n- JSON export for AI integration\n- 2-wheel side-by-side chart layout (5760×2880 px)\n- Horizontal 3-group legend below wheels (planets, aspects, elements — uniform height)\n- Text analysis panel with target date and person name\n- Output filename includes person name and date: `lunar_{name}_{date}_{lang}.png`\n- Bundled fonts and swisseph as .dat files (ClawHub-compatible, auto-copied at runtime)\n- Vertical wheel centers at image middle (cy=1440), legend fits below\n\nFile v1.3.0:README.md\n\n# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nCalculates Moon phases, transit Moon aspects to natal Moon, transit Moon through natal houses, personal solar-lunar phase, lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text analysis panel.\n\n## 🔬 Engine\n\n- **Swiss Ephemeris** (pyswisseph 2.10.3.2) — JPL DE431 ephemerides, ~0.003° precision\n- **Pillow 12.x** — chart rendering\n- House cusps: **Placidus system**\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | 3.14.x |\n| **Runtime** | MSVC++ Redistributable 2015–2022 (x64) |\n| **Pillow** | `pip install pillow` |\n\n## Usage\n\n```bash\n# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json\n```\n\n## CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Analysis date (default: today) |\n| `--lang` | `ru` or `en` |\n| `--name` | Person's name |\n| `--json` | JSON output |\n| `--output` | Write JSON to file (UTF-8) |\n| `--conclusion` | Path to AI conclusion JSON |\n\n## Chart Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO Moon    │ ✶ Sext       │ ■ Земля       │\n│ ♊ ME Mercury │ □ Sqr        │ ■ Воздух      │\n│ ...           │ △ Trine       │ ■ Вода        │\n│               │ □ Qnc         │               │\n│               │ ☍ Opp         │               │\n└───────────────┴───────────────┴───────────────┘\n```\n\n## What It Calculates\n\n1. **Current Moon Phase** — 8 phases with illumination %, distance, exact dates\n2. **Transit Moon → Natal Moon** — Personal lunar cycle (~28 days)\n3. **Personal Solar-Lunar Phase** — Personal lunar month (~29.5 days)\n4. **Transit Moon Through Natal Houses** — Which life area is emotionally active\n5. **Lunar Day (Tithi)** — 30 Vedic lunar days with specific energy\n6. **Moon Speed** — Fast/slow emotional processing\n7. **Transit Moon Aspects to All Natal Planets** — Complete psychological picture\n\n## AI Conclusion Format\n\nWhen using `--conclusion`, provide a JSON file with top-level metric keys:\n\n```json\n{\n  \"overall\": \"General summary for section 9...\",\n  \"moon_phase\": { \"interpretation\": \"...\" },\n  \"lunar_day\": { \"interpretation\": \"...\" },\n  \"personal_phase\": { \"interpretation\": [\"Name\", \"Details...\"] },\n  \"transit_moon_aspects\": { \"interpretation\": \"...\" }\n}\n```\n\n## Links\n\n- **ClawHub**: https://clawhub.ai/dynamicsalex/astro-lunar-insights\n- **Related**: [astro-natal-chart](https://github.com/dynamicsAlex/astro-natal-chart)\n\n## License\n\nThis is an entertainment/educational tool. Do not make medical or financial decisions based on astrological readings.\n\nFile v1.3.0:_meta.json\n\n{\n  \"ownerId\": \"kn775k2zzav7y8rpwwm218x0b587f0hj\",\n  \"slug\": \"astro-lunar-insights\",\n  \"version\": \"1.3.0\",\n  \"publishedAt\": 1781081980369\n}\n\nFile v1.3.0:skill-card.md\n\n## Description: <br>\nCalculates lunar phases, Moon transits, natal-house activations, lunar days, and personal solar-lunar phases, then produces bilingual text, JSON data, and chart outputs for astrology-oriented lunar insight. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[dynamicsalex](https://clawhub.ai/user/dynamicsalex) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to generate astrology-oriented lunar analyses for a birth date, time, city, and target date. Agents can use its JSON metrics to prepare enhanced interpretations and render a chart. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill runs a bundled Windows native Swiss Ephemeris module. <br>\nMitigation: Review the bundled binary provenance before deployment in environments with strict native-code policies. <br>\nRisk: The renderer can create runtime copies of bundled assets and write chart files under the OpenClaw workspace. <br>\nMitigation: Run the skill in a workspace where generated files are expected and review outputs before sharing. <br>\nRisk: Astrological interpretations may be mistaken for decision-grade advice. <br>\nMitigation: Present outputs as entertainment or educational guidance and avoid using them for medical, financial, or other high-stakes decisions. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/dynamicsalex/astro-lunar-insights) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, JSON, Files, Shell commands, Guidance] <br>\n**Output Format:** [Plain text reports, JSON lunar metrics, PNG chart files, and Markdown-facing guidance with command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports Russian and English output; chart rendering writes files in the OpenClaw workspace and depends on Windows x64, Python 3.14.x, Pillow, and a bundled Swiss Ephemeris native module.] <br>\n\n## Skill Version(s): <br>\n1.3.0 (source: server release evidence and SKILL.md frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.2.0: 10 files, 2893335 bytes\n\nFiles: _meta.json (139b), README.md (4907b), scripts/draw_lunar.py (32031b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (26093b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2296b), SKILL.md (23226b)\n\nFile v1.2.0:SKILL.md\n\n---\nname: astro-lunar-insights\nversion: 1.2.0\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text panel. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n    emoji: \"🌙\"\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\n---\n\n# Astrology — Lunar Phase & Influence Analysis\n\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\n\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\n\n### 🔬 Precision\n\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\n\n---\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | **3.14.x** |\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\n| **Pillow** | **12.x** — `pip install pillow` |\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\n\n---\n\n## Architecture\n\n```\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\n         ↕\n   lunar_analysis.py  →  text analysis output\n```\n\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\n\n---\n\n## What This Skill Calculates\n\n### 1. Current Moon Phase\nThe Moon's position relative to the Sun (elongation angle):\n- **0°** = New Moon (🌑) — conjunction\n- **90°** = First Quarter (🌓) — waxing\n- **180°** = Full Moon (🌕) — opposition\n- **270°** = Last Quarter (🌗) — waning\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\n\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\n\n### 2. Transit Moon → Natal Moon (Personal Lunar Cycle)\nThe most important personal lunar metric. The transit Moon forms aspects to the natal Moon over a ~28-day cycle:\n\n| Aspect | Timing | Meaning |\n|---|---|---|\n| **Conjunction** | Every ~28 days | Personal New Moon — emotional reset, new cycle begins |\n| **Square** | ~7 & 21 days | Crisis point — need for action, tension |\n| **Opposition** | ~14 days | Personal Full Moon — emotional climax, awareness |\n| **Trine** | ~7 & 21 days | Harmony — intuition flows, good for planning |\n| **Sextile** | ~4 & 24 days | Opportunity — gentle support |\n| **Quincunx** | ~11 & 17 days | Adjustment — something needs realignment |\n| **Semisquare** | ~3.5 & 10.5 days | Minor irritation |\n| **Sesquiquadrate** | ~10.5 & 17.5 days | Restlessness — break patterns |\n| **Semisextile** | ~2 & 16 days | Subtle influence |\n\n### 3. Personal Solar-Lunar Phase (Transit Moon → Natal Sun)\nThe Moon's position relative to the natal Sun defines a **personal lunar month** (~29.5 days):\n\n| Phase | Elongation | Meaning |\n|---|---|---|\n| **Personal New Moon** | 0° | Beginning of personal cycle. Inward energy. Start new projects. |\n| **Personal Crescent** | 45° | Emerging. Energy builds. First steps. |\n| **Personal First Quarter** | 90° | Action point. Challenges arise. Push through. |\n| **Personal Gibbous** | 135° | Refinement. Fine-tune approach. |\n| **Personal Full Moon** | 180° | CLIMAX. Maximum awareness. Emotional revelation. |\n| **Personal Disseminating** | 225° | Sharing. Teach what you've learned. |\n| **Personal Last Quarter** | 270° | Crisis of consciousness. Let go. |\n| **Personal Balsamic** | 315° | Rest. Reflection. Prepare for next cycle. |\n\n### 4. Transit Moon Through Natal Houses\nShows which life area is emotionally activated:\n\n| House | Life Area |\n|---|---|\n| I | Personality, appearance, self |\n| II | Money, values, resources |\n| III | Communication, siblings, learning |\n| IV | Home, family, roots |\n| V | Creativity, children, romance |\n| VI | Health, work, routine |\n| VII | Partnership, marriage |\n| VIII | Transformation, shared resources |\n| IX | Philosophy, travel, higher education |\n| X | Career, reputation, public life |\n| XI | Friends, groups, hopes |\n| XII | Subconscious, solitude, karma |\n\n### 5. Lunar Day (Tithi) — Vedic System\n30 lunar days from New Moon to New Moon, each with specific energy:\n- **Day 1**: New beginning, planning\n- **Day 14**: Peak energy — best for starting anything\n- **Day 20**: Eagle day — see the big picture\n- **Day 29**: Difficult day, caution\n- **Day 30**: Blessing, gratitude, cycle completion\n\n### 6. Moon Speed Analysis\nMoon's daily motion affects emotional processing:\n- **>14.5°/day**: Very fast — quick events, less depth\n- **13.5–14.5°**: Fast — rapid emotional shifts\n- **11.5–13.5°**: Normal — balanced processing\n- **10–11.5°**: Slow — lingering feelings, deeper impact\n- **<10°/day**: Very slow — prolonged emotional intensity\n\nAlso tracks approach to perigee (closer = stronger) or apogee (farther = weaker).\n\n### 7. Transit Moon Aspects to All Natal Planets\nComplete picture of how the transit Moon interacts with every natal planet — shows which psychological functions are emotionally activated.\n\n---\n\n## Usage\n\n### Text Analysis (CLI)\n\n```bash\n# Analysis for today\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Analysis for any specific date\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\n\n# English output\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\n\n# JSON output (for renderers / AI)\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json\n```\n\n### Graphical Chart\n\n```bash\n# Chart for today (Russian)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Chart for any specific date\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\n\n# English\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\"\n```\n\n### CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Target date in DD.MM.YYYY or YYYY-MM-DD format (default: today). Supports any past, present, or future date. **When omitted, uses current system date.** Supported in both `lunar_analysis.py` and `draw_lunar.py`. |\n| `--lang` | Language: `ru` or `en` (default: `ru`) |\n| `--name` | Person's name for display |\n| `--json` | Output JSON instead of text |\n| `--output` | Write JSON directly to file (UTF-8, bypasses console encoding) |\n| `--conclusion` | Path to JSON file with AI-generated conclusion |\n\n---\n\n## JSON Output Format\n\n```json\n{\n  \"name\": \"Алексей\",\n  \"birth_date\": \"24.04.1983\",\n  \"birth_time\": \"07:00\",\n  \"birth_city\": \"Ижевск, Россия\",\n  \"target_date\": \"05.06.2026\",\n  \"moon_phase\": {\n    \"name\": \"Waning Gibbous\",\n    \"elongation\": 236.33,\n    \"illumination\": 77.7,\n    \"distance_au\": 0.002669,\n    \"distance_km\": 399206\n  },\n  \"nearest_phases\": {\n    \"New Moon\": {\"date\": \"15.06.2026\", \"days_diff\": 9.6},\n    \"Full Moon\": {\"date\": \"31.05.2026\", \"days_diff\": -5.1}\n  },\n  \"lunar_day\": {\"number\": 20, \"meaning_ru\": \"День орла...\"},\n  \"transit_moon\": {\"lon\": 311.18, \"sign\": \"Capricorn\", \"speed\": 12.14},\n  \"transit_moon_to_natal_moon\": {\"aspect\": \"Sesquiquadrate\", \"orb\": 0.91},\n  \"personal_phase\": {\"key\": \"last_quarter\", \"name_ru\": \"Персональная последняя четверть\"},\n  \"transit_moon_house\": {\"house\": 7, \"title_ru\": \"Партнёрство, брак...\"},\n  \"moon_speed\": {\"speed\": 12.14, \"description_ru\": \"Нормальная...\"},\n  \"transit_moon_aspects\": [\n    {\"transit\": \"Moon\", \"natal\": \"Sun\", \"aspect\": \"Square\", \"major\": true, \"orb\": 7.6}\n  ],\n  \"engine\": \"Swiss Ephemeris v20230604\"\n}\n```\n\n---\n\n## Image Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|                           |                           |                   |\n|     ФАЗА ЛУНЫ             |     НАТАЛЬНОЕ КОЛЕСО      |   TEXT ANALYSIS   |\n|     MOON PHASE WHEEL      |     NATAL CHART WHEEL     |   PANEL           |\n|     (3400/2 = 1700 wide)  |     (1700 wide)           |   (2360×2880)     |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets (circles |  - Lunar day      |\n|  - Current position       |    with letter codes)     |  - Moon aspects   |\n|    indicator (yellow)     |  - Transit Moon (outer    |  - Personal phase |\n|                           |    orbit, highlighted)    |  - House          |\n|                           |  - ASC/MC lines           |  - Moon speed     |\n|                           |  - Aspect lines (colored) |  - All aspects    |\n|                           |                           |  - Conclusion     |\n|                           |                           |                   |\n+---------------------------+---------------------------+-------------------+\n\nLegend (below wheels, 3 uniform-height groups side by side):\n┌─────────────────┬─────────────────┬─────────────────┐\n│  ПЛАНЕТЫ        │  АСПЕКТЫ        │  СТИХИИ         │\n│  (PLANETS)      │  (ASPECTS)      │  (ELEMENTS)     │\n│                 │                 │                 │\n│  ♈ SU Sun      │  □ Conj          │  ■ Огонь        │\n│  ♉ MO Moon     │  ✶ Sext          │  ■ Земля        │\n│  ♊ ME Mercury  │  □ Sqr           │  ■ Воздух       │\n│  ...            │  △ Trine         │  ■ Вода         │\n│                 │  □ Qnc           │                 │\n│                 │  ☍ Opp           │                 │\n└─────────────────┴─────────────────┴─────────────────┘\n```\n\n- Wheels centered vertically in the image (cy=1440)\n- Wheels radius: 640px each\n- Legend: 3 groups of uniform height below wheels\n- Left panel: 3400px (2 wheels × 1700px)\n- Right panel: 2360px text interpretation\n\n---\n\n## Font Handling\n\nTwo bundled fonts in `scripts/`:\n\n| Font | Purpose | Extension |\n|---|---|---|\n| `seguisym.ttf.dat` | Zodiac symbols ♈♉♊... + planet symbols ☉☽☿... | `.dat` (ClawHub-compatible) |\n| `segoeuisl.ttf.dat` | Cyrillic, latin, digits | `.dat` (ClawHub-compatible) |\n\nBoth are auto-copied to `.ttf` at runtime for Pillow compatibility.\n\n---\n\n## Scripts Reference\n\n| Script | Purpose | Dependencies |\n|---|---|---|\n| `scripts/lunar_analysis.py` | **Sole calculation engine.** All lunar metrics, text + JSON output. | swisseph, math, json |\n| `scripts/draw_lunar.py` | **Renderer.** Calls lunar_analysis.py --json, draws 5760×2880 chart. | subprocess, json, math, Pillow |\n| `scripts/swisseph.cp314-win_amd64.pyd.dat` | Swiss Ephemeris binary (2 MB) — JPL DE431 ephemerides | MSVC++ Redist |\n| `scripts/seguisym.ttf.dat` | Zodiac + planet symbol font | — |\n| `scripts/segoeuisl.ttf.dat` | Cyrillic/latin font | — |\n\n---\n\n## AI Conclusion Workflow (for OpenClaw agents)\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and writes enhanced conclusion to a JSON file\n        (see AI Conclusion JSON Format below)\nStep 3: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\nWhen `--conclusion` is provided, the AI-generated text is used verbatim in the chart.\nEach metric gets its own interpretation section (1–8), and the overall summary\nis shown in section 9 (Conclusion). Without `--conclusion`, the script generates\nbuilt-in autonomous interpretations.\n\n### AI Conclusion JSON Format\n\nThe conclusion file must have metric keys at the **top level** (not nested under `metrics`).\nEach metric contains an `interpretation` field (string, dict with `description`, or tuple).\nThe `overall` field contains the general summary for section 9.\n\n```json\n{\n  \"overall\": \"General summary text for section 9...\",\n  \"moon_phase\": {\n    \"interpretation\": {\n      \"name\": \"Waning Gibbous\",\n      \"description\": \"Full interpretation text for section 1...\"\n    }\n  },\n  \"nearest_phases\": {\n    \"interpretation\": \"Interpretation text for section 2...\"\n  },\n  \"lunar_day\": {\n    \"interpretation\": \"Interpretation text for section 3...\"\n  },\n  \"transit_moon_to_natal_moon\": {\n    \"interpretation\": \"Interpretation text for section 4...\"\n  },\n  \"personal_phase\": {\n    \"interpretation\": [\"Phase Name\", \"Interpretation text for section 5...\"]\n  },\n  \"transit_moon_house\": {\n    \"interpretation\": \"Interpretation text for section 6...\"\n  },\n  \"moon_speed\": {\n    \"interpretation\": \"Interpretation text for section 7...\"\n  },\n  \"transit_moon_aspects\": {\n    \"interpretation\": \"Interpretation text for section 8...\"\n  }\n}\n```\n\n**Supported `interpretation` formats:**\n- `dict` with `description` key — used by autonomous mode\n- `tuple/list` of `[title, text]` — used by autonomous mode for personal_phase\n- `string` — plain text interpretation (AI mode)\n\nThe renderer (`draw_text_panel`) automatically detects the format and extracts\nthe text accordingly. AI mode shows full text without truncation; autonomous mode\nlimits text to keep the chart compact.\n\n## AI Workflow (for OpenClaw agents)\n\n**⚠️ ПРАВИЛО: ВСЕГДА предоставляй расширенную интерпретацию ИИ, когда это возможно.**\n\nАвтономная интерпретация (встроенная в скрипт) — это fallback для CLI-использования. Когда скилл вызывается через OpenClaw агент, агент **обязан** проанализировать JSON и сгенерировать расширенную интерпретацию по всем метрикам. Это ключевое отличие качественного прогноза от шаблонного.\n\n```\nStep 1: python scripts/lunar_analysis.py <date> <time> <city> --json --target-date <date>\nStep 2: AI analyzes JSON and provides extended interpretation for ALL metrics\nStep 3: AI writes conclusion JSON file with overall summary\nStep 4: python scripts/draw_lunar.py <date> <time> <city> --lang ru --name \"Name\" --conclusion <file.json>\n```\n\n**Без шага 3-4 карта будет содержать только автономную (краткую) интерпретацию.**\n\nThe AI should focus on:\n- **Personal New/Full Moon** — most significant events\n- **Transit Moon house** — which life area is emotionally active\n- **Transit Moon → Natal Moon aspect** — emotional cycle phase\n- **Moon speed** — depth vs. speed of emotional processing\n- **Lunar day meaning** — Vedic tithi guidance\n- **Transit Moon aspects to all natal planets** — detailed psychological analysis\n- **Overall synthesis** — practical recommendations for the day\n\n---\n\n## Encoding & Console Handling\n\n**Problem:** Windows console (cmd/PowerShell) redirects stdout in cp1251/cp866, breaking UTF-8 output even with `PYTHONIOENCODING=utf-8`.\n\n**Solution:** `lunar_analysis.py` supports `--output file.json` which writes JSON directly to a file via `open(..., encoding='utf-8')`, completely bypassing the console. `draw_lunar.py` uses this internally — it passes `--output /tmp/lunar_analysis_tmp.json` to the subprocess and reads the file directly.\n\n**For CLI users:** Use `--output` when redirecting to files:\n```bash\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --json --output result.json\n```\n\nFor text output in terminal, set `PYTHONIOENCODING=utf-8` and `chcp 65001` (cmd) or use PowerShell with `$env:PYTHONIOENCODING='utf-8'`.\n\n---\n\n## Disclaimer\n\nThis is an entertainment/educational tool, not a scientific method. Do not make medical or financial decisions based on astrological readings.\n\n---\n\n## Changelog\n\n### v1.0.1 (2026-06-05)\n- **Encoding fix:** Added `--output file.json` flag to `lunar_analysis.py` — writes JSON directly to file in UTF-8, bypassing Windows console cp1251 encoding issues\n- **draw_lunar.py** now uses `--output` internally via temp file for subprocess communication\n- **Layout redesign:** 2 wheels side-by-side (horizontal), vertically centered (cy=1440)\n- **Legend:** 3 uniform-height groups (planets, aspects, elements) arranged horizontally below wheels\n- **Planet circles** with 2-letter codes (SU, MO, ME...) matching astro-natal-chart style\n- **Colored aspect lines** on natal wheel (red=square, blue=trine, green=sextile, etc.)\n- **Text panel** widened to 2360px with smaller fonts for better text fit\n- **Output filename** now includes person name: `lunar_{name}_{date}_{lang}.png`\n- **Target date** shown in text panel instead of \"today\"\n- **Font/binary setup:** All `.ttf` and `.pyd` files shipped as `.dat` (ClawHub-compatible), auto-copied at runtime\n- Removed `__pycache__` and generated `.ttf`/`.pyd` from skill directory\n- Updated SKILL.md with encoding guide, new CLI args, and updated layout diagram\n\n### v1.0.0 (2026-06-05)\n\n### v1.2.0 (2026-06-07)\n- **Cosmetic: aspect symbols in text panel** — Section 8 (Aspects) now renders graphical aspect symbols (△ □ ✶ ☌ ☍ ⚹ ⚺ ∠) from `seguisym.ttf` instead of text names (Trine, Square, etc.), matching the legend style\n- **Symbol color coding**: aspect glyphs are rendered in their astrological colors (green △, red □, blue ✶, etc.) via `_get_word_color` + `ASP_SYMBOL_COLORS` map\n- **`draw_lunar.py` now supports `--target-date` flag** — previously only `lunar_analysis.py` supported target dates via positional arg; now both scripts accept `--target-date`\n- **Subprocess propagation**: `draw_lunar.py` passes `--target-date` through to `lunar_analysis.py` subprocess call\n- **`lunar_analysis.py` `--target-date` as explicit flag** — previously only supported as 4th positional argument; now also parsed as `--target-date` flag for consistency\n- **Dual date format support**: both `DD.MM.YYYY` and `YYYY-MM-DD` formats accepted for `--target-date`\n- **AI Conclusion rule added**: SKILL.md now explicitly states that agents MUST always provide extended AI interpretation when possible; autonomous interpretation is a CLI fallback only\n- **Updated AI workflow**: 4-step process (analyze → interpret → write conclusion → render chart) documented with explicit warning about missing conclusion = short output only\n\n### v1.1.0 (2026-06-06)\n- **Cosmetic overhaul of text panel:** Font sizes now match astro-natal-chart (FS=19, FM=22, FL=26, LH=22)\n- **Text wrapping improved:** Line width reduced to half (`max_w = w // 2 - 20`) for 2x faster line breaks\n- **Section headers raised:** Title labels above both wheels moved up (80px from wheel edge) for better visual balance\n- **Colored planet names in text:** Planet names in interpretation text are now rendered in their astrological colors (e.g., Марс in red, Венера in green, Уран in cyan)\n- **Colored aspect type names:** Aspect type names (Square, Trine, Sextile, Quincunx, etc.) in text are colored to match the legend\n- **Section 9 (Conclusion) always visible:** Now displays for both AI mode (`overall` text) and autonomous mode (`summary.cycle_energy` + `summary.intensity`)\n- **Fixed aspect list rendering:** Transit Moon aspects in section 8 now show readable text instead of raw dict representation\n- **Fixed `interp_text()` robustness:** Now handles all conclusion data formats — string, list, dict with `description`, dict with `interpretation` key, tuple\n- **Fixed nested function scope:** Replaced `nonlocal y` pattern with mutable list `_y = [y]` to avoid UnboundLocalError in nested drawing functions\n- **Backup files preserved:** `draw_lunar.py.bak` and `draw_lunar.py.bak2` kept for rollback\n\n### v1.0.2 (2026-06-06)\n- **AI conclusion rendering restructured:** AI interpretations are now distributed across\n  metric sections (1–8) instead of being piled into section 9 (Conclusion)\n- **New AI conclusion JSON format:** Metric keys at top level (`moon_phase`, `lunar_day`, etc.),\n  each with `interpretation` field; `overall` field for section 9 summary only\n- **Helper functions `interp_text()` and `show_interp()`** in `draw_text_panel`:\n  unified extraction of interpretation text from dict, tuple, or string formats\n- **AI mode:** full text displayed without truncation in sections 1–8; section 9 shows only `overall`\n- **Autonomous mode:** preserved with text limits for compact layout\n- **Section 8 (Aspects):** added AI interpretation of transit Moon aspects after the aspect list\n- **Conclusion JSON format documented** in SKILL.md with examples for all supported formats\n- Updated SKILL.md with AI Conclusion JSON Format specification\n\n### v1.0.1 (2026-06-05)\n- Initial release\n- Moon phase calculation (8 phases) with Swiss Ephemeris\n- Exact phase date prediction (New Moon, First Quarter, Full Moon, Last Quarter)\n- Transit Moon → Natal Moon aspects (personal lunar cycle)\n- Personal solar-lunar phase (Moon → Natal Sun)\n- Transit Moon through natal houses (Placidus)\n- Lunar day (tithi) with 30-day Vedic meanings\n- Moon speed analysis (fast/slow emotional processing)\n- Illumination percentage and Earth distance\n- Perigee/Apogee tracking\n- Transit Moon aspects to all natal planets\n- Bilingual text output (RU/EN)\n- JSON export for AI integration\n- 2-wheel side-by-side chart layout (5760×2880 px)\n- Horizontal 3-group legend below wheels (planets, aspects, elements — uniform height)\n- Text analysis panel with target date and person name\n- Output filename includes person name and date: `lunar_{name}_{date}_{lang}.png`\n- Bundled fonts and swisseph as .dat files (ClawHub-compatible, auto-copied at runtime)\n- Vertical wheel centers at image middle (cy=1440), legend fits below\n\nFile v1.2.0:README.md\n\n# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nArchive v1.1.0: 9 files, 2889624 bytes\n\nFiles: _meta.json (139b), scripts/draw_lunar.py (30725b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (25512b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2248b), SKILL.md (20619b)\n\nArchive v1.0.2: 9 files, 2888027 bytes\n\nFiles: _meta.json (139b), scripts/draw_lunar.py (26138b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (25512b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2491b), SKILL.md (19257b)\n\nArchive v1.0.1: 9 files, 2887252 bytes\n\nFiles: scripts/draw_lunar.py (26160b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (25512b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2681b), SKILL.md (16842b), _meta.json (139b)\n\nArchive v1.0.0: 9 files, 2886155 bytes\n\nFiles: scripts/draw_lunar.py (25906b), scripts/interpretations.py (42445b), scripts/lunar_analysis.py (25037b), scripts/segoeuisl.ttf.dat (854140b), scripts/seguisym.ttf.dat (2454728b), scripts/swisseph.cp314-win_amd64.pyd.dat (2039296b), skill-card.md (2383b), SKILL.md (14827b), _meta.json (139b)","readmeExcerpt":"Skill: Astro Lunar Insights Owner: dynamicsalex Summary: Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Tags: latest:1.3.3 Version history: v1.3.3 | 2026-06-24T18:57:39.579Z | user QR code now renders by default via bundled frame_small.png.dat; --frame no longer required v1.3.2 | 2026-06-10T11:45:26.595Z | user Embed","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json"},{"language":"text","snippet":"+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO Moon    │ ✶ Sext       │ ■ Земля       │\n│ ♊ ME Mercury │ □ Sqr        │ ■ Воздух      │\n│ ...           │ △ Trine       │ ■ Вода        │\n│               │ □ Qnc         │               │\n│               │ ☍ Opp         │               │\n└───────────────┴───────────────┴───────────────┘"},{"language":"json","snippet":"{\n  \"overall\": \"General summary for section 9...\",\n  \"moon_phase\": { \"interpretation\": \"...\" },\n  \"lunar_day\": { \"interpretation\": \"...\" },\n  \"personal_phase\": { \"interpretation\": [\"Name\", \"Details...\"] },\n  \"transit_moon_aspects\": { \"interpretation\": \"...\" }\n}"},{"language":"text","snippet":"lunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\n         ↕\n   lunar_analysis.py  →  text analysis output"},{"language":"bash","snippet":"# Analysis for today\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Analysis for any specific date\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru\n\n# English output\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang en\n\n# JSON output (for renderers / AI)\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --json"},{"language":"bash","snippet":"# Chart for today (Russian)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Chart for any specific date\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang ru --name \"Алексей\"\n\n# English\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --target-date 05.06.2026 --lang en --name \"Alexey\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: astro-lunar-insights\r\nversion: 1.3.3\r\ndescription: Lunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph). Calculates Moon phases (exact dates), transit Moon aspects to natal Moon (personal lunar cycle), transit Moon through natal houses, personal solar-lunar phase (Moon -> Natal Sun), lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend, text panel, and QR code for donations. Windows 10/11 compatible. Accuracy ensured by Swiss Ephemeris (JPL DE431 ephemerides, ~0.003° precision). Requires: Python 3.14.x, Pillow 12.x, MSVC++ Redist 2015–2022. Related: astro-daily-transits skill for daily transit forecast, astro-natal-chart skill for natal chart calculation.\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3\r\n    emoji: \"🌙\"\r\n    homepage: https://github.com/dynamicsAlex/astro-lunar-insights\r\n---\r\n\r\n# Astrology — Lunar Phase & Influence Analysis\r\n\r\n## Engine: Swiss Ephemeris (pyswisseph 2.10.3.2) + Pillow (PIL)\r\n\r\nThis skill calculates **lunar phases** and analyzes the **Moon's influence** on a person through multiple astrological lenses. It renders a chart with 2 wheels side-by-side (Moon phase + natal chart with transit Moon), 3-group horizontal legend below wheels, and a text analysis panel on the right.\r\n\r\nThe chart **always includes a QR code** (for donations) at the bottom of the text panel. By default the bundled \frame_small.png.dat is used; users can override with --frame.\r\n\r\n### 🔬 Precision\r\n\r\nAll planetary positions are computed using the **Swiss Ephemeris** library (pyswisseph 2.10.3.2), based on NASA's **JPL DE431 ephemerides**. Planetary position accuracy: ~0.003°. House cusps: **Placidus system** via `swe.houses_ex()`.\r\n\r\n---\r\n\r\n## ⚠️ Requirements\r\n\r\n| Requirement | Details |\r\n|---|---|\r\n| **OS** | Windows (x64) |\r\n| **Python** | **3.14.x** |\r\n| **Runtime** | **Microsoft Visual C++ Redistributable 2015–2022 (x64)** |\r\n| **Pillow** | **12.x** — `pip install pillow` |\r\n| **Swiss Ephemeris** | Bundled as `swisseph.cp314-win_amd64.pyd.dat` |\r\n\r\n---\r\n\r\n## Architecture\r\n\r\n```\r\nlunar_analysis.py --json  →  JSON data (all lunar metrics)  →  draw_lunar.py  →  PNG image\r\n         ↕\r\n   lunar_analysis.py  →  text analysis output\r\n```\r\n\r\n`lunar_analysis.py` is the **sole calculation engine**. `draw_lunar.py` renders the chart by calling it via subprocess.\r\n\r\n---\r\n\r\n## What This Skill Calculates\r\n\r\n### 1. Current Moon Phase\r\nThe Moon's position relative to the Sun (elongation angle):\r\n- **0°** = New Moon (🌑) — conjunction\r\n- **90°** = First Quarter (🌓) — waxing\r\n- **180°** = Full Moon (🌕) — opposition\r\n- **270°** = Last Quarter (🌗) — waning\r\n- Plus 4 intermediate phases (Crescent, Gibbous, etc.)\r\n\r\nAlso calculates: illumination %, distance from Earth (km), exact dates of nearest phases.\r\n\r\n### 2. Transit Mo"},{"path":"README.md","content":"# 🌙 astro-lunar-insights\n\nLunar phase analysis and Moon influence on a person using **Swiss Ephemeris** (pyswisseph) + Pillow.\n\nCalculates Moon phases, transit Moon aspects to natal Moon, transit Moon through natal houses, personal solar-lunar phase, lunar day number (tithi), Moon speed, illumination, perigee/apogee, and transit Moon aspects to all natal planets. Bilingual (RU/EN). Renders a 2-wheel chart (Moon phase wheel + natal wheel with transit Moon) with 3-group legend and text analysis panel.\n\n## 🔬 Engine\n\n- **Swiss Ephemeris** (pyswisseph 2.10.3.2) — JPL DE431 ephemerides, ~0.003° precision\n- **Pillow 12.x** — chart rendering\n- House cusps: **Placidus system**\n\n## ⚠️ Requirements\n\n| Requirement | Details |\n|---|---|\n| **OS** | Windows (x64) |\n| **Python** | 3.14.x |\n| **Runtime** | MSVC++ Redistributable 2015–2022 (x64) |\n| **Pillow** | `pip install pillow` |\n\n## Usage\n\n```bash\n# Text analysis\npython scripts/lunar_analysis.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# Graphical chart\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\"\n\n# AI-enhanced chart (with AI conclusion)\npython scripts/draw_lunar.py 24.04.1983 07:00 Ижевск --lang ru --name \"Алексей\" --conclusion conclusion.json\n```\n\n## CLI Arguments\n\n| Argument | Description |\n|---|---|\n| `date` | Birth date DD.MM.YYYY |\n| `time` | Birth time HH:MM |\n| `city` | Birth city |\n| `--target-date` | Analysis date (default: today) |\n| `--lang` | `ru` or `en` |\n| `--name` | Person's name |\n| `--json` | JSON output |\n| `--output` | Write JSON to file (UTF-8) |\n| `--conclusion` | Path to AI conclusion JSON |\n\n## Chart Layout (5760×2880 px)\n\n```\n+---------------------------+---------------------------+-------------------+\n|  ФАЗА ЛУНЫ                |  НАТАЛЬНОЕ КОЛЕСО         |  TEXT ANALYSIS    |\n|  Moon Phase Wheel         |  Natal Chart Wheel        |  PANEL            |\n|  (1700px)                 |  (1700px)                 |  (2360px)         |\n|                           |                           |                   |\n|  - Phase circle           |  - Sign sectors (elements)|  - Moon phase     |\n|  - Illumination % center  |  - House cusps (Placidus) |  - Nearest phases |\n|  - Phase degree markers   |  - Natal planets          |  - Lunar day      |\n|  - Current position       |  - Transit Moon (outer)   |  - Moon aspects   |\n|    indicator              |  - ASC/MC lines           |  - Personal phase |\n|                           |  - Colored aspect lines   |  - House          |\n|                           |                           |  - Moon speed     |\n|                           |                           |  - Conclusion     |\n+---------------------------+---------------------------+-------------------+\n\nLegend (3 uniform-height groups):\n┌───────────────┬───────────────┬───────────────┐\n│ ПЛАНЕТЫ       │ АСПЕКТЫ       │ СТИХИИ        │\n│ PLANETS       │ ASPECTS       │ ELEMENTS      │\n│ ♈ SU Sun     │ □ Conj        │ ■ Огонь       │\n│ ♉ MO M"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn775k2zzav7y8rpwwm218x0b587f0hj\",\n  \"slug\": \"astro-lunar-insights\",\n  \"version\": \"1.3.3\",\n  \"publishedAt\": 1782327459579\n}"},{"path":"skill-card.md","content":"## Description:\n\nLunar phase analysis and Moon influence on a person using Swiss Ephemeris (pyswisseph), producing bilingual astrological analysis, structured lunar metrics, and rendered charts.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dynamicsalex](https://clawhub.ai/user/dynamicsalex)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and agents use this skill to calculate personal lunar astrology metrics from birth details and a target date, then generate text, JSON, or chart outputs for entertainment and educational interpretation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill copies and runs bundled executable dependency files, including a Windows Swiss Ephemeris binary.\n\nMitigation: Run it only in an isolated Python environment and use the bundled native binary only when the publisher and package source are trusted.\n\nRisk: The chart renderer may install Pillow automatically at runtime.\n\nMitigation: Preinstall a pinned Pillow version in the environment before running the skill.\n\nRisk: Birth details can be written to temporary JSON files and generated chart files.\n\nMitigation: Avoid using sensitive personal data unless needed, restrict access to the workspace and temp directory, and remove generated files after use.\n\nRisk: Generated charts include donation or promotional QR content by default.\n\nMitigation: Inspect generated images before sharing and override or remove the frame asset when promotional content is not appropriate.\n\nRisk: Astrological output may be mistaken for decision-grade advice.\n\nMitigation: Present results as entertainment or educational interpretation and do not rely on them for medical, financial, or other high-impact decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dynamicsalex/skills/astro-lunar-insights)\n\n## Skill Output:\n\n**Output Type(s):** [Text, JSON, Image files, Guidance]\n\n**Output Format:** [Plain text analysis, structured JSON lunar metrics, and PNG chart files with optional AI conclusion JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports Russian and English output; chart renderer produces a 5760x2880 PNG.]\n\n## Skill Version(s):\n\n1.3.3 (source: server release evidence and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Skill: Astro Lunar Insights Owner: dynamicsalex Summary: Calculates precise lunar phases, Moon transits, aspects to natal planets, lunar days, and personal solar-lunar phases with charts and text analysis. Tags: latest:1.3.3 Version history: v1.3.3 | 2026-06-24T18:57:39.579Z | user QR code now renders by default via bundled frame_small.png.dat; --frame no longer required v1.3.2 | 2026-06-10T11:45:26.595Z | user Embed","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1652,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T08:12:07.429Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T10:51:54.361Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}