add-analytics
БесплатноБез исполняемых скриптовНе проверенDesign or add Sesori product analytics. Use when adding a user-facing feature, deciding whether an event is valuable, changing analytics identity/privacy…
от sesori-ai★ 144 звезды на GitHubОб этом скилле
add-analytics
Design analytics that answer a product question without creating misleading or sensitive data.
Before adding an event
An event is worthwhile only when all of these are concrete:
- Decision: What product decision or investor metric changes if this moves?
- Meaning: Is it an intent, confirmed outcome, state transition, or view?
- Authority: Which business success/failure seam proves it happened?
- Population: Is the unit an account, installation, or action? Never mix those denominators under one label.
- Privacy: Can every parameter be a bounded enum/boolean or explicitly approved scalar without code, content, paths, identity, or entity IDs?
- Reporting: Which curated model/view consumes it, and how are coverage, maturity, freshness, and deduplication handled?
If the answer is only “this button was tapped,” skip it unless that tap is the only honest signal for a defined funnel step.
Current and planned seams
The source of truth is the closed models under
client/module_core/lib/src/foundation/models/product_analytics/, with
repository delivery/preference records under repositories/models/ and service
state under services/models/:
- Consumers call
ProductAnalyticsServicefor authenticated account-linked events. - Five approved account-less authentication events call
InstallationAnalyticsService: the started/completed/failed attempt funnel plus Firebase's recommendedsign_upandloginoutcomes. They are preference-exempt by explicit product decision. - Singular attribution is a separate, preference-exempt scope by owner
decision: standard authentication conversions through
InstallationAnalyticsService, one-shotbridge_pairedthroughAttributionService, and one-shotfirst_session_runfrom the canonical message outcomes insideProductAnalyticsService. All reach the SDK throughAttributionRepository; add no other attribution event without a privacy decision. - Delivery flows
Client (Foundation) -> API -> Repository -> Service -> Consumer. Cubits/widgets/listeners never holdAnalyticsClientorAnalyticsApidirectly. - Mobile implements
AnalyticsClientwith Firebase. Desktop implements it with an adapter that streams events toDesktopProductAnalyticsDeliveryService, which posts account-linked product events to the auth server. Packaged macOS release builds also use Firebase for native usage/session metrics and the five approved account-less authentication events, never a second copy of product events. Windows/Linux have no native Firebase Analytics support. Desktop debug/profile and source builds keep analytics disabled; Firebase initializes only after primary-process admission. Desktop has no Singular or automatic screen reporting.
Choose the authoritative hook
| Event meaning | Correct seam | Example |
|---|---|---|
| Confirmed outcome | Success branch after repository/service response | Message accepted, session created |
| Failure diagnostic | Explicit typed failure branch | Session creation failed |
| Reactive state | Dedicated listener or bounded transition guard | Bridge/screen state |
| Screen | GoRouterRouteSource -> exhaustive AnalyticsScreen mapping |
product_screen_viewed |
| Flutter-only capability | UI call site after capability succeeds, calling Layer-3 service | Voice transcription completed |
| Account-less authentication | LoginCubit terminal state through InstallationAnalyticsService |
Attempt failure or server-confirmed signup/login |
Never use a widget tap as a proxy when a confirmed outcome exists. Never emit a success event when an operation is queued, merely attempted, or later requeued. Capture product-event occurrence time at that authoritative seam before any preference deferral; a later Firebase emission timestamp must not move funnel or retention timing.
Screen reporting
GoRouterRouteSource.currentRouteStreamis the sole screen source.- Map every
AppRouteDefexhaustively to a pinnedAnalyticsScreen; never send concrete paths, project/session IDs, or Dart enum names as implicit wire values. - Disable Firebase automatic screen reporting on Android and Firebase-enabled Apple targets.
- Emit canonical account-linked
product_screen_viewed, then let the Firebase adapter best-effort mirror the same pinned name throughlogScreenView. - Curated account metrics use only
product_screen_viewed; standardscreen_viewis diagnostic. Test one custom + one native event per changed GoRouter route and no automatic duplicate.
Parameters and naming
- Event/parameter names: pinned
snake_case, max 40 characters. - Use enums for closed values and explicit converters/mappings for existing sealed types. Do not assume a domain type is an enum.
- Max 25 parameters per GA4 event; fewer is better.
- Do not rename a released wire value. Add a schema version when semantics must change.
- `input_mode=voice_assisted
Установить add-analytics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-analytics?
Design or add Sesori product analytics. Use when adding a user-facing feature, deciding whether an event is valuable, changing analytics identity/privacy, instrumenting an outcome, or adding BigQuery/Looker metrics. Covers authoritative hook points, layered delivery, bounded event design, GoRouter screen reporting, voice/login exceptions, and warehouse verification.
Как установить скилл add-analytics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-analytics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic