Cookbook
Real patterns from the first-party skills. Copy-paste-ready.
This section is recipes — small, focused patterns lifted from skills that ship with Huxley. Each one solves a specific problem and shows the actual code behind it.
RSS feeds and HTTP APIs
Fetch news, weather, scores, transit. Cache responses. Filter by constraints. Pattern from the news skill.
Audio streaming
Long-form playback via factory + ffmpeg. Pattern from audiobooks and radio.
Timers and reminders
Schedule, persist, restore on restart. Pattern from the timers skill.
Notifications and proactive turns
Inbound messages with debounce + coalesce. Pattern from the telegram skill.
Persistent state
Per-skill storage, structured logs, restore-on-setup. The patterns every skill uses.
How to read these
Each recipe:
- States the problem.
- Shows the smallest working version.
- Walks the gotchas — what we learned the hard way.
- Points to the source skill so you can see the production version.
The recipes assume you've read the relevant Concepts pages. They don't re-explain inject_turn or AudioStream; they show how to use them well.