establishing-code-ownership

establishing-code-ownership is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 94 tokens per session (1,533 once invoked), scanned A, original, MIT.

A code-ownership lookup guide for finding which PostHog team is responsible for a file, folder, or part of the codebase.

In plain words
What is it for?
Use it to identify an owner for one or more paths, list files without an owner, or find all code assigned to a team.
Why use it?
It avoids manually interpreting ownership files and gives a consistent answer, including the file that determined it. This helps route reviews, bugs, and audits to the right team.

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 to identify an owner for one or more paths, list files without an owner, or find all code assigned to a team.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/establishing-code-ownership
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 establishing-code-ownership
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 establishing-code-ownership

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/establishing-code-ownership"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/establishing-code-ownership.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,533 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.00094 $0.01533
Opus 5.5 $0.00038 $0.00613
Sonnet 5.5 $0.00019 $0.00307
Haiku 4.5 $0.00009 $0.00153

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

Security

Grade A, and why

establishing-code-ownership 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/establishing-code-ownership/SKILL.md · 64 lines

How it starts

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

Establishing code ownership

Ownership is resolved by one tool — hogli owners:* — over distributed owners.yaml files. Don't re-parse the ownership files by hand; the resolver owns the semantics and is what CI enforces.

Fast path: hogli owners:*

Dev machines have flox/hogli, so shell straight to the resolver.

hogli owners:who posthog/hogql/printer.py    # who owns this path (+ the file that decided it)
hogli owners:resolve --json posthog/api/survey.py products/surveys/backend/api.py   # batch, JSON keyed by path
hogli owners:unowned                          # every tracked file with no owner (append a prefix to scope: `owners:unowned products/`)

owners:who prints the resolved owners, the status, the Slack channel, and source — the owners.yaml/product.yaml file that decided the answer. The channel comes from the root teams: registry entry for the primary owner, else a derived #<slug>; a path whose primary owner is an @handle has no channel. owners:resolve takes paths as arguments or newline-delimited on stdin, so you can pipe a file list: git ls-files posthog/hogql | hogli owners:resolve --json. No hogli/flox available? The dependency-light fallback needs only pyyaml: git ls-files posthog/hogql | PYTHONPATH=packages/owners-yaml python -m owners_yaml (stdin paths → the same JSON).

Resolution algorithm (what the resolver does)

For a path, it walks from the repo root down to the path collecting ownership files, then merges them nearest-file-wins:

  1. owners.yaml — the canonical, distributed source. Each directory can carry one. Fields (owners, status, inherit, per-path rules) fall through to the nearest ancestor unless overridden. inherit: false cuts the walk (Gerrit's set noparent) — nothing above it contributes. Within a file, every matching rule applies in order, and each replaces only the fields it sets. owners: null means unowned by design (exempt from the coverage check), distinct from a directory with no file at all (genuinely unowned). additions: names the owners of additions below a directory rather than the owners of the files in it (the consumer decides what counts as an addition); it never changes owners, and it adds up across the walk so a nested file cannot drop an ancestor's entry. sensitive: true marks paths where a small change matters (a CI baseline, an exemption list), so the reviewer assigner requests their owners for every change, whatever its size; it is nearest-wins like status, a product.yaml can set it too, and it never makes a review required.
  2. products/<name>/product.yaml — an accepted alias. The root owners.yaml enables this with alias_files: [product.yaml]. When a product dir has no owners.yaml, its product.yaml owners: list is read as the ownership for products/<name>/**, and its sensitive: flag applies to that tree too (every other product.yaml field is ignored). A dir with both files is a lint error; owners.yaml wins.
  3. .github/CODEOWNERS — blocking approvals, never part of the walk. It keeps GitHub-native semantics, stays hand-maintained (mostly infra, e.g. team-devex), and is enforced by GitHub itself. The resolver does not read it — when you need to know whether a blocking approval is additionally required, consult the file directly. team-security's entries in it mirror the master branch ruleset, and the ruleset is what enforces them. It never changes the resolved owners, and nothing here writes to it. A tool that can only read CODEOWNERS gets a generated projection of the map instead, from hogli owners:codeowners (see packages/owners-yaml/README.md); that projection covers test files and is never .github/CODEOWNERS.

Read the full file on GitHub · 64 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 41f1ae73b20c
  2. 10d ago Changed 7b103c5aeafa
  3. 1mo ago Changed f3ee76023b1a
  4. 2mo ago Changed 060fade50acd
  5. 2mo ago Changed dd6b2e3bc790
  6. 2mo ago Changed · +1 lines 0ffc2e8b1016
  7. 3mo ago First seen · 63 lines · 94 tokens per session scan A 9a99316f2012

Subscribe to this mod's changes

establishing-code-ownership is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 94 tokens to every session and 1,533 once invoked, about $0.0004 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-08-30.

Related

establishing-code-ownership compared with skills from other repositories

establishing-code-ownership next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
establishing-code-ownershipPostHog/posthog-fossSkill736todayMITA94Claude Code, Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k6d agoMITA21Claude Code