Official agent skill

Placing Product Frontend Code

by PostHog in PostHog/posthog-foss

Decide which tree a frontend file belongs in — products/<name/frontend/ or frontend/src/scenes/<name/ — and explain why the boundary is real rather than stylistic.

OfficialMITAuto-check passedFrontend & Design

Install Placing Product Frontend Code

skills CLI
$ npx skills add PostHog/posthog-foss --skill placing-product-frontend-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/posthog-foss placing-product-frontend-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/placing-product-frontend-code .claude/skills/placing-product-frontend-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
placing-product-frontend-code
GitHub stars
721
Token cost
~1.3k tokens
SKILL.md length
458 words
Files
2 (incl. scripts)
Skills in repo
213
Repo updated
First seen
Licence
MIT

At a glance

Decide which tree a frontend file belongs in — products/<name/frontend/ or frontend/src/scenes/<name/ — and explain why the boundary is real rather than stylistic.

  • Adding a new scene
  • SKILL.md covers Deciding where a file goes, Why the directory is a real… and Related
  • Runs Python scripts from its folder; calls python3
  • Logic file for a product

What it does

Placing Product Frontend Code is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Decide which tree a frontend file belongs in — products/<name/frontend/ or frontend/src/scenes/<name/ — and explain why the boundary is real rather than stylistic. Use when adding a new scene, component, or logic file for a product; when creating a new directory under frontend/src/scenes/; when a product has UI in both trees and you need to know which side to extend; or when moving a scene into its product. Covers the merge-queue lane cost of the split, the measurement showing a dependency graph cannot substitute…

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/scene_product_split.py`).

It sits in Frontend & Design. The repository describes itself as: PostHog FOSS is a read-only mirror of PostHog, with all proprietary code removed. NOTE: This repo is synced automatically from the main PostHog repo. Please raise any issues and… The licence is MIT.

When your agent uses it

  • Adding a new scene
  • Logic file for a product
  • Creating a new directory under frontend/src/scenes/
  • A product has UI in both trees and you need to know which side to extend

Example prompts

  • “/placing-product-frontend-code”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 2c48221. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Placing Product Frontend Code loads about 1.3k tokens when it runs. Until then it costs about 162 tokens; SKILL.md has 458 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~162
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from PostHog/posthog-foss at commit 2c48221, republished under its MIT licence (© PostHog). 458 words, ~1,273 tokens.

Download SKILL.mdSave it as .claude/skills/placing-product-frontend-code/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
placing-product-frontend-code
description
Decide which tree a frontend file belongs in — `products/<name>/frontend/` or `frontend/src/scenes/<name>/` — and explain why the boundary is real rather than stylistic. Use when adding a new scene, component, or logic file for a product; when creating a new directory under `frontend/src/scenes/`; when a product has UI in both trees and you need to know which side to extend; or when moving a scene into its product. Covers the merge-queue lane cost of the split, the measurement showing a dependency graph cannot substitute for the path signal, and a report script that shows how far each product's move has gone.

Placing product frontend code

A product's UI belongs in products/<name>/frontend/, not frontend/src/scenes/<name>/.

About 18 products still have UI in both trees, so "there's already a folder in scenes/" is not evidence that a new file belongs there. Check before you add.

sh
# Where does one directory stand?
python3 .agents/skills/placing-product-frontend-code/scripts/scene_product_split.py data-warehouse

# Every scene dir with a product counterpart, most migrated first
python3 .agents/skills/placing-product-frontend-code/scripts/scene_product_split.py

The script is advisory and read-only — no baseline, no exit code to satisfy. It counts hand-written .ts/.tsx on each side, skipping generated/ (orval writes those, so they are not migration progress).

Deciding where a file goes

SituationWhere it goes
products/<name>/frontend/ holds as much or more than scenes/<name>/products/<name>/frontend/ — the scenes copy is a remnant
The move is under way but earlyproducts/<name>/frontend/, and move the files the new code touches if that is cheap
products/<name>/ exists, no scenes/<name>/ yetproducts/<name>/frontend/ — never create the scenes directory
No product directory at all, and the feature is product-shapedBootstrap the product: bin/hogli product:bootstrap <name>, see products/README.md
App-level scene — settings, onboarding, billing, max, error-tracking shellsfrontend/src/scenes/ is correct; these have nowhere else to go

The last row is the reason this is a skill and not a lint rule: deciding whether a new directory is a product or an app-level scene is a judgment call, and a check script that guesses gets it wrong on onboarding and settings.

Migrating an existing scene wholesale is welcome and is the point of the convention. Expect that PR to report every merge-queue target once, because scenes register in products/<name>/manifest.tsx — a one-time cost per migration.

Show full SKILL.md (219 more words)Show less

Why the directory is a real boundary

.github/scripts/trunk-impacted-targets.js assigns merge-queue lanes by path.

  • A change anywhere under frontend/ reports fe:core plus every fe:product:* target, so it serializes against every other frontend PR in the queue.
  • A change confined to products/<name>/frontend/ reports one target.

The obvious fix — narrow lanes with a frontend dependency graph instead of paths — was measured and does not work. A static import graph over the frontend (8430 files, 43924 edges) puts 2226 modules in a single strongly connected component, 27% of the graph, spanning 31 products. Every member of an SCC has identical reverse-reachability by definition, so reverse-reachability from any file under frontend/src reaches 73 of 79 products — a leaf tab component five levels into the replay player gives the byte-identical answer to types.ts. Cutting all 498 lib/** → scenes|products back-edges moved it from 6918 to 6909 modules: hundreds of redundant cycles, not one bad edge.

bin/find-affected-stories already concedes the same thing by listing frontend/src/lib/ as a full-run invalidator.

So path is the only signal that discriminates, and moving files is the only thing that narrows a lane. Note what this does and does not buy: merge-queue parallelism, not decoupling — the import graph stays as tangled as it was.

© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in .agents/skills/placing-product-frontend-code of PostHog/posthog-foss.

  • SKILL.md
  • scripts/scene_product_split.py

Open the folder on GitHubat commit 2c48221

Compare with similar skills

Placing Product Frontend Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Placing Product Frontend Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Placing Product Frontend Code this skillPostHog/posthog-foss721—~1.3kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
React Doctormakeplane/plane60k12 repos~657Automated safety check: PassAGPL-3.0
React Composition Patternsvercel-labs/openreview1.7k58 repos~721Automated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    60k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • React Composition Patterns

    vercel-labs/openreview

    Official

    Rules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes.

    1.7k GitHub starsUsed in 58 repos~721 tokens
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from PostHog/posthog-foss

All 213 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog-foss

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    721 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Autoresolving PR Conflicts

    PostHog/posthog-foss

    Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    721 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    721 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog-foss

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    721 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog-foss

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    721 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog-foss

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    721 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Placing Product Frontend Code

What does Placing Product Frontend Code do?

Decide which tree a frontend file belongs in — products/<name/frontend/ or frontend/src/scenes/<name/ — and explain why the boundary is real rather than stylistic. Placing Product Frontend Code is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Decide which tree a frontend file belongs in — products/<name/frontend/ or frontend/src/scenes/<name/ — and explain why the boundary is real rather than stylistic.

When should I use Placing Product Frontend Code?

Placing Product Frontend Code fits situations like: adding a new scene; logic file for a product; creating a new directory under frontend/src/scenes/; A product has UI in both trees and you need to know which side to extend.

How do I install Placing Product Frontend Code in Claude Code?

Run `npx skills add PostHog/posthog-foss --skill placing-product-frontend-code -a claude-code`. Or copy the skill folder (.agents/skills/placing-product-frontend-code in PostHog/posthog-foss) into .claude/skills/placing-product-frontend-code in your project. Claude Code loads it when a task matches its description.

How do I install Placing Product Frontend Code in Codex?

Run `npx skills add PostHog/posthog-foss --skill placing-product-frontend-code -a codex`. Or copy the skill folder (.agents/skills/placing-product-frontend-code in PostHog/posthog-foss) into .agents/skills/placing-product-frontend-code in your project. Codex loads it when a task matches its description.

Can I use Placing Product Frontend Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog-foss --skill placing-product-frontend-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/placing-product-frontend-code, .gemini/skills/placing-product-frontend-code, .github/skills/placing-product-frontend-code and .opencode/skills/placing-product-frontend-code in your project.

What does Placing Product Frontend Code need to run?

Going by SKILL.md and its folder, Placing Product Frontend Code needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Placing Product Frontend Code access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Placing Product Frontend Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Placing Product Frontend Code use?

Placing Product Frontend Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Placing Product Frontend Code use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Placing Product Frontend Code?

Skills that share tags, products or a category with Placing Product Frontend Code: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 60k stars), React Composition Patterns (vercel-labs/openreview, 1.7k stars) and Impeccable (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Placing Product Frontend Code?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog-foss, which has 721 GitHub stars. The repository holds 213 skills in this directory. The repository was last updated on October 7, 2026.

Source: PostHog/posthog-foss on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.