adding-dashboard-v2-custom-content

adding-dashboard-v2-custom-content is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 145 tokens per session (1,442 once invoked), scanned A, original, MIT.

A guide for putting a product's own React component inside a dashboard tile. React is a JavaScript library for building user-interface components.

In plain words
What is it for?
Use it for dashboard setup prompts, checklists, action lists, or controls that change dashboard filters rather than simply displaying query results.
Why use it?
It helps developers choose between a custom interactive panel and a chart, then place the component in the correct product package and configuration.

Skill for Claude CodeCodex

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

Good fit Use it for dashboard setup prompts, checklists, action lists, or controls that change dashboard filters rather than simply displaying query results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/adding-dashboard-v2-custom-content
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 adding-dashboard-v2-custom-content
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 adding-dashboard-v2-custom-content

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content/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 adding-dashboard-v2-custom-content

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,442 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.00145 $0.01442
Opus 5.5 $0.00058 $0.00577
Sonnet 5.5 $0.00029 $0.00288
Haiku 4.5 $0.00015 $0.00144

Measured yesterday against content hash 2c13d9a8a9d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adding-dashboard-v2-custom-content 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 yesterday.

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/adding-dashboard-v2-custom-content/SKILL.md · 65 lines

How it starts

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

Adding custom content to a dashboards v2 tile

A custom content is a product's own React component shown in a tile. The tile draws the frame (title, menu, error boundary), and the document saves only the content's name, such as { type: 'custom', config: { content: 'web-analytics/browser-filter' } }. Read products/dashboards_v2/.agents/composing.md ("Your own component in a tile") and .agents/primitives.md first.

Decide it is custom content

  • The component draws the result of a query as a chart, number or table: make it a chart kind instead, as composing.md describes in "Your own kind of chart". Charts get sample data, filters, image export and the chart menu for free.
  • It is not a query result, or it needs its own interaction, such as a setup prompt, a checklist, a list with actions or a control that changes the dashboard's filters: make it custom content.

Migrate a component

  1. Find or create the product's package. One per product, in that product's own folder, such as products/<name>/frontend/dashboard/<name>Contents.ts (use /placing-product-frontend-code when unsure). The namespace is the product's name in kebab case. It is saved in every document that uses the content, so pick it once and never rename it.

  2. Add the content with a short name.

    const BrowserFilter = lazy(() => import('./BrowserFilter').then((module) => ({ default: module.BrowserFilter })))
    
    export const webAnalyticsContents = defineContentPackage('web-analytics', {
      'browser-filter': { Component: BrowserFilter, size: { w: 8, h: 8, minW: 6, minH: 6 } },
    })
    

    Load the component with React.lazy, so code that only checks documents never loads it. The name is saved in documents too: renaming one breaks saved dashboards.

  3. Decide what the tile sets. A value that differs between two tiles of the same content, such as which service a list shows, is a prop: wrap the content in defineContent with a propsSchema (a z.strictObject), and the tile saves the values in config.props. The prop names are saved in documents, so renaming one breaks saved dashboards. Everything else is not a prop:

    • Data it loaded from its scene's props or logic comes from a logic keyed on what the component can read itself, such as the current team.
    • The dashboard's time range and filters come from FiltersContext.
    • A control that changes them uses the controller in FilterControlsContext, or useTimeFilter() for the time range. Each is missing when the dashboard has none, and useTimeFilter() is also missing when the document has no time filter, so disable the control with a disabledReason then.
    • Never read DashboardStateContext or a context from the page the component came from.
  4. Strip its own frame. Remove the component's card, border, padding that matches the card's, and its title. The tile draws them, and the tile's title holds the heading. Hide the tile header with parts: { header: false } when the content has its own, such as a callout.

  5. Fill the tile. The content gets the tile's height. A list or table scrolls inside itself, and nothing sets a fixed height. Pick size so the default tile shows the content without a scrollbar.

  6. Give it a Loading shaped like the content when it loads data, so an off-screen tile looks like itself. Left out, the tile shows the default loading state.

  7. Opt in only to what the product wants people to do. By default a content cannot be moved and has an empty menu.

    • movable: true lets a person drag, resize, move and remove the tile.
    • duplicable: true adds Duplicate to the tile's menu.
    • backgroundColor: true adds Background to the tile's menu, whatever menuActions returns. To color the tile from the component's own state instead, call useTileBackground(color) with a key of ACCENT_COLORS (panels/core/accentColors.ts) or any CSS color.
    • menuActions(actions, context) returns the built-in actions to show, such as actions.filter((action) => action.key === 'download'). Left out, the menu is empty.
    • keepMounted: true keeps the component mounted after it scrolls out of view. Set it when the component holds state a person would lose, such as a picked tab or a draft, and leave it out otherwise, because the tile then stays in memory.
    • showOnInteractiveOnly: true leaves the tile out of images and printed pages. Use it for prompts, buttons and live counters, which mean nothing in a snapshot.
  8. Register the package in the host's panel list, createCustomPanel({ packages: [webAnalyticsContents] }), and add the tile to the dashboard JSON. A product page passes only its own package: products never import another product's package.

Read the full file on GitHub · 65 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. yesterday Changed 2c13d9a8a9d0
  2. 2d ago Changed 3bb74024953a
  3. 5d ago First seen · 65 lines · 145 tokens per session scan A 50403c582000

Subscribe to this mod's changes

adding-dashboard-v2-custom-content is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 145 tokens to every session and 1,442 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-29.

Related

adding-dashboard-v2-custom-content compared with skills from other repositories

adding-dashboard-v2-custom-content next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
adding-dashboard-v2-custom-contentPostHog/posthog-fossSkill736todayMITA145Claude Code, Codex
chakra-ui-builderchakra-ui/chakra-uiSkill41ktodayMITA214Claude Code, Codex
tamagui-v6-configtamagui/tamaguiSkill14k3d agoMITA76Claude Code, Codex
tamagui-theme-generatortamagui/tamaguiSkill14k3d agoMITA48Claude Code, Codex
cobejsMengTo/SkillsSkill9.1ktodayMITA31Claude Code, Codex
frontend-ui-dark-tsmicrosoft/skillsSkill3.3ktodayMITA48Claude Code
stitch::react-componentsgoogle-labs-code/stitch-skillsSkill16ktodayApache-2.0A43Claude Code