creating-customer-analytics-account-widgets

creating-customer-analytics-account-widgets is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 147 tokens per session (1,387 once invoked), scanned A, original, MIT.

A repository-specific guide for creating or changing customer-analytics widgets on an account detail page. A widget is a page tile or tab that shows account information and may save settings such as filters, searches, or sorting.

In plain words
What is it for?
Use it to add or review account-page widgets, tiles, tabs, saved configuration, and their settings editors in the customer analytics product.
Why use it?
It helps changes follow the account page's shared composition rules instead of adding one-off branches that make future changes harder. It clarifies when to use a tile, a tab, saved settings, or a settings editor.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit Use it to add or review account-page widgets, tiles, tabs, saved configuration, and their settings editors in the customer analytics product.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/creating-customer-analytics-account-widgets
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill creating-customer-analytics-account-widgets
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for creating-customer-analytics-account-widgets

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for creating-customer-analytics-account-widgets

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/creating-customer-analytics-account-widgets.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,387 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00147 $0.01387
Opus 5.5 $0.00059 $0.00555
Sonnet 5.5 $0.00029 $0.00277
Haiku 4.5 $0.00015 $0.00139

Measured 15d ago against content hash 9a819cbcf595, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

creating-customer-analytics-account-widgets scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/creating-customer-analytics-account-widgets/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Customer analytics account widgets

Account view widgets follow the composition pattern. A view is an ordered list of independent widgets. Shared code knows a widget only through its entry in ACCOUNT_VIEW_COMPONENTS. The Accounts guide states the rules. Read that section first. This skill holds the steps.

Paths below are relative to products/customer_analytics/.

The rule that decides most questions

Do not add a kind === branch to shared code. Shared code is AccountViewComponent, AccountViewTile, AccountViewTileEditorModal, AccountViewRenderer, accountViewsLogic, and validate_account_view_content. When a widget needs something the others do not, add an optional field to AccountViewComponentBase and let shared code read it. ConfigEditor, getConfigError, onConfigSaved, and tileInsetClassName are the precedent.

Decide first

  • Tile only, or also a tab? A tile-only widget has no systemTabId. A tab also appears in the account detail tabs.
  • Does it save settings? If the widget has a filter, search, or sort worth keeping, it reads and writes tile config.
  • Does it need a settings editor? Only when the tile's own controls cannot set the config. Properties and SQL query are the precedents.
  • Is it flag-gated? Ask the user. Do not invent a flag.

Steps

  1. Build the widget. Put the component and its logic in frontend/components/Accounts/. Model them on AccountMeetingsExpansion and accountMeetingsLogic. Key the logic by account and instanceId, as in `${props.accountId}:${props.instanceId ?? 'default'}`. Without instanceId, two tiles of one kind share state.
  2. Add the kind. For a tile-only widget, add it to both unions in accountViewComponents.tsx. For a tab, see Tabs.
  3. Add the registry entry. Set kind, tagName, label, and Component. Component takes AccountViewWidgetProps and maps them to the widget. Pass getTileLogicProps(props) when the widget saves settings.
  4. Add the tag to the backend. Add tagName and its label to ACCOUNT_VIEW_COMPONENT_LABELS in backend/logic/account_views.py. Without it, the API rejects every view that holds the widget.
  5. Add the test rows. Add the tag to the parameterized test_accepts_account_widget in backend/test/test_account_views.py. Invoke /writing-tests before you add anything more.
  6. Update the Accounts guide. It asks for this in the same change.

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago Changed · +1 lines 9a819cbcf595
  2. 22d ago First seen · 83 lines · 147 tokens per session scan A 014037d20b60

Subscribe to this mod's changes

creating-customer-analytics-account-widgets is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 147 tokens to every session and 1,387 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-12.

Related

creating-customer-analytics-account-widgets compared with skills from other repositories

creating-customer-analytics-account-widgets next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
creating-customer-analytics-account-widgetsPostHog/posthog-fossSkill736todayMITA147Claude Code, Codex
build-ghost-appTryGhost/GhostSkill56ktodayMITA44Claude Code, Codex
material-ui-tailwindmui/material-uiSkill99kyesterdayMITA67Claude Code, Codex
fuzzy-rankingTanStack/tableSkill29k2d agoMITA62Claude Code, Codex
r3f-best-practiceszebbern/claude-code-guideSkill4.7ktodayMITA74Claude Code, Codex
git-safetytamagui/tamaguiSkill14k3d agoMITA42Claude Code
remotion-best-practicesguanyang/open-agent-hubSkill1.0ktodayMITA116Claude Code