mcpbeat Sign in

Manage Dashboard Widgets Agent Skill

> Guides PostHog engineers through dashboard widget platform work — ship a new widget_type (WIDGET_REGISTRY, catalog, run_widgets, WidgetCard) or update a shipped type (config, query, layout, RBAC, tile filter bar, list footer, titleHref, throttles). error_tracking_list, session_replay_list, widgetFilters, formatWidgetListCountFooter, widget_query_throttle, or WidgetCard composition. New types need widget-intake confirmation first. Not for MCP batch-add of existing types or adding tiles to a dashboard.

39k tokens
context cost
the whole folder, loaded on every use
13
files
instructions only
0
copies elsewhere
how many repositories repackaged it
690
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/PostHog/posthog --skill manage-dashboard-widgets

What comes with it

146 228 bytes besides the instruction
references/architecture.md
references/availability-and-gating.md
references/checklist-new-widget-type.md
references/composition.md
references/config-and-codegen.md
references/layout-and-ux.md
references/list-widget-patterns.md
references/managing-existing-widgets.md
references/mcp.md
references/permissions-and-sharing.md
references/skill-maintenance.md
references/widget-intake.md

The instruction itself

10 sections, as written by the author

Managing dashboard widgets

For PostHog engineers working on dashboard widget tiles in the repo.

Human overview: products/dashboards/CONTRIBUTING.md

In scope: widget tiles (widget_id on DashboardTile) — ship new types or change shipped types.

Out of scope: adding an existing type to a dashboard (MCP dashboard-widget-catalog-listdashboard-widgets-batch-add); insight tiles, text cards, button tiles.

1. Route first

| Request | Path | Start here |

| ---------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- |

| New widget_type that does not exist | Ship | §2 Ship a new type — intake mandatory |

| Change a shipped type (config, query, UI, layout, RBAC, deprecate) | Update | §3 Update a shipped type — skip intake |

| Add existing type to a dashboard | — | MCP only — not this skill |

| Chart / trend / graph for product metrics on a dashboard | — | Insight tile — architecture.md § Charts |

Shipped types (code truth): architecture.md § Shipped types.

2. Ship a new widget_type

Intake — ask before coding

Mandatory for new types only. Read widget-intake.md and:

  • Discover product UI in the repo — concrete components/scenes before generic tile-body questions.
  • Apply defaults and inference (groupId, copy spine, list UX) — never AskQuestion banned topics.
  • Resolve ambiguity — one batched follow-up for gaps, max 6 questions (open fields).
  • Post the spec table; get confirmation before checklist §1.

Execute

After spec confirmation → checklist-new-widget-type.md §1 → §8. §5b (dedicated stories — required before the PR, not a follow-up) is sequenced once MVP tests are green.

3. Update a shipped type

Skip intake. Identify the type from the request or EXPECTED_WIDGET_TYPES in widget_registry.py.

  • Read managing-existing-widgets.md — "What kind of change?" routing table for primary files.
  • Confirm: which type, what changes, backward-compatible config migration?
  • Follow linked references from that table — do not re-read the new-type checklist.

Cannot change in place: widget_type string on existing rows; stored w/h when catalog defaults change.

New visualization kind = ship (§2). Chart-primary = insight tile (architecture.md § Charts).

4. Platform invariants

Both paths:

  • RBAC registry-driven — no widget_type branches in dashboard.py. permissions-and-sharing.md § Product RBAC
  • One widget_type everywhere — registries + both catalogs + FE registry; variants share groupId only.
  • Per-type code in product paths — not platform shells. architecture.md § Platform files
  • WidgetCard compound pattern — composition.md
  • Config contract = Pydantic SSOTwidget_specs/configs.py + WidgetSpec in registry.py; hogli build:openapi for OpenAPI/FE Zod/MCP. Runtime PATCH stays JSONField. See config-and-codegen.md.
  • No chart-primary widgets — architecture.md § Charts

New widget_type strings need no migration — register registries + catalogs only.

5. Companion skills

| Skill | When |

| ------------------------------ | ------------------------------------------------------------------------------- |

| improving-drf-endpoints | dashboard @extend_schema (config serializers auto-derive from WIDGET_SPECS) |

| writing-kea-logics | edit*WidgetModalLogic.ts or dashboardLogic.tsx |

| django-migrations | DashboardWidget / DashboardTile schema only |

| adopting-generated-api-types | Tile PATCH in frontend/utils.ts |

6. Verify

MVP smoke (renders + core tests — not a ship point):

hogli test products/dashboards/backend/api/test/test_run_widgets.py
hogli test products/dashboards/backend/api/test/test_dashboard_widgets.py
hogli test products/dashboards/frontend/widgets/registry.test.tsx

Ship gate (required before the PR): checklist §8 + hogli build:openapi + dedicated Storybook stories per checklist §5b (component + edit modal — required, not just the catalog overview).

Config SSOT changes (also run after widget_specs/ edits):

hogli test products/dashboards/backend/api/test/test_widget_config_schema_parity.py
hogli test products/dashboards/frontend/widgets/widgetConfigSchemaParity.test.ts
hogli test products/dashboards/backend/api/test/test_widget_openapi_enums.py   # new widget_type only

Update: tests for layers touched — at minimum test_run_widgets.py if BE changed, products/dashboards/frontend/widgets/ if FE changed, hogli build:openapi if config OpenAPI changed. See managing-existing-widgets.md routing table Also check column.

Reference appendix

| Topic | Doc |

| -------------------------- | --------------------------------------------------------------------------------- |

| Intake (new types only) | widget-intake.md — canonical defaults + spec recap |

| New type checklist | checklist-new-widget-type.md |

| Update shipped type | managing-existing-widgets.md |

| Architecture | architecture.md — file map, invariants |

| Config + codegen | config-and-codegen.md |

| WidgetCard / edit modal | composition.md |

| List footer / tile filters | list-widget-patterns.md |

| Tile min/max | layout-and-ux.md |

| RBAC / sharing | permissions-and-sharing.md |

| Setup gates | availability-and-gating.md |

| MCP after ship | mcp.md |

| Skill doc maintenance | skill-maintenance.md |

Other skills for the same job

different authors, same section of the catalogue
XLSX
by anthropics
vendor ×15

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

5k tokens scripts
XLSX
by w95
×7

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

3k tokens
Raffle Winner Picker
by frostant
×5

Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.

949 tokens
Fda Database
by christophacham
×4

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

32k tokens scripts
Matlab
by christophacham
×4

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.

25k tokens
Umap Learn
by ComeOnOliver
×4

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

14k tokens
D3 Viz
by chrisvoncsefalvay
×3

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.

20k tokens
Alphafold Database
by christophacham
×3

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

7k tokens

How to use it

Copy the folder

Take posthog/manage-dashboard-widgets from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.