CommunityProductivity & Collaborationgithub.com

Schedule Onepager

A schedule onepager skill for Claude Code / AI coding agents that consolidates scattered itinerary information into a single, email-renderable HTML schedule.

What is Schedule Onepager?

The Schedule Onepager skill is designed for AI coding agents (like Claude Code) to help users manage their personal schedule, daily tasks, and historical records. It centralizes all data into a single SQLite database (`personal.db`) with three independent tables: `schedule` for future commitments, `todo` for today's action items, and `history` for daily activity logs. A unified CLI (`scripts/personal.py`) handles all data operations, and HTML exports are generated purely as views for browser/email rendering—never manually edited. Key design principles include: no data duplication, clean separation between the three tables, automatic recalculation of countdowns, and a strict rule that only confirmed, user-relevant events go into the schedule table. The skill also includes an optional email reminder feature (using SMTP) that must be explicitly enabled by the user. It supports platforms like Claude Code and WorkBuddy via automation triggers.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add Zaosusu/schedule-onepager

Installed? Explore more Productivity & Collaboration skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Schedule Onepager · Unified Data Layer

Archive scattered information into one schedule, with Today's TODO and Daily History as two independent views. All data lives in one SQLite database (personal.db) across three tables, managed by a single CLI (scripts/personal.py); HTML is merely an export view, never manually edited.

The tables answer only two questions: which days are occupied (schedule), what needs to be done today (todo), and what was done each day (history).

Architecture (One Sentence)

personal.db  ── Three Tables ──┐
                                ├─ schedule   Schedule (confirmed commitments/events with countdown)
                                ├─ todo       Today's TODO (action items for the day)
                                └─ history    Daily History (activity log)
        │
        └─ scripts/personal.py  Unified CLI: add / list / export / done / set / stats
                  │
                  └─ HTML as export view only (schedule.html / todo.html / history.html)

The three tables do not read from or merge with each other (hard boundary, see below).

Read This First

Four design decisions that determine how this skill works:

1. One database, one CLI, HTML is just a view. The only data source is personal.db. No copies, no drafts, no manual editing of HTML. Any data change goes through personal.py; exporting HTML is just a snapshot for a browser/email.

2. Tables must be clean, conversations can be messy. The schedule table has only six columns: date, weekday, event, role, detail, countdown. Accommodation suggestions, ticket reminders, pre-trip checklists, conflict risks, pending confirmations do not go into the table — but they can be discussed in conversation.

3. Time status recalculates automatically. Schedule countdowns are computed in real-time from iso_date and the export date; no more manually entering "3 days." On export, all countdowns, gray backgrounds for completed items, and header dates are calculated in one pass, preventing decay from line-by-line editing.

4. Three tables independent, never merged. schedule (future commitments), todo (today's actions), and history (past activity) are three separate things. Do not auto-copy or relay between them.

The Only Data File

personal.db (SQLite, default location my/personal.db or same directory as the script). Both my/ and *.db are in .gitignore; personal data will never be committed.

First use:

mkdir -p my
# Use CLI directly to create database and add data; export HTML when needed
python scripts/personal.py --db my/personal.db schedule add --date-label "Aug 20" --iso 2026-08-20 --weekday Thursday --title "JinCai Online Interview" --role Interviewee --detail "19:00 online interview"
python scripts/personal.py --db my/personal.db schedule export --out schedule.html

Database path resolution order: --db > environment variable PERSONAL_DB > personal.db in script directory > <skill root>/my/personal.db. When copied to a working directory, it automatically picks up the local database.

Hard Rules

1. Record Only Confirmed Events (schedule)

Only events with specific dates go into the schedule table. The following do NOT:

  • Intentions from promotional materials (e.g., "classes scheduled on the 10th of every month starting next month" — no confirmed date, don't record)
  • Events with only a time period but no exact date (e.g., "finals in early October")
  • Pending notifications or undecided items

If unsure whether an entry is valid, ask first, don't write it.

2. Do Not Be an Itinerary Advisor

Do not add to the table: accommodation suggestions, ticket reminders, pre-trip checklists, urgency assessments, conflict risk analysis, pending confirmation lists, travel time buffers. Time blocks that are already part of the official schedule (e.g., "Dinner 17:30-20:30") can be kept as schedule items; accommodation description text does not go into the table but can be discussed verbally.

3. Only User-Relevant Events Go Into the Table (schedule)

Judgment criterion: Does the event require the user themselves to act or attend? For example, as a teacher, "student registration deadline" is not relevant to the user and does not go into the table. Also, do not add event internal details for the sake of "completeness" — the table answers "which days are occupied," not a full event description. Exception: When the other party provides an official minute-by-minute schedule, it can be written into detail (that's received information, not inferred).

4. Use Closed Vocabulary for Role Field

The role column in schedule should take values suggested from config.json's identities (Advisor ⊃ Judge / Teacher / Competitor / Lead, replace by scenario as a whole):

  • No ad-hoc word creation allowed; three different spellings for the same role would make the table unscannable.
  • If none of the existing words fit, ask the user, don't create a new one.
  • When the vocabulary has containment relationships, use the higher-level one.

5. Do Not Send Emails Unless Asked

After updates, do only two things: verbally report the changes + stop. Only send when the user explicitly says "send" or "send via email."

6. When Viewing Images, Do Not Guess

Users often send group chat screenshots or posters. If a word is unclear, crossed out, or obscured, do not guess. State clearly which part is unreadable and ask the user to clarify. Guessing a crossed-out line incorrectly can corrupt the entire table.

7. Minimal Status Rule (Table Only Contains Things That Will Happen; Past = Completed; Canceled = Don't Write/Delete)

Rows in the schedule table have only two meanings; do not introduce a third status:

  • Future events → status is empty (default), countdown shows remaining days.
  • Past events → status='Completed', countdown shows "Completed." Judgment: iso_date has passed and the row is still in the table (not deleted). If its time has passed, treat it as done — never show "Expired."

Canceled events simply don't go into the table, and leave no trace:

  • If you know an event will be canceled before entry → just don't write it.
  • If an event was already in the table and later canceled → use schedule delete --id N to physically delete the row (no gray "Canceled" line, no history left).
  • If the user didn't say "canceled" but the date has passed → treat as completed (do not ask "was it done" — default to completed).

There is no "Expired" status. "Expired" was an old logic mislabel that has been completely removed — if a date is past and the row is still in the table, it's "Completed." The agent does not need to verify past events.

Processing Flow When Receiving New Schedule Information

1. Calculate correct weekday and countdown — use iso_date + export date for auto-calculation; don't do mental math. When the year is ambiguous, use the weekday to back-calculate:

python scripts/countdown.py --which-year 08-21

If an announcement says "Aug 21 (Friday)" but that year Aug 21 is a Thursday, it's more likely that the weekday is correct. If a conflict is found, clearly state which year you're scheduling by.

2. Determine if it's user-relevant (Rule 3), assign role (Rule 4).

3. Write to database and export:

python scripts/personal.py schedule add --date-label "Sep 3" --iso 2026-09-03 --weekday Thursday --title "GOAI Finals Deadline" --role Competitor --detail "Finals submission deadline"
python scripts/personal.py schedule export --out schedule.html

Then report changes in one or two sentences. Do not send emails.

Unified CLI Usage

# Schedule
python scripts/personal.py schedule add  --date-label "Aug 20" --iso 2026-08-20 --weekday Thursday --title ... --role ... --detail ... [--status Completed]
python scripts/personal.py schedule list [--verbose]
python scripts/personal.py schedule export [--out schedule.html] [--today 2026-08-18]
python scripts/personal.py schedule done --id N
python scripts/personal.py schedule delete --id N   # When user says "cancel/not happening": physically delete row, no trace (table only keeps things that will happen)

# Today's TODO (--date defaults to today if omitted)
python scripts/personal.py todo add  --date 2026-08-19 --status Pending --task "..." --note "..."
python scripts/personal.py todo list [--date 2026-08-19] [--status InProgress]   # Default shows only today
python scripts/personal.py todo export [--out my/todo.html] [--date 2026-08-19]              # Default writes to my/todo.html
python scripts/personal.py todo export-history [--out todo-history.html]                        # Historical TODO standard view: grouped by date, exports all TODO history activity log (one block per day)
python scripts/personal.py todo export --status Completed [--out completed_todo_by_status.html] # Additional capability (not primary view): cross-date filter by status only; do not treat this as the main "Historical TODO" view
python scripts/personal.py todo set  --id N --status Completed
python scripts/personal.py todo done --id N

# Daily History (--date defaults to today if omitted; --cat is optional)
python scripts/personal.py history add  --date 2026-08-18 --cat ReviewDetails --text "Final review details v2 submitted"
python scripts/personal.py history list [--date 2026-08-18] [--limit 20]
python scripts/personal.py history stats
python scripts/personal.py history export [--out history.html]

Zero third-party dependencies (only stdlib sqlite3 / argparse / datetime).

Automated Email Reminders (Automation) — Optional Feature, Requires User Opt-In

This skill includes scripts/reminder.py, supporting two reminder modes, connecting directly via SMTP, no QQ email connector two-step confirmation required:

  1. Due reminders (check): Scans today's TODO items for HH:MM time points; items within the next 60 minutes that haven't been sent a reminder yet trigger an email.
  2. Night-before preview (preview): Scans tomorrow's schedule entries; if there are events and no reminder has been sent for that day, sends a "Tomorrow's Schedule Preview" email.

Dedup mechanism: my/reminder_state.json records sent reminder keys; the same key is not sent twice.

# Manual trigger
python scripts/reminder.py check        # Today's due reminder (direct SMTP)
python scripts/reminder.py preview      # Tomorrow's preview (direct SMTP)

Reminder email rules:

  • Recipient: Configured in my/smtp_config.json (default [email protected]).
  • Due reminder subject: 📋 Reminder: HH:MM Task; body concisely lists the task + minutes remaining.
  • Night-before preview subject: 🌙 Tomorrow's Schedule (date); body lists date, weekday, and all entries for tomorrow.
  • If no reminders are needed, exits silently without sending any email.

SMTP Configuration (Local Only, Not in Git)

my/smtp_config.json (gitignored) stores SMTP connection info, example:

{
  "smtp_server": "smtp.qq.com",
  "smtp_port": 465,
  "sender_email": "[email protected]",
  "sender_password": "SMTP authorization code",
  "use_ssl": true
}

Getting Authorization Code: QQ Mail → Settings → Account → POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV Services → Generate Authorization Code.

⚠️ Read Before Enabling

This feature is not enabled by default. Creating an automation means authorizing the agent to send scheduled emails, which requires the user's explicit consent.

To enable, follow these two steps:

Step 1 — Configure SMTP Replace sender_email and sender_password in my/smtp_config.json with your QQ email and SMTP authorization code.

Step 2 — Create Automation Create the following two automations in WorkBuddy (or have the agent create them, provided consent is given):

NameTrigger FrequencyPrompt Summary
Schedule Reminder CheckHOURLYRun python scripts/reminder.py check
Tomorrow Schedule PreviewDAILY;BYHOUR=22;BYMINUTE=0Run python scripts/reminder.py preview

Once enabled, missed reminders during WorkBuddy downtime will not be retroactively sent; after startup, automations will continue on their new schedule.

Table Structure (schedule Export)

Main Table (sorted ascending by iso_date, one row = one continuous block):

DateWeekdayEventRoleDetailCountdown
  • Consecutive days merged into one row (e.g., "Aug 21 – Aug 22" is one row, details in "Detail" column)
  • Weekend weekdays shown in red #c9302c; countdown within highlight_days (default 12) in red bold
  • Past rows (iso_date < today) are uniformly gray background with gray text, countdown column always shows "Completed" (see Hard Rule 7: table only contains things that will happen; past = completed; there is no "Expired" or "Canceled" status)

After main table: legend, role descriptions, hour-by-hour detail table (only rendered from detail when official minute-by-minute schedule exists), footer.

Skeleton at template/schedule.template.html, example at examples/schedule-demo.html.

Today's TODO Mode (In DB, Independent from Schedule Table)

The schedule answers "which days are occupied"; TODO answers "what needs to be done today." They are two independent tables that do not read from or merge with each other:

  • schedule table: records confirmed commitments by date
  • todo table: stores only today's action items

The user explicitly requested "TODO should not be mixed with the schedule," so this is a hard boundary:

  • Do not auto-copy entries from schedule into todo, and do not restate events/schedule in todo
  • Users verbally state today's tasks in conversation; AI writes each one into the todo table
  • todo rows have three columns: Status / Task / Note

TODO Rules

  1. Only store today's items. Today's to-dos belong to today; don't pre-fill tomorrow's tasks. On the first daily use, update the export date to today, and gray out yesterday's items that weren't crossed off and are now expired (keep text, do not auto-delete).
  2. Three fixed statuses: Pending (red #c9302c bold) / In Progress (blue #1f3fa8 bold) / Completed (entire row gray #7d8399, task with strikethrough). No fourth status may be invented.
  3. Do not be an advisor. Accommodation, tickets, pre-trip checklists, urgency assessments do not go into the table; keep them in conversation.
  4. Do not send emails unless asked. Same as schedule table: only send when the user says "send." TODO uses scripts/send_schedule.py todo.html (same email HTML constraints, see references/email-html.md).
  5. Anonymize. TODO is personal privacy; it belongs only in my/ (gitignored) or the working directory; no real tasks should ever appear in the repository.

Skeleton at template/todo.template.html, example at examples/todo-demo.html:

cp template/todo.template.html my/todo.html   # Offline template reference only; actual data goes through DB

Daily History Mode (SQLite, Independent from Schedule / TODO)

Activity log of "what was done each day" for later review. It is completely separate from schedule (future commitments) and todo (today's actions), and they do not read from each other:

  • schedule table: confirmed commitments
  • todo table: today's actions
  • history table: log a line at the end of each day about "what was done"

Rules

  1. Only record facts, not emotions. One entry = "date + category + what was done." Categories are reusable words (e.g., DrumTower Hackathon / ReviewDetails / WeChatSkill), used for stats analysis later.
  2. Append once at end of each day; don't save up a week and fill in later — details will be forgotten.
  3. Privacy. History is personal data; it belongs only in my/ (gitignored) or the working directory; no real records should ever appear in the repository.
  4. Do not merge with TODO. TODO is "to-do"; history is "done." Don't restate TODO in history, and don't auto-copy from TODO.

Anonymized example at examples/history-example.md.

Sending Emails

Only execute when the user explicitly says "send."

SMTP_USER='[email protected]' SMTP_PASS='<request from user>' \
  python scripts/send_schedule.py schedule.html
  • Credentials come from environment variables only. Authorization codes should never be saved to disk — not in config, not in scripts, not in any file.
  • Recipient defaults to the sender email (send to self). QQ / 163 enforces sender = recipient.
  • Send as HTML body only, not as HTML attachment — attachments often don't open on mobile phones.
  • If unsure whether parameters are correct, use --dry-run first.
  • How to get authorization codes from various email providers and how to interpret errors: see references/smtp-setup.md.

HTML Constraints

Exported HTML must render correctly in email clients; it must be old-style HTML: all inline styles, table-based layout, no <style> blocks / CSS variables / flex / grid / position / external fonts; <tr> elements with background colors must also have the bgcolor attribute as a fallback. Full constraints and checklist: see references/email-html.md.

Publishing / Anonymized Push Process (Public Repository, Mandatory)

This repository is a public GitHub repository (github.com/Zaosusu/schedule-onepager); any push must be anonymized. Rules:

1. Personal data must never enter the repository. All real data exists only in my/ (excluded by .gitignore): my/personal.db, my/*.html, my/Zhongchuang/, etc. Check before push:

git status                    # my/ should not appear in Untracked
git ls-files | grep -E "my/|\.db$|config\.json|settings\.local"   # Should output nothing

If personal data appears, it means .gitignore was corrupted or someone used git add -f — fix first, then push.

2. Examples must be fictional. All data in examples/ must use fake names/fake schedules (anonymized example: examples/history-example.md). Putting real itineraries, real email addresses, or real names in examples is an incident.

3. Authorization codes must never be saved to disk. SKILL.md / scripts / config.example.json must not contain real SMTP authorization codes. Email credentials come only from environment variables; config.json (real config) is in .gitignore.

4. Publishing steps:

git add SKILL.md scripts/ template/ examples/ references/ README.md LICENSE config.example.json .gitignore
git status          # Verify: no my/, no *.db, no config.json, no settings.local.json
git commit -m "feat/refactor: one-line description of changes"
git push origin main

5. Only push when the skill itself (code/documentation/templates) changes; never push daily edits to personal data (my/ db and HTML).

Communication Style

  • Report changes in one or two sentences; don't restate the entire table unless asked to "show it."
  • If information is missing, ask directly; don't list hypothetical scenarios.
  • If the user writes something incorrectly or contradicts themselves (e.g., says September when they mean August), just correct it and move on; no need to ask follow-ups.
  • It's okay and welcomed to give kind, useful reminders — but keep reminders in conversation, not in the table.

Related Skills