pisugar/whisplay/create-app
Claude Code and agent skill by pisugar/whisplay
- community
Checking that the SKILL.md file is still in the repository.
Create a Whisplay app and integrate it with the daemon. Use when the user wants to build a new app for the Whisplay hardware (240x280 LCD, button, RGB LED), register it with the daemon, or understand the daemon IPC protocol.
Install
npx vskill@latest install pisugar/whisplay/create-appSKILL.md
Creating a Whisplay App
Architecture Overview
Whisplay daemon manages app lifecycle on a 240×280 RGB565 LCD with a single button and an RGB LED. Apps communicate with the daemon over a Unix domain socket at /tmp/whisplay-daemon.sock using newline-delimited JSON.
The runtime SDK (runtime/whisplay_client.py) provides WhisplayDaemonProxy which handles socket communication, framebuffer rendering, and event subscription automatically.
Quick Start
1. Create the app script
2. Create the app config JSON
Place in ~/.whisplay-daemon/app/<app-id>.json:
Or use persist=True in create_whisplay_hardware() to auto-register on first launch.
App Config Fields
| Field | Type | Description | |
|---|---|---|---|
app_id | string | Unique identifier (required) | |
display_name | string | Name shown on desktop | |
icon | string | 1-2 char icon for desktop list | |
launch_command | string | Shell command to start the app | |
cwd | string | Working directory for launch | |
env | object | Extra environment variables | |
exit_gesture | string | "quad_click" (4 clicks in 3s), "long_press" (0.7s hold), or "none" (app owns all gestures) | |
priority | int | Desktop sort order (higher = top) | |
use_daemon_default_log | bool | Redirect stdout to daemon log | |
persist | bool | Save config to disk | |
disable_esc_exit_key | bool | Prevent ESC key from triggering exit |
create_whisplay_hardware() API
Returns a WhisplayDaemonProxy if daemon is running, otherwise falls back to direct WhisplayBoard hardware access.
WhisplayDaemonProxy Methods
| Method | Description | |
|---|---|---|
fill_screen(color) | Fill entire screen with RGB565 color value | |
draw_image(x, y, w, h, data) | Write RGB565 pixel bytes to framebuffer region | |
set_backlight(brightness) | Set LCD backlight (0-100) | |
set_rgb(r, g, b) | Set LED color (0-255 each) | |
set_rgb_fade(r, g, b, ms) | Fade LED to color over duration | |
button_pressed() | Returns current button state | |
on_button_press(cb) | Register press callback | |
on_button_release(cb) | Register release callback | |
on_exit_request(cb) | Called when user triggers exit gesture | |
on_focus_revoked(cb) | Called when daemon forcibly takes back focus | |
release_focus() | Voluntarily release foreground | |
cleanup() | Release resources and disconnect |
Screen & Pixel Format
- Resolution: 240×280
- Format: RGB565 big-endian (2 bytes per pixel)
- Framebuffer size: 240 × 280 × 2 = 134,400 bytes
- Stride: 480 bytes per row
RGB565 conversion:
For PIL Image rendering:
Daemon IPC Protocol
All communication is newline-delimited JSON over Unix socket /tmp/whisplay-daemon.sock.
Request format
Key commands
| Command | Purpose | |
|---|---|---|
health.ping | Check daemon status, get screen info | |
app.register | Register/update app entry | |
app.list | List all registered apps | |
app.launch | Launch an app by id | |
app.focus.acquire | Claim foreground + framebuffer | |
framebuffer.acquire | Get framebuffer file path | |
app.focus.release | Release foreground voluntarily | |
app.exit.request | Request another app to exit | |
backlight.set | {"brightness": 0-100} | |
led.set | {"r": 0-255, "g": 0-255, "b": 0-255} | |
led.fade | {"r", "g", "b", "duration_ms"} | |
events.subscribe | Subscribe to real-time events (keeps connection open) |
Event stream
After events.subscribe, daemon pushes events as JSON lines:
| Event | Payload | Trigger | |
|---|---|---|---|
button_pressed | {app_id} | Physical button down | |
button_released | {app_id} | Physical button up | |
app_exit_requested | {app_id, reason} | Exit gesture detected | |
app_focus_revoked | {app_id, reason} | Daemon forcibly revokes focus | |
app_foreground_acquired | {app_id, session_token} | App got foreground | |
desktop_entered | {reason} | Returned to desktop |
App Lifecycle
- Daemon starts → loads JSON configs from
~/.whisplay-daemon/app/ - User selects app on desktop (button cycle + long press, or keyboard)
- Daemon runs
launch_commandas subprocess - App calls
app.focus.acquire→ getssession_token - App calls
framebuffer.acquire→ gets shared memory file path - App writes RGB565 frames to shared memory; daemon renders at 20 FPS
- Exit gesture triggers
app_exit_requestedevent - App calls
app.focus.releaseor exits → desktop resumes
Best Practices
- Always register
on_exit_requestandon_focus_revokedcallbacks - Call
board.cleanup()in afinallyblock - Use
use_daemon_default_log=Truefor easier debugging - Keep render loop at ≤20 FPS to match daemon refresh rate
- Use PIL for complex graphics, convert to RGB565 before writing
- Set
priorityto control desktop ordering (higher = appears first) - Use
env.WHISPLAY_APP_IDso the app can read its own ID from environment
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdaemon/skills/create-app/SKILL.md
Popularity
- Repository stars
- 130
- Repository forks
- 41
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Jul 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pisugar/whisplay/create-app)