agentleFS
PostHogKnown publisherPostHog/posthog-foss/.agents/skills/managing-dashboards/SKILL.md

managing-dashboards

Skill721 starsChanged 59 days agoMITView on GitHub

Guides PostHog engineers through dashboard platform and scene changes. Use when changing Dashboard, DashboardTile, dashboardLogic, dashboard layouts, dashboard sharing or embeds, public dashboards, templates, filters, variables, refresh behavior, tile loading, dashboard lists, or dashboard permissions. Covers normal, shared, embedded, export, product-embedded, and template surfaces; RBAC; cache and query behavior; responsive layouts; and large or small dashboards. Use manage-dashboard-widgets instead for a widget_type or WidgetCard change.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 16 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for a dashboard change that affects the dashboard platform, dashboard scene, or an existing non-widget tile type.

    line 14
  2. Very specific:

    Use manage-dashboard-widgets for a new widget_type or a WidgetCard change.

    line 16
  3. Very specific:

    Before coding, decide the effect on each surface.

    line 27
  4. Distinctive:

    Read surfaces and ownership before you select files.

    line 37
  5. Distinctive:

    Do this before implementation for a new dashboard feature.

    line 41
  6. Distinctive:

    If the feature adds persisted state or relations, define migration, cleanup, and concurrent-edit behavior.

    line 51
  7. Distinctive:

    Check whether the user-facing API, setting, or workflow needs a documentation update.

    line 52
  8. Distinctive:

    Read feature lifecycle and rollout before you choose a persisted feature contract.

    line 54
  9. Distinctive:

    If templates apply, define scope, portability, copy semantics, and later edits.

    line 68
  10. Distinctive:

    Use this checklist as a design gate.

    line 72
  11. Distinctive:

    Keep dashboard and tile data team-scoped.

    line 88
  12. Distinctive:

    Update each placement deliberately.

    line 89
  13. Distinctive:

    Keep query work bounded. Do not turn dashboard load into unbounded tile queries or concurrent requests.

    line 91
  14. Distinctive:

    Keep grid updates stable during drag, resize, and tile refresh.

    line 92
  15. Distinctive:

    Add observability when a change creates a new loading, query, cache, access, or refresh path.

    line 93
  16. Distinctive:

    After a selector rename, search every dashboard consumer and test for the old name.

    line 95
  17. Distinctive:

    Keep dashboard mutation actions on the authenticated dashboard placement unless another placement has an explicit contract.

    line 96
  18. Distinctive:

    Run the focused tests for each edited layer.

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Managing dashboards

Use this skill for a dashboard change that affects the dashboard platform, dashboard scene, or an existing non-widget tile type.

Use manage-dashboard-widgets for a new widget_type or a WidgetCard change.

1. Route the request

RequestPrimary path
Dashboard metadata, tile lifecycle, filters, variables, refresh, list, or layoutThis skill
Public links, sharing settings, embeds, exports, or product-embedded dashboardsThis skill
Dashboard template creation, editing, scope, or copyingThis skill
New or changed widget_type, widget config, widget query, or WidgetCardmanage-dashboard-widgets

Before coding, decide the effect on each surface. Record affected, unaffected, or not applicable.

  • Authenticated dashboard
  • Public shared dashboard
  • Embedded dashboard
  • Exported dashboard
  • Product-embedded dashboard
  • Dashboard template
  • Dashboard list and project homepage, if the change changes metadata or visibility

Read surfaces and ownership before you select files.

2. Define feature intake and acceptance criteria

Do this before implementation for a new dashboard feature. Skip it for a narrow bug fix with an existing contract.

  1. State the user problem, intended actor, and explicit non-goals.
  2. State the feature action and its default behavior.
  3. State where the feature stores its state: dashboard, tile, request, user, URL, or a separate team-scoped resource.
  4. State the availability, read permission, and mutation permission.
  5. State behavior for new rows, existing rows, and invalid or absent state.
  6. State the acceptance criteria for allowed, denied, shared, and failure paths.
  7. State the expected query, cache, and database-write effect.
  8. State the metric or event that shows adoption, failure, or regression.
  9. If the feature adds persisted state or relations, define migration, cleanup, and concurrent-edit behavior.
  10. Check whether the user-facing API, setting, or workflow needs a documentation update.

Read feature lifecycle and rollout before you choose a persisted feature contract.

3. Define the change contract

State these decisions before implementation.

  1. Name the user action and the persisted data that changes.
  2. Name every placement that renders the affected UI.
  3. Define view, edit, and mutation permissions for each actor.
  4. Define shared and embedded behavior. Never assume the authenticated behavior is safe there.
  5. Define the result when the dashboard has zero, one, and hundreds of tiles.
  6. Define the result at narrow and wide widths.
  7. Define filter, variable, quick-filter, and tile-override precedence.
  8. Define cache, refresh, query, and failure behavior.
  9. If templates apply, define scope, portability, copy semantics, and later edits.
  10. Define lifecycle, API, streaming, quota, audit, and project-tree effects.
  11. For a new API, add MCP tools for its supported operations. Exclude an operation only with a documented reason. Record required scopes.

Use this checklist as a design gate. Read the linked reference when an item applies.

AreaCheck
AccessRBAC, sharing, and embeds
Filter stateFilters, variables, and tile overrides
Configuration editingDashboard configuration editing and URL overrides
Data and scaleQuerying, caching, and scale
Layout and templatesLayout, responsive behavior, and templates
Backend and operationsBackend contracts and operations
Feature lifecycleFeature lifecycle and rollout
New state or relationData models and collaboration

4. Implement across layers

  1. Change the product model, serializer, API action, and generated types together when the persisted contract changes.
  2. Keep dashboard and tile data team-scoped. Use the dashboard’s project context for every lookup and mutation.
  3. Update each placement deliberately. Do not hide a feature only in the frontend when the API still permits it.
  4. Preserve old rows and old layouts. Treat existing layout JSON and template payloads as versioned input.
  5. Keep query work bounded. Do not turn dashboard load into unbounded tile queries or concurrent requests.
  6. Keep grid updates stable during drag, resize, and tile refresh. Avoid a full grid relayout for each tile result.
  7. Add observability when a change creates a new loading, query, cache, access, or refresh path.
  8. For list-only state, render controls only where that state applies.
  9. After a selector rename, search every dashboard consumer and test for the old name. Then run TypeScript.
  10. Keep dashboard mutation actions on the authenticated dashboard placement unless another placement has an explicit contract.

5. Test the boundary, not only the happy path

Cover each affected boundary.

  • View versus edit access.
  • Authenticated, shared, embedded, and export rendering.
  • Public output contains no private metadata or live data that public viewers cannot access.
  • Cache hit, cache miss, stale result, forced refresh, query error, and request cancellation.
  • Empty dashboard, a single tile, and a dense dashboard.
  • Narrow layout, wide layout, drag, resize, insertion, duplication, and persisted layout reload.
  • Template scope, permissions, variable substitution, and project-specific references.
  • API schema and generated types after serializer changes.
  • Paginated list ordering, each page, and client continuation when the UI loads every result.
  • Filter and variable precedence, shared-token behavior, and quick-filter validation.
  • Soft-delete, restore, move, copy, and project-transfer behavior.
  • Streaming completion, disconnect, and individual tile failure behavior.
  • Resource limits, audit events, and subscription behavior.
  • Schema rollout, relation cleanup, concurrent edits, accessibility, and public content safety.

Run the focused tests for each edited layer. Then run the relevant checks from the verification guide.

6. Code map

ConcernStart here
Dashboard API, serializers, tile operations, insight and widget runnersproducts/dashboards/backend/api/dashboard.py
Dashboard model and tile modelproducts/dashboards/backend/models/dashboard.py, models/dashboard_tile.py
Sharing and collaborator routesproducts/dashboards/backend/routes.py
Templatesproducts/dashboards/backend/api/dashboard_templates.py, models/dashboard_templates.py
Main scene, state, refresh, and layout persistencefrontend/src/scenes/dashboard/Dashboard.tsx, dashboardLogic.tsx, DashboardItems.tsx
Layout geometry and tile size constraintsfrontend/src/scenes/dashboard/tileLayouts.ts, dashboardUtils.ts
Shared and export renderingfrontend/src/exporter/scenes/ExporterDashboardScene.tsx, frontend/src/exporter/Exporter.tsx
Refresh defaults and shared safety clampposthog/hogql_queries/refresh_policy.py
Resource transferposthog/models/resource_transfer/visitors/dashboard.py, dashboard_tile.py, dashboard_widget.py
MCP tool definitionsproducts/dashboards/mcp/tools.yaml

Companion skills

SkillUse when
manage-dashboard-widgetsChange a widget_type, its config, query, catalog, or WidgetCard
django-migrationsChange dashboard, tile, template, or widget schema
improving-drf-endpointsChange viewsets, serializer contracts, or OpenAPI output
adopting-generated-api-typesConsume changed generated dashboard API types
writing-kea-logicsChange dashboardLogic or another Kea logic
writing-testsDecide the lowest-cost regression test

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.