Generate complete, buildable Pebble smartwatch watchfaces using Claude Code with full PBW artifact output and QEMU emulator testing.
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)
- Build a ready-to-install
.pbwfile - Test in the QEMU emulator
- Verify visually with screenshots
- Deliver the final artifacts with app icons and animated previews
These watchfaces were generated using this agent skill and are live on the Rebble App Store:
- The Swordsmen - Animated Prince of Persia sword fighting scene
- Castle Knights - Animated medieval castle with jousting knights
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/GIF generation
git clone <repo-url>
cd pebble-wf-skillclaudeSimply describe what you want:
Create a retro digital watchface with a neon green display on black background
Or:
Make an animated watchface with floating bubbles and the time in the center
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_app_icons.py
│ ├── create_preview_gif.py
│ ├── create_project.py
│ ├── generate_uuid.py
│ └── validate_project.py
└── templates/ # Code templates
├── animated-watchface.c
├── static-watchface.c
├── rocky-watchface.js
├── package.json.template
└── wscript.template
The skill follows a rigorous end-to-end workflow:
| Phase | What Happens |
|---|---|
| 1. Research | Gathers requirements, studies sample code patterns |
| 2. Design | Plans layout, animations, data structures |
| 3. Implement | Writes all project files (main.c, package.json, wscript) |
| 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. Deliver | Reports PBW location with icons and preview GIFs |
| Platform | Display | Resolution | Colors |
|---|---|---|---|
| aplite | Rectangular | 144x168 | Black & White |
| basalt | Rectangular | 144x168 | 64 colors |
| chalk | Round | 180x180 | 64 colors |
| diorite | Rectangular | 144x168 | 64 colors |
Create a minimalist digital watchface with large white numbers on a dark blue background
Make an analog watchface with hour and minute hands, a small seconds subdial,
and battery indicator in the top right
Create a beach-themed watchface with animated waves, a sandcastle, and the time
displayed in the sky area
Design a watchface that looks like an old Game Boy screen with pixelated time display
After successful generation, you'll receive:
your-watchface/
├── build/
│ └── your-watchface.pbw # Ready-to-install watchface
├── src/c/
│ └── main.c # Generated C source code
├── package.json # Pebble project manifest
├── wscript # Build configuration
├── screenshot_basalt.png # Color display preview
├── screenshot_aplite.png # B&W display preview
├── screenshot_chalk.png # Round display preview
├── icon_80x80.png # Small app icon
├── icon_144x144.png # Large app icon
├── preview_basalt.gif # Animated color preview
├── preview_aplite.gif # Animated B&W preview
└── preview_chalk.gif # Animated round preview
cd your-watchface
pebble install --emulator basaltpebble install --cloudpebbleOr transfer the .pbw file to your phone and open with the Pebble app.
Add new C templates to .claude/skills/pebble-watchface/templates/:
// templates/my-custom-template.c
#include <pebble.h>
// Your template code here...Reference it in SKILL.md under the templates section.
Add new reference docs to .claude/skills/pebble-watchface/reference/:
# My Custom Reference
Document specific patterns, APIs, or techniques here.Add working examples to .claude/skills/pebble-watchface/samples/:
samples/
└── my-example/
├── src/c/main.c
├── package.json
├── wscript
└── resources/
The Pebble platform has specific requirements that the skill handles automatically:
- No Floating Point - Uses
sin_lookup()/cos_lookup()for trigonometry - Pre-allocated Memory - Creates GPaths in
window_load - Fixed-Point Math - TRIG_MAX_ANGLE = 65536 for full circle
- Battery Awareness - Throttles animations when battery < 20%
- 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 basaltto install emulator - Check QEMU is installed:
which qemu-system-arm
- The skill includes visual verification - it will iterate until correct
- If issues persist, provide specific feedback about what's wrong
pip install pebble-sdk PillowClaude Code skills are markdown files that provide domain-specific instructions. When you place a skill in .claude/skills/, Claude automatically:
- Detects when the skill is relevant based on your request
- Loads the skill instructions and reference materials
- Follows the defined workflow phases
- Uses provided templates and samples as references
- Executes build and test commands
- Delivers verified artifacts
---
name: skill-name
description: When to use this skill
---
# Skill Title
Instructions for Claude to follow...
## Phase 1: Research
...
## Phase 2: Implementation
...The SKILL.md file is the entry point. Supporting files in reference/, samples/, and templates/ provide additional context.
To improve this skill:
- Test with various watchface descriptions
- Add new templates for common patterns
- Expand reference documentation
- Add more sample watchfaces
- Improve error handling in scripts
This skill and associated templates are provided for creating Pebble watchfaces. Individual watchfaces you create are your own.