writing-ui-components

writing-ui-components is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 223 tokens per session (3,901 once invoked), scanned A, original, MIT.

A set of rules for structuring React components and other frontend files in PostHog. It covers where components belong, when to share them, and how views handle loading, empty, and error states.

In plain words
What is it for?
Use it when creating, moving, splitting, renaming, or reviewing React components, hooks, views, or other frontend modules.
Why use it?
It helps keep frontend code consistent and prevents unnecessary components, unclear file ownership, and incomplete data-loading states.

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 when creating, moving, splitting, renaming, or reviewing React components, hooks, views, or other frontend modules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/writing-ui-components
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 writing-ui-components
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 writing-ui-components

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/writing-ui-components"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/writing-ui-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 223 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,901 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00223 $0.03901
Opus 5.5 $0.00089 $0.01560
Sonnet 5.5 $0.00045 $0.00780
Haiku 4.5 $0.00022 $0.00390

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

Security

Grade A, and why

writing-ui-components 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 29d 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/writing-ui-components/SKILL.md · 258 lines

How it starts

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

Writing UI components

How UI code is structured: which file a component lives in, when duplication becomes a shared component, what a rename must sweep, and what every component renders before its data resolves. Applies to everything under frontend/src/ and products/*/frontend/.

Each section leads with its gate question. If you can answer the gate honestly, the details below it usually follow on their own.

Use this skill when

  • Creating a new component, scene, view, hook, or frontend module
  • Splitting or restructuring an existing component file, or moving one between folders
  • Extracting a repeated shape into a shared/generic component, or promoting one toward lib/
  • Renaming a frontend symbol, file, or feature vocabulary
  • Adding loading/empty/error handling to a view
  • Reviewing a PR that does any of the above

Companion rules (do not duplicate)

This skill owns structure. These own their own territory — link to them, don't restate them:

Survey precedent before you build

Gate: which existing scene or component are you modeling this on — and does that model itself follow these rules?

Read the full file on GitHub · 258 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 29d ago Changed 6341f5144c02
  2. 1mo ago Changed · +8 lines 987704b21894
  3. 1mo ago Changed fc5e82e0588b
  4. 1mo ago Changed · +1 lines 9816ebe519c6
  5. 1mo ago Changed · +4 lines 6c313f317395
  6. 2mo ago Changed · +7 lines 8d6f0cf50456
  7. 2mo ago Changed · +1 lines b141d206afd3
  8. 3mo ago First seen · 237 lines · 223 tokens per session scan A 56c1cc19ad0f

Subscribe to this mod's changes

writing-ui-components is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 223 tokens to every session and 3,901 once invoked, about $0.0009 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-09-03.

Related

writing-ui-components compared with skills from other repositories

writing-ui-components next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-ui-componentsPostHog/posthog-fossSkill736todayMITA223Claude 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