phone_event — Claude Code prompt: what it does, how to install
phone_event — a prompt for Claude Code listens for accessibility window events on a task's virtual display or package notifications. The listener stays active only during the call and ignores past events.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/phone_event.mdWhat phone_event does
The prompt tracks window and content accessibility events on the task's virtual display. It also captures device notifications from a specified package, returning the package identifier along with short event text.
Two operational modes handle incoming updates. The once mode waits for and returns the single next event, while watch continuously gathers multiple events across the timeout period without subscription gaps.
The event listener operates strictly for the duration of the command call. Because it does not run in the background, events triggered before invocation are lost.
What it helps with
- capture the next accessibility window event on a virtual display
- collect multiple UI events across a timeout window without gaps
- filter device notifications from a specific package
- extract package identifiers and short text snippets from events
Example prompts for the agent
- Run phone_event in once mode to wait for the next screen update.
- Use phone_event watch on package com.android.settings to capture incoming notifications.
How to install phone_event
Manually: put the files in place
.claude/commands/phone_event.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phone_event
How to install phone_event in Claude Code?
Save the prompt file to .claude/commands/phone_event.md in your project.
What is the difference between once and watch in phone_event?
The once mode completes after retrieving the next single event. The watch mode collects all events throughout the timeout without subscription gaps.
Does phone_event return past notifications?
No. The listener exists only while the call executes, so events triggered prior to invocation are not captured.
Source text
phone_event.md · Apache-2.0
Wait for accessibility window/content events on this task's virtual display, or for device notifications from an optional package. once returns the next event; watch collects multiple events during the timeout without gaps between subscriptions. Returns each event's package and short text. The listener exists only during this call; it does not return past events.
© wangzan101 · Apache-2.0 · wangzan101/Mika