adding-personhog-rpc
Skill by PostHog
Guides developers through adding a new gRPC RPC to PostHog's personhog-replica and personhog-router services. Covers eligibility checks, proto definitions, client generation, Rust implementation and tests.
Install adding-personhog-rpc
Built from the published package, never by AI.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/.agents/skills/adding-personhog-rpc ~/.claude/skills/adding-personhog-rpcRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/.agents/skills/adding-personhog-rpc ~/.gemini/antigravity-cli/skills/adding-personhog-rpcAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install adding-personhog-rpc in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill walks an AI assistant through adding a new RPC to personhog-replica and personhog-router, the PostHog services that serve person, distinct ID, group, group type mapping, cohort membership and feature flag hash key override data. It starts with an eligibility check. If the data is not in one of the listed tables, the RPC does not belong in personhog. It then covers designing the SQL query and validating it against indexes, writing the proto definition, generating Python and Node.js client stubs, and implementing the change in Rust.
The steps include the storage trait, postgres queries, service handler and router wiring. The skill also sets a rule that leader RPCs must be safe under at-least-once delivery. Verification uses cargo build and cargo test for the personhog crates. It is aimed at developers working in the PostHog repository who need to add a gRPC endpoint to personhog or move a Django ORM query into it.
Written from the project's SKILL.md and checked against it.
What it can do
- Eligibility checkConfirms the data lives in a table personhog serves before any RPC is added.
- Data access designPlans the SQL query and checks it against existing indexes to avoid sequential scans.
- Proto definitionAdds message types and matching RPC signatures to the service, replica and leader protos.
- Client generationGenerates Python and Node.js client stubs and updates the wrapper and test files.
- Rust storage layerAdds a storage trait method and a postgres query with timing metrics.
- Rust service handlerAdds the replica RPC handler and maps storage errors to gRPC status codes.
- Router wiringRegisters the method name in the router's KNOWN_METHODS list and updates mock services.
- Leader RPC safety rulesRequires leader RPCs to converge under redelivery or carry an operation identity.
- Verification stepsLists the cargo build and cargo test commands for the personhog crates.
What you need
- Access to the PostHog repository with the proto/, rust/ and nodejs/ directories
- Rust toolchain with cargo
- pnpm for the Node.js proto generation step
- bin/generate_personhog_proto.sh for Python stub generation
Try asking
- Walk me through adding a new group lookup RPC to personhog
- Check whether this Django ORM query can move to personhog
- Show me which files to change to add a leader RPC to personhog-router
Good to know
- Only data in the listed personhog tables can go through personhog
- Every new query must use an existing index, not a sequential scan
- Leader RPCs must be safe under at-least-once delivery
- Tonic trait mocks must be updated by hand because they have no default methods
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/adding-personhog-rpc/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/database-indexes.md9 KB -
references/proto-conventions.md4 KB
Alternatives to adding-personhog-rpc
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
adding-personhog-rpc: common questions
Which tables can personhog serve?
The source lists posthog_person, posthog_persondistinctid, posthog_group, posthog_grouptypemapping, posthog_cohortpeople, posthog_featureflaghashkeyoverride, posthog_personoverride and posthog_personlessdistinctid. Data outside these tables should not go through personhog.
What makes a leader RPC acceptable?
The operation must converge under redelivery, such as a read-only lookup, a re-appliable merge, a tombstone delete or a max-merge, or it must carry explicit operation identity. An unguarded increment or an append must not be added.
Does Rust need a separate generation step?
No. The source says tonic regenerates the Rust code on cargo build, but the new RPC must be implemented or the build fails.
How do I install adding-personhog-rpc?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is adding-personhog-rpc free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is adding-personhog-rpc safe to use?
It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to adding-personhog-rpc?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
