Generate complete, buildable Pebble smartwatch watchfaces using Claude Code with full PBW artifact output and QEMU emulator testing.
git clone https://github.com/coredevices/pebble-watchface-agent-skill
cd pebble-watchface-agent-skill
claudeThen just ask:
Create an animated underwater watchface with fish and bubbles
Claude automatically detects the skill and handles everything — design, code generation, build, emulator testing, and screenshot verification.
Requires: Claude Code and the Pebble SDK installed.
This repository contains a Claude Code skill that transforms natural language descriptions into fully functional Pebble watchfaces. Simply describe what you want, and Claude will:
- Design the watchface architecture
- Generate all source files (C code, package.json, wscript, pkjs)
- Build a ready-to-install
.pbwfile - Test in the QEMU emulator
- Verify visually with screenshots
- Deliver the final artifacts with rollover GIFs
- Publish to the Pebble App Store (optional)
Default target: Emery (Pebble Time 2, 200x228 color rectangular display).
Before using this skill, ensure you have:
- Claude Code CLI installed and configured
- Pebble SDK Follow the instructions in the official documentation
- QEMU for emulator testing (bundled with Pebble SDK)
- Python 3 with Pillow (
pip install Pillow) for icon and GIF generation
Here are some things you can ask for:
Create a retro digital watchface with a neon green display on black background
Or with weather:
Make a watchface that shows the time, date, and current weather conditions
Claude will automatically invoke the pebble-watchface skill and handle everything from design to delivery.
.claude/skills/pebble-watchface/
├── SKILL.md # Main skill definition
├── reference/ # API documentation
│ ├── pebble-api-reference.md
│ ├── animation-patterns.md
│ └── drawing-guide.md
├── samples/ # Working example watchfaces
│ └── aqua-pbw/ # Animated aquarium watchface
├── scripts/ # Helper utilities
│ ├── create_project.py
│ ├── generate_uuid.py
│ └── validate_project.py
└── templates/ # Code templates
├── animated-watchface.c
├── static-watchface.c
├── weather-watchface.c
├── pkjs-weather.js
├── package.json.template
└── wscript.template
| Phase | What Happens |
|---|---|
| 1. Research | Gathers requirements, studies sample code and tutorials |
| 2. Design | Plans layout for emery (200x228), animations, data structures |
| 3. Implement | Writes all project files (main.c, package.json, wscript, pkjs) |
| 4. Build | Runs pebble build to generate the PBW |
| 5. Test | Installs in QEMU, captures screenshots |
| 6. Iterate | Fixes issues until visual verification passes |
| 7. Assets | Generates icons and preview GIFs via helper scripts |
| 8. Deliver | Reports PBW location with screenshots and GIFs |
| 9. Publish | Publishes to Pebble App Store via pebble publish (optional) |
| Platform | Model | Display | Resolution | Colors |
|---|---|---|---|---|
| emery | Pebble Time 2 | Rectangular | 200x228 | 64 colors |
| gabbro | Pebble Round 2 | Round | 260x260 | 64 colors |
| basalt | Pebble Time | Rectangular | 144x168 | 64 colors |
| chalk | Pebble Time Round | Round | 180x180 | 64 colors |
| aplite | Pebble Classic | Rectangular | 144x168 | B&W |
| diorite | Pebble 2 | Rectangular | 144x168 | B&W |
| flint | Pebble 2 Duo | Rectangular | 144x168 | 64 colors |
Emery is the default target. Gabbro (round) support can be added as a second pass.
The skill supports watchfaces that display weather and other web data using the AppMessage + PebbleKit JS pattern:
- Watch C code communicates with phone-side JavaScript via AppMessage
- PebbleKit JS (
src/pkjs/index.js) fetches data from web APIs - Uses Open-Meteo API (free, no API key needed)
- Weather refreshes every 30 minutes for battery efficiency
See tutorials/c-watchface-tutorial/part4/ for a complete working example.
Complete Pebble C watchface tutorials are included in tutorials/c-watchface-tutorial/, sourced from coredevices/c-watchface-tutorial:
| Part | Topic | Key Concepts |
|---|---|---|
| part1 | Basic time + date | Window, TextLayer, TickTimerService, system fonts |
| part4 | Weather data | AppMessage, PebbleKit JS, Open-Meteo API, XMLHttpRequest |
| part6 | User settings | Clay configuration, persistent storage, color pickers |
Publish directly to the Pebble App Store:
# Login (one-time, opens browser)
pebble login
# Publish (interactive — prompts for details)
pebble publish
# Or non-interactive
pebble publish --non-interactive --description "My watchface"After successful generation, you'll receive:
your-watchface/
├── build/
│ └── your-watchface.pbw # Ready-to-install watchface
├── src/c/
│ └── main.c # Generated C source code
├── src/pkjs/
│ └── index.js # Phone-side JS (if weather/web data)
├── package.json # Pebble project manifest
├── wscript # Build configuration
├── screenshots/ # Captured by pebble screenshot
│ ├── emery_*.png # Static screenshots
│ └── emery_*.gif # Rollover GIFs
└── screenshot_emery.png # Verification screenshot
cd your-watchface
pebble install --emulator emerypebble install --phone- No Floating Point — Uses
sin_lookup()/cos_lookup()for trigonometry - MINUTE_UNIT Updates — Always uses minute-based tick updates for battery efficiency
- Pre-allocated Memory — Creates GPaths in
window_load - Dynamic Bounds — Uses
layer_get_bounds()instead of hardcoded screen sizes - Resource Cleanup — Properly destroys all resources in unload handlers
- Check for syntax errors in the generated C code
- Verify
pebble-sdkis properly installed - Ensure all required files exist (package.json, wscript, src/c/main.c)
- Run
pebble sdk install-emulator emeryto install emulator - Check QEMU is installed:
which qemu-system-arm
- Ensure Pillow is installed:
pip install Pillow - Make sure the emulator is running before running
create_preview_gif.py
- The skill includes visual verification — it will iterate until correct
- If issues persist, provide specific feedback about what's wrong
- Pebble SDK Documentation
- Open-Meteo Weather API
- C Watchface Tutorial (source)
- Claude Code Documentation
This skill is derived from the excellent pebble-wf-agent-skill by priyankark.
This skill and associated templates are provided for creating Pebble watchfaces. Individual watchfaces you create are your own.