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.
npx skills add PostHog/posthog-foss --skill adding-dashboard-v2-custom-contentgit clone --depth 1 https://github.com/PostHog/posthog-fossWrote 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.
[](https://agentmods.dev/skills/posthog/posthog-foss/adding-dashboard-v2-custom-content)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.mddescribes 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
-
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-codewhen 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. -
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. -
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
defineContentwith apropsSchema(az.strictObject), and the tile saves the values inconfig.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, oruseTimeFilter()for the time range. Each is missing when the dashboard has none, anduseTimeFilter()is also missing when the document has no time filter, so disable the control with adisabledReasonthen. - Never read
DashboardStateContextor a context from the page the component came from.
-
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
titleholds the heading. Hide the tile header withparts: { header: false }when the content has its own, such as a callout. -
Fill the tile. The content gets the tile's height. A list or table scrolls inside itself, and nothing sets a fixed height. Pick
sizeso the default tile shows the content without a scrollbar. -
Give it a
Loadingshaped like the content when it loads data, so an off-screen tile looks like itself. Left out, the tile shows the default loading state. -
Opt in only to what the product wants people to do. By default a content cannot be moved and has an empty menu.
movable: truelets a person drag, resize, move and remove the tile.duplicable: trueadds Duplicate to the tile's menu.backgroundColor: trueadds Background to the tile's menu, whatevermenuActionsreturns. To color the tile from the component's own state instead, calluseTileBackground(color)with a key ofACCENT_COLORS(panels/core/accentColors.ts) or any CSS color.menuActions(actions, context)returns the built-in actions to show, such asactions.filter((action) => action.key === 'download'). Left out, the menu is empty.keepMounted: truekeeps 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: trueleaves the tile out of images and printed pages. Use it for prompts, buttons and live counters, which mean nothing in a snapshot.
-
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.
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.
- yesterday Changed 2c13d9a8a9d0
- 2d ago Changed 3bb74024953a
- 5d ago First seen · 65 lines · 145 tokens per session scan A 50403c582000
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.
adding-dashboard-v2-custom-content compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| adding-dashboard-v2-custom-contentPostHog/posthog-foss | Skill | 736 | today | MIT | A | 145 | Claude Code, Codex |
| chakra-ui-builderchakra-ui/chakra-ui | Skill | 41k | today | MIT | A | 214 | Claude Code, Codex |
| tamagui-v6-configtamagui/tamagui | Skill | 14k | 3d ago | MIT | A | 76 | Claude Code, Codex |
| tamagui-theme-generatortamagui/tamagui | Skill | 14k | 3d ago | MIT | A | 48 | Claude Code, Codex |
| cobejsMengTo/Skills | Skill | 9.1k | today | MIT | A | 31 | Claude Code, Codex |
| frontend-ui-dark-tsmicrosoft/skills | Skill | 3.3k | today | MIT | A | 48 | Claude Code |
| stitch::react-componentsgoogle-labs-code/stitch-skills | Skill | 16k | today | Apache-2.0 | A | 43 | Claude Code |