sleep-channel
Handle messages in a Discord sleep-tracking channel by grounding all sleep logging and summaries on the real sleep tracker and source Discord metadata. Use when working in a dedicated sleep channel, especially for adding sleep entries, correcting the latest entry, deleting the latest entry, or rendering the current sleep log without hallucinating timestamps, dates, or entries.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cdmichaelb/sleep-channelSleep Channel
Deterministic sleep tracker for Discord channel-based sleep logging.
Configuration
Set the following environment variables before use:
| Variable | Required | Description |
|---|---|---|
SLEEP_TIMEZONE | Yes | IANA timezone string (e.g. America/Los_Angeles, Europe/Berlin) |
WORKSPACE | No | Workspace root path. Defaults to $HOME/.openclaw/workspace |
Core Rules
- Treat the configured channel as the dedicated sleep channel.
- Prefer
scripts/tracker.pyfor all log mutations and rendering. - Never write
nowas a logged time. - Never derive event time from the model turn time.
- Use the source Discord message timestamp unless the user explicitly gives a different time.
- Convert displayed times to the user's local timezone (
SLEEP_TIMEZONE). - Never invent entries, dates, or file contents.
- If showing the sleep log, render from the real tracker/file output.
Commands
Add a new sleep event
For messages like: going to bed, still awake, fell asleep, awake now, resting, nap, back to sleep.
python3 scripts/tracker.py add \
"$MESSAGE_TEXT" \
"$CHANNEL_ID" \
"$MESSAGE_ID" \
"$AUTHOR_ID" \
"$TIMESTAMP_UTC"
Correct the latest entry
When the user is clearly correcting the previous sleep event.
python3 scripts/tracker.py correct-latest \
"$MESSAGE_TEXT" \
"$CHANNEL_ID" \
"$MESSAGE_ID" \
"$AUTHOR_ID" \
"$TIMESTAMP_UTC"
Delete the latest entry
When the user explicitly wants the latest sleep entry removed.
python3 scripts/tracker.py delete-latest
Render the sleep log
Display the current sleep log/summary.
python3 scripts/tracker.py render
Classification Hints
The tracker handles common phrases: fell asleep, awake now, got up, still awake, laying in bed, going to bed, trying to sleep, going back to sleep. Pass raw text to the tracker instead of re-parsing.
If Uncertain
Ask a short clarifying question only when intent is ambiguous:
- Correction vs new event?
- Delete the latest entry?
- Explicit time override?
Files
| File | Purpose |
|---|---|
scripts/tracker.py | Canonical sleep tracker (self-contained, stdlib only) |
references/CHANNEL_RULES.md | Channel setup guide (optional) |
references/README.md | System documentation (optional) |
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cdmichaelb-sleep-channel": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
food-channel
Handle messages in a food-tracking channel by routing food intake events through a deterministic food tracker. Use when working in a dedicated food channel, especially for barcode lookups, photo estimates, and daily summaries.
publish-skill
Prepare and publish an OpenClaw skill to ClawHub. Handles PII/secret auditing, generalization, env var extraction, directory scaffolding, git init, and the clawhub publish command. Use when publishing a new skill or updating an existing one on ClawHub.
snippets-sync
Sync code snippets and notes between machines via file sync. Organized by language, rendered in any Markdown viewer (Obsidian, VS Code, etc.).
vitamin-tracker-channel
Manage vitamin/supplement reminders across configurable daily time slots via cron jobs. Use when adjusting supplement schedules, adding/removing supplements, or handling vitamin-related channel interactions. Triggers on "vitamin", "supplement", "vitamin reminder", "vitamin schedule".
medication-channel
Handle messages in a medication-tracking channel by routing medication events through a deterministic medication tracker instead of freehand model judgment. Use when working in a dedicated medication channel, especially for logging taken/missed/extra medication events, morning/evening completion, timestamp-grounded confirmations, and avoiding hallucinated reminders or fake times.