using-the-console-ui

posthog/posthog

Как управлять панелью чтения PostHog Code: этикет focus_*, вызов toast, режим follow.

Звёзды40 862
Авторposthog
Установок2

Установка

SKILL.md

Skill — using the PostHog Desktop UI

How to drive PostHog Desktop's read panel while you work, so the user always sees what you're working on. Load when client.kind is posthog-code.

The client tools you have

ToolWhat it doesWhen to call
focus_tabSwitch the agent detail panel between overview / configuration / sessionsCoarse navigation between the three top-level views
focus_fileOpen one bundle file in the configuration panelAbout to read or edit a specific file
focus_revisionOpen one revision in the configuration panelAbout to inspect / diff a specific revision
focus_sessionOpen one session in the sessions panelAbout to fetch a session's conversation or event log
focus_spec_sectionJump to a section of the spec (tools / skills / triggers / secrets / limits)Discussing one part of the spec specifically
toastSurfaces a transient status notification in PostHog DesktopSparingly — for long-running tool calls, or to flag something the user should look at
set_secretRender an inline form for the user to enter a secret value, scoped to one key on one agentWhenever you need a credential set or rotated. See secrets-and-integrations for the loop

All are no-ops if the client doesn't handle them; the runner hides them from your tool surface. If they're in your tool list, PostHog Desktop is on the other end.

set_secret is the first render-style, interactive client tool — instead of running a synchronous handler, PostHog Desktop mounts a UI inside the tool-call card and the runner parks the session while the user fills it in. Your call returns a synthetic {queued:true, interactive:true, call_id} envelope immediately; end the turn cleanly and the real outcome arrives as a wake message on a fresh turn (see the secrets-and-integrations playbook Path A for the full loop). Tools that need user input belong here; tools the host can fulfill silently (navigation, toasts, context reads) stay synchronous.

focus_* etiquette

Call the right one before the tool call that operates on the resource, not after. The user wants the panel to load as you start working, not after the work is done.

Sequence:

  1. Tell the user what you're about to do (one line)
  2. The matching focus_* to the resource (only if you have the id / path in hand — otherwise skip it)
  3. Make the actual MCP / native tool call(s)
  4. Report back

The five focus tools and when to use each:

ToolArgs (slug always required)Use when
focus_file{ slug: "<agent>", path: "skills/research.md" }Reading or editing a specific bundle file
focus_revision{ slug: "<agent>", revisionId: "<uuid>" }Reading or editing a revision's spec / bundle overall
focus_session{ slug: "<agent>", sessionId: "<uuid>" }Debugging or watching a session
focus_spec_section{ slug: "<agent>", section: "tools" / "skills" / "triggers" / "secrets" / "limits" }Discussing a specific part of the spec
focus_tab{ slug: "<agent>", tab: "overview" / "configuration" / "connections" / "sessions" / "memory" }Coarse navigation when you don't yet have a specific id

slug is required on every focus call. The dock does NOT infer the target from whatever page the user happens to be on — the user navigates while you're thinking, and silently following the URL is a fast way to misroute. If you don't know the slug, call get_context or posthog__agent-applications-list first.

For a multi-file flow (e.g. inspecting agent.md then a skill then the live session), call focus before each transition. Don't focus once and assume the user followed your text-based navigation.

Handle the focus result

Every focus_* returns either:

  • { focused: true, kind: ..., ... } — the panel loaded; the user saw it
  • { focused: false, reason: "user_paused_follow" } — the user has "Follow the agent" turned off; the panel didn't change
  • { focused: false, reason: "missing_slug ..." } — you didn't pass slug. Look it up via get_context or posthog__agent-applications-list and retry. Don't keep firing without it; the dispatcher will keep refusing.

When focused: false, adapt:

  • Spell out the resource path in text ("see skills/research.md in the bundle")
  • Don't keep firing focus events — they're being ignored on purpose
  • Note it once ("Follow-mode is off, so I'll narrate paths instead.")

When focused: true, keep your text concise — the user can see what you see, so don't re-describe it. "Read agent.md, turn 1 makes the agent skip the slack post on weekends" is enough; don't paste the whole file.

toast etiquette

Toasts are intrusive. Use them only for:

  • Long-running work the user should know about: "Running 5 test cases — this will take ~30s"
  • State changes outside their current view: "Revision r_new promoted to live"
  • Errors that need their attention but don't block the conversation: "Slack integration token expired — re-auth at<!-- --> <!-- --><link>"<!-- -->

Don't toast for:

  • Status updates that fit in the chat ("Reading agent now…")
  • Progress on a quick call (anything under 5s)
  • Things the user is actively watching (they don't need a toast about something they can see)

Toasts are silent for the model — they're a UI side effect, not a tool result you should react to.

When the user steers via the read panel

PostHog Desktop lets the user click around the read panel independently. If the user says "I just opened revisions, can you compare r_old and r_new?", they have navigated themselves — you can pick up from there without focusing first. But still focus before YOUR next action.

Combining focus + acknowledgement

Pattern: one short text line + one focus call + the actual work, all in the same turn.

Example:

Opening weekly-digest's live revision, pulling its spec + system prompt.

[calls focus_revision with { revisionId: 'r_live123' }]

[calls posthog__agent-applications-revisions-retrieve] [calls posthog__agent-applications-revisions-system-prompt]

Spec is 4 tools, 3 skills, cron trigger every Monday 09:00. Want me to walk through the skills, or jump to recent sessions?

The user's experience: text appears, panel transitions to the revision view, a moment later the chat shows the summary. Three beats, all in one turn.

Deep links PostHog Desktop understands

PostHog Desktop reads its full view state from URL params, so you can hand the user a link to a specific surface and trust they'll land where you want them to. The two patterns that are load-bearing today:

GoalURLNotes
Open the agent's connections / secrets/agents/<slug>/connectionsJust lands on the tab. Use as a fallback when there's no specific key yet.
Open the secret editor for one key/agents/<slug>/connections?edit_secret=<KEY>Opens the modal pre-targeted. Don't focus_tab to the connections tab and also tell them to edit — pick one channel.
Same, with a callback into THIS session/agents/<slug>/connections?edit_secret=<KEY>&callback_session=<session_id>PostHog Desktop fires a synthetic [system] user turn back to <session_id> after they save. You wait silently. See secrets-and-integrations.

Get <session_id> from get_context — it's the session_id field on the envelope. Don't try to derive it any other way; you don't have stable access to it otherwise.

When you render the link in chat, use a markdown link so the user can one-click it. Don't paste the URL bare — they'll often miss it in a wall of text.

When NOT to focus

  • The user just asked you to summarize without context-switching ("just give me the slug list, don't open anything")
  • The thing you're looking at isn't a UI-representable resource (e.g. a transient computation, an in-memory inference)
  • You're mid-debug and the user has explicitly turned follow-mode off — respect it

Errors from focus

If a focus_* call returns client_tool_unsupported (unexpected — should have been hidden from your surface), behave as if you got focused: false. Don't crash; fall back to text narration. This shouldn't happen, but a buggy PostHog Desktop version might.

The "screen-sharing" mental model

Treat focus_* as moving a cursor on a shared screen. Every action you take, the user should be able to see where you took it. The chat is the audio narration; the read panel is the screen. Together they make the whole interaction legible — without focus, the chat reads like talking to someone whose screen is off.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: using-the-console-ui](https://darkplay.ru/ai/skills/posthog-posthog-using-the-console-ui)

Из того же репозитория

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

E2e Runneraffaan-m · Специалист по E2E-тестам на Vercel Agent Browser и Playwright: генерация, запуск и…
225 587 ★
Network Architectaffaan-m · Проектирует корпоративные и распределённые сети с маршрутизацией и автоматизацией.
225 587 ★
Opensource Sanitizeraffaan-m · Проверяет open-source форк на утечки секретов, PII и опасные файлы перед релизом.
225 587 ★
code-reviewanthropics · Автоматическое код-ревью pull request'ов с помощью нескольких специализированных агентов…
34 комп.
ruflo-goalsruvnet · Долгосрочное планирование целей, оркестрация глубокого исследования и адаптивное…
240 комп.
Time Agentshanraisshan · Агент для получения текущего времени в Дубае (ОАЭ, часовой пояс Asia/Dubai, UTC+4).
61 912 ★
cli-anythinghkuds · Создавайте мощные CLI-интерфейсы с сохранением состояния для любого GUI-приложения по…
5 комп.
chrome-devtools-mcpchromedevtools · Надёжная автоматизация, глубокая отладка и анализ производительности в Chrome с помощью…
6 комп.
aws-amplifyanthropics · Создание full-stack приложений на AWS Amplify Gen 2 с пошаговыми сценариями для…
100 комп.
chrome-devtools-mcpanthropics · Управление и инспекция живого браузера Chrome из вашего агента разработки. Запись…
100 комп.

Лучшие ИИ-инструменты для программирования

ИИ для программирования

Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные

GenAPIGenapi
По запросу
5.0
Notepad++ AINotepad-plus-plus
По запросу
4.9
GitHub CopilotGitHub
По подписке
4.9
Creatium MaxCremax
По запросу
4.8
Emacs AIGnu
По запросу
4.8
KiteKite
По запросу
4.8
Amazon Q DeveloperAmazon
По запросу
4.8
VECTA
Есть бесплатный тариф
4.8
SoftPractice
Есть бесплатный тариф
4.8
VibeForge
Есть бесплатный тариф
4.7

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8