channels — промпт для Claude Code: что делает и как установить
Промпт channels для Claude Code и ChatGPT управляет выбором между мобильным приложением и веб-браузером при тестировании интерфейсов.
Apache-2.0 ★ 9 488 обновлён 2026-11-16
.claude/commands/channels.mdЧто делает channels
Этот промпт задаёт правила для работы с несколькими экранами: мобильными приложениями и встроенным браузером. Каждый экран использует собственный набор инструментов и сохраняет раздельные идентификаторы снимков. Агент выбирает канал по заданному приоритету: сначала проверяет явное указание пользователя, затем аккаунт в приложении или скорость чтения веб-страниц.
При возникновении трудностей вроде стены входа или блокировки браузера правила разрешают переключить канал один раз. Ссылки на внешние приложения открываются на телефоне, а отчёты о подтверждениях привязываются к последнему активному экрану или передаются через аргумент поверхности.
Какие задачи решает
- выбрать между веб-версией и приложением для выполнения задачи
- переключиться между экранами телефона и встроенного браузера
- обработать блокировку браузера или стену входа на сайте
- открыть внешнюю ссылку приложения на телефоне
Примеры запросов агенту
- Выбери канал для задачи в приложении и начни работу
- Переключись на веб-страницу и проверь данные в браузере
- Запусти сценарий через мобильное приложение пользователя
Как установить channels
Вручную: положить файлы
.claude/commands/channels.mdКак использовать
Вставьте текст в начало диалога или в инструкции проекта
Вопросы о channels
Как установить channels в Claude Code?
Поместите файл промпта в директорию .claude/commands/channels.md в корне вашего проекта.
Что делает channels?
Этот промпт координирует действия агента между мобильными приложениями и веб-страницами во встроенном браузере, разделяя инструменты и идентификаторы экранов.
Как агент выбирает между приложением и сайтом?
Агент отдает приоритет приложению для личных аккаунтов, выбирает веб-версию для быстрого поиска информации и переключается между ними при блокировках.
Исходный текст
channels.md · Apache-2.0
## Several screens: choosing a channel
This time you have more than one screen: apps on the phone, and web pages in the built-in browser. Each screen has its own set of tools (phone_ tools act on the phone, web_ tools act on web pages), and each keeps its own refs: a snapshotId from one screen cannot be given to the other screen's tools. To move to the other screen, just call its tools; there is no need to switch first. Confirmation, handover and obstacle reports refer by default to the screen you acted on most recently; when it is the other one, say so with the surface argument.
### Web page or app
At the start of the task you may get an "available channels" line saying whether the app is installed, whether there is a website, whether there is a known way to do it on the web, and whether the user has signed in to the site in Mika. Choose in this order:
1. When the user named a channel ("on the web", "in the app"), use only that one; if it does not work, say so plainly.
2. When the task needs things in the user's account (orders, messages, saved items, posts), prefer the app, because the user is usually signed in there. When the app is not installed, or the user has signed in to this site in Mika, use the web.
3. When the task only looks something up and there is a website, prefer the web: reading a whole page is fast and cheap, and there are no splash ads.
4. When the route you chose hits "this browser is not supported", a forced app download, or a sign-in wall while the user is away, switch to the other route, once only. When a site refuses the built-in browser, open the app if it is installed; otherwise end_not_done. This case does not need the user to take over.
5. Do not open a web page through another app, or launch an app from a web page, to get around an obstacle. A web result of external_app_link means the link wants to open an app: when the task really needs that app (not to get around an obstacle), open the package it gives on the phone instead of tapping the link again and again.
© wangzan101 · Apache-2.0 · wangzan101/Mika