extending-personhog-test-harness

extending-personhog-test-harness is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 134 tokens per session (1,174 once invoked), scanned A, original, MIT.

A guide for adding failure scenarios to Personhog's end-to-end test harness, which runs the real multi-process system and checks that acknowledged writes remain readable and stored. Chaos scenarios deliberately introduce crashes, restarts, delays, or failovers.

In plain words
What is it for?
Use it after fixing a reproducible leader, router, writer, replica, or coordination bug, or when adding a new whole-system failure mode or correctness rule.
Why use it?
It turns reproducible production-style failures into permanent tests and checks correctness across the whole system, not just in isolated functions.

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 after fixing a reproducible leader, router, writer, replica, or coordination bug, or when adding a new whole-system failure mode or correctness rule.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/extending-personhog-test-harness
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 extending-personhog-test-harness
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 extending-personhog-test-harness

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/extending-personhog-test-harness"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/extending-personhog-test-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 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.00134 $0.01174
Opus 5 $0.00067 $0.00587
Sonnet 5 $0.00027 $0.00235
Haiku 4.5 $0.00013 $0.00117

Measured 7d ago against content hash 341675b0f304, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

extending-personhog-test-harness 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 7d 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/extending-personhog-test-harness/SKILL.md · 92 lines

How it starts

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

Extending the personhog test harness

The harness (rust/personhog-test-harness/, see its README for usage) spawns a real personhog stack and asserts one invariant three ways: every acked write is visible afterwards — live via read-your-write probers, at end-of-run via strong reads, and durably via Postgres at the acked version. It has caught real bugs (eviction data loss, unordered lifecycle shutdown, coordinator failover stalls) precisely because chaos scenarios run against those assertions.

When to add a scenario

Add one whenever you fix a personhog bug whose trigger the harness can reproduce — a crash, drain, restart, lag, election, or eviction condition. The fix's PR should show the scenario red before the fix and green after; that run becomes the permanent regression test. Also add one when introducing a new failure mode (a new process to disrupt, a new timing window) or a new correctness property (a new journal check).

Don't add scenarios for behavior already covered by an existing flag combination — compose existing flags instead — and don't add unit-testable logic here: the harness is for whole-stack behavior only.

Where things live

  • src/cli.rs — every scenario is driven by GateArgs flags.
  • src/scenarios/gate.rsChaosEvent enum, chaos_timeline() (offset-sorted events, paired stop/resume events), the dispatch loop, and verification ordering (probers → regressions → strong reads → Postgres quiesce).
  • src/stack/mod.rs — stack primitives: spawn/kill/restart leaders (SIGKILL, SIGTERM drain, SIGSTOP/SIGCONT zombie), writer crash/pause, coordinator kill, etcd lease revocation, per-service env. New disruptions are new methods here.
  • src/scenarios/merge.rs — the merge lane (--merge-concurrency): MergePersons calls with one or more sources (--merge-sources) against live persons while the other lanes write to them. Merged sources hang off the survivor in the journal tree and are retired from the shared src/pool.rs target pool.
  • src/state.rs — the acked-write journal and its verifiers. New invariants go here, and their decision tables get unit tests: a false-negative verifier looks identical to a healthy stack, so e2e runs cannot reveal it.
  • README.md — every scenario gets a runnable example; scenarios that stay red because of a known unfixed defect go in the "Known defects" section with their observable signature and fix direction.

Read the full file on GitHub · 92 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. 7d ago Changed · +4 lines 341675b0f304
  2. 11d ago First seen · 88 lines · 134 tokens per session scan A bc7c6ee1ded1

Subscribe to this mod's changes

extending-personhog-test-harness is a skill published in the GitHub repository PostHog/posthog-foss (715 stars, last pushed yesterday), licensed MIT. It adds 134 tokens to every session and 1,174 once invoked, about $0.0007 per session on Opus 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

Other skills, from other repositories

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens

pyats-dynamic-test

Generate and execute deterministic pyATS aetest validation scripts - interface state, OSPF neighbors, BGP paths, ping matrices, and custom compliance tests. Use when writing a network test, validating post-change state, running pass/fail checks, or building automated regression tests.

automateyournetwork/netclaw · 61 tokens

test-loop

Plan, generate, and heal an executable E2E test suite from approved acceptance criteria (web and mobile).

HoangNguyen0403/agent-skills-standard · 25 tokens

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens

322-frameworks-spring-boot-testing-integration-tests

Use when you need to write or improve integration tests — including Testcontainers with @ServiceConnection, @DataJdbcTest persistence slices, TestRestTemplate or MockMvcTester for HTTP, data isolation, and container lifecycle management for Spring Boot 4.0.x. This should trigger for requests such as Review Java code…

jabrena/plinth · 123 tokens