Skill: skunnyo/clawhub-dev-calendar (version 0.1.0)

--- name: clawhub-dev-calendar description: Generate professional calendars, timelines, schedules, and project planners for ClawHub/OpenClaw skill development services. Use when: (1) creating dev project timelines/milestones, (2) quarterly/monthly dev schedules, (3) client delivery calendars, (4) ICS exports for Google/Outlook, (5) PDF/HTML calendar visuals. Auto-incorporates Saskatchewan statutory holidays, America/Regina TZ, standard dev rates ($150/hr dev, $500 skill init), ClawHub milestones (init/develop/test/publish). --- # ClawHub Dev Calendar ## Overview Produce tailored calendars for ClawHub skill dev workflows. Formats: ICS (calendar apps), PDF/HTML/PNG (via canvas/browser), markdown/text. Key integrations: - ClawHub dev milestones (references/dev_milestones.md) - SK statutory holidays (references/sask_holidays.json) - Multi-project support - TZ: America/Regina (manual offset in scripts) ## Quick Start **Text monthly calendar:** ``` exec command="cal -3 2026-04" ``` **Project ICS:** 1. Copy assets/project_template.json → project.json, edit 2. `exec "python3 scripts/generate_ics.py project.json dev.ics" pty=true` 3. `message media="dev.ics" caption="Dev calendar attached"` ## Workflow: Full Project Calendar 1. **Input**: Write project.json with name, start (ISO), milestones array [{name,hours}] 2. **Holidays**: Script flags holidays from sask_holidays.json 3. **Generate ICS**: scripts/generate_ics.py → .ics 4. **HTML Timeline**: Modify assets/calendar_template.html or use exec python html gen 5. **Visual**: `canvas present url="data:text/html;base64,`base64 html`"` or browser/pdf 6. **Share**: message file or write to workspace/memory/ Example project.json: ```json { "name": "clawhub-dev-calendar", "start": "2026-04-01T09:00:00-06:00", "milestones": [ {"name": "Init", "hours": 2}, {"name": "Research/Plan", "hours": 4}, {"name": "Develop", "hours": 6}, {"name": "SKILL.md", "hours": 4}, {"name": "Test", "hours": 3}, {"name": "Publish", "hours": 1} ] } ``` ## Resources ### scripts/ - `generate_ics.py`: Generates ICS with milestones as events. Usage: `python3 generate_ics.py project.json [output.ics]` Handles TZ offset, holiday checks (all-day events). ### references/ - `dev_milestones.md`: Standard phases, hours, cumulative time - `sask_holidays.json`: YYYY list of stat holiday dates (2026-2027) ### assets/ - `project_template.json`: Copy & customize input example Load references/ as needed for planning.

path: assets/project_template.json
content: {
  "name": "my-clawhub-skill",
  "start": "2026-04-01T09:00:00-06:00",
  "milestones": [
    {"name": "Init", "hours": 2},
    {"name": "Research/Plan", "hours": 4},
    {"name": "Develop", "hours": 6},
    {"name": "SKILL.md", "hours": 4},
    {"name": "Test", "hours": 3},
    {"name": "Publish", "hours": 1}
  ]
}

path: references/dev_milestones.md
content: # ClawHub Skill Development Milestones

Standard timeline for typical skill ($500 init fee + $150/hr):

| Phase          | Hours | Description                  | Cum. Days (8h/day) |
|----------------|-------|------------------------------|--------------------|
| Init           | 2     | skill-creator init_skill.py | 0.25              |
| Research/Plan  | 4     | Examples, resource planning | 0.75              |
| Develop        | 6     | scripts/refs/assets         | 1.5               |
| Write SKILL.md | 4     | Instructions, workflows     | 2.125             |
| Test           | 3     | Examples, validation        | 2.625             |
| Package/Publish| 1     | clawhub publish             | 2.75              |

**Total: ~20 hours.** Adjust for complexity. Use in project.json milestones[].


path: references/sask_holidays.json
content: {
  "2026": [
    "2026-01-01",
    "2026-02-16",
    "2026-04-03",
    "2026-05-18",
    "2026-07-01",
    "2026-08-03",
    "2026-09-07",
    "2026-10-12",
    "2026-11-11",
    "2026-12-25"
  ],
  "2027": [
    "2027-01-01",
    "2027-02-15",
    "2027-03-26",
    "2027-05-24",
    "2027-07-01",
    "2027-08-02",
    "2027-09-06",
    "2027-10-11",
    "2027-11-11",
    "2027-12-25"
  ]
}

path: scripts/generate_ics.py
content: #!/usr/bin/env python3
import sys
import json
from datetime import datetime, timedelta
import os

def load_holidays(holidays_path):
    holidays_file = os.path.join(os.path.dirname(__file__), '..', 'references', 'sask_holidays.json')
    try:
        with open(holidays_file) as f:
            data = json.load(f)
            year = datetime.now().year
            return set(data.get(str(year), []))
    except:
        return set()

def generate_ics(events, holidays, output_file):
    tz_offset = '-0600'  # America/Regina standard, no DST for simplicity
    ics_content = f"""BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ClawHub Dev Calendar v1.0//EN
CALSCALE:GREGORIAN
"""

    # Add holidays as all-day
    for h_date in holidays:
        dt = datetime.fromisoformat(h_date + 'T00:00:00{tz}'.format(tz=tz_offset))
        ics_content += f"""BEGIN:VEVENT
UID:holiday-{h_date}@clawhub.dev
DTSTAMP:{datetime.now().strftime('%Y%m%dT%H%M%S{tz_offset}')}
DTSTART;VALUE=DATE:{dt.strftime('%Y%m%d')}
SUMMARY:SK Statutory Holiday
DESCRIPTION:From sask_holidays.json
END:VEVENT
"""

    for event in events:
        start_str = event['start'].strftime('%Y%m%dT%H%M%S{tz_offset}')
        end_str = event['end'].strftime('%Y%m%dT%H%M%S{tz_offset}')
        uid = event['uid'].replace(' ', '_')
        ics_content += f"""BEGIN:VEVENT
UID:{uid}@clawhub.dev
DTSTAMP:{datetime.utcnow().strftime('%Y%m%dT%H%M%SZ')}
DTSTART:{start_str}
DTEND:{end_str}
SUMMARY:{event['summary']}
DESCRIPTION:{event.get('description', '')}
END:VEVENT
"""

    ics_content += "END:VCALENDAR\n"
    with open(output_file, 'w') as f:
        f.write(ics_content)
    print(f"Generated {len(events)} events + holidays → {output_file}")

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python3 generate_ics.py project.json [output.ics]")
        sys.exit(1)
    
    proj_path = sys.argv[1]
    output = sys.argv[2] if len(sys.argv) > 2 else 'dev_calendar.ics'
    
    with open(proj_path) as f:
        proj = json.load(f)
    
    holidays = load_holidays(proj_path)
    
    events = []
    start = datetime.fromisoformat(proj['start'])
    cum_hours = 0
    for m in proj['milestones']:
        duration = timedelta(hours=m['hours'])
        e_start = start + timedelta(hours=cum_hours)
        e_end = e_start + duration
        summary = f"{proj['name']}: {m['name']} ({m['hours']}h @ $150/hr)"
        desc = f"Cumulative: {cum_hours + m['hours']}h. Init fee $500 separate."
        events.append({
            'uid': f"{proj['name']}-{m['name']}",
            'start': e_start,
            'end': e_end,
            'summary': summary,
            'description': desc
        })
        cum_hours += m['hours']
    
    generate_ics(events, holidays, output)


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)