Adding Personhog Rpc
PostHog/posthog-foss
Guide for adding a new RPC to personhog-replica and personhog-router.
A skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…
$ npx skills add speakeasy-api/gram --skill feature-flag -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install speakeasy-api/gram feature-flag --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/feature-flag .claude/skills/feature-flag && rm -rf skills-srcUse ~/.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/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .claude/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flagType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add speakeasy-api/gram --skill feature-flag -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install speakeasy-api/gram feature-flag --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/feature-flag .agents/skills/feature-flag && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .agents/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add speakeasy-api/gram --skill feature-flag -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install speakeasy-api/gram feature-flag --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/feature-flag .cursor/skills/feature-flag && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .cursor/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/speakeasy-api/gram.git --path .agents/skills/feature-flag--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add speakeasy-api/gram --skill feature-flag -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install speakeasy-api/gram feature-flag --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/feature-flag .gemini/skills/feature-flag && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .gemini/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install speakeasy-api/gram feature-flagInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add speakeasy-api/gram --skill feature-flag -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/feature-flag .github/skills/feature-flag && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .github/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add speakeasy-api/gram --skill feature-flag -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install speakeasy-api/gram feature-flag --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/feature-flag .opencode/skills/feature-flag && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "feature-flag" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/feature-flag into .opencode/skills/feature-flag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "feature-flag", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
feature-flagA skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…
Feature Flag is an agent skill from speakeasy-api/gram. Use when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product feature or PostHog flag, or working out why a flag does not apply to an organization, project, or user.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs. It works with PostHog and PostgreSQL. The repository describes itself as: Securely scale AI usage across your organization. A single stack to Connect, Secure, Observe and Distribute agents, MCPs, and Skills within your company. The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit 4d32da1. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
miseFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Feature Flag loads about 2.6k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 883 words of instructions outside code blocks.
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.
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); files beside SKILL.md are not scanned.
The full file from speakeasy-api/gram at commit 4d32da1, republished under its AGPL-3.0 licence (© speakeasy-api). 883 words, ~2,615 tokens.
.claude/skills/feature-flag/SKILL.md (or your agent's skills folder).Gram has two distinct feature-gating mechanisms. They are not interchangeable — pick based on the semantics of the flag, not on convenience.
productfeatures | PostHog feature flags | |
|---|---|---|
| Scope | Per-organization | Per-organization, per-project, or per-user |
| Who controls it | Org admins (dashboard) or Speakeasy ops | Engineering (PostHog console) |
| Persistence | PostgreSQL (organization_features table) | PostHog platform |
| Direction | Permanent capability toggle; maps to entitlements | Temporary rollout gate; removed once GA |
| Example use | "This org has SSO" / "This org was sold Risk" | "Dogfood this UI change with our org" |
| Frontend | useProductFeatures() hook | useFeatureFlag() hook |
Use
productfeatureswhen the toggle represents a durable, org-level capability that admins control or that maps to what the customer purchased (entitlement). Think: GCP's per-project API enablement.Use PostHog flags when you're rolling something out gradually, dogfooding a change internally, or need per-user granularity. The flag is expected to disappear once the feature ships to everyone.
productfeaturesserver/internal/productfeatures/features.go as typed string constants (Feature type).organization_features (PostgreSQL). Soft-deletes track removal.productfeatures.Client checks Redis first (15 min TTL), falls back to Postgres, and returns errors on lookup failures — use PlatformFeatureCheck when you want silent false-on-error degradation./rpc/productFeatures.get and /rpc/productFeatures.set) exposes the state to the dashboard and Speakeasy ops.1. Declare the constant in server/internal/productfeatures/features.go:
const (
FeatureMyNewFeature Feature = "my_new_feature"
)2. Add it to the Goa design in server/design/shared/productfeatures.go:
// In the setProductFeature method's Enum constraint:
Enum("logs", "tool_io_logs", ..., "my_new_feature")
// In the getProductFeatures Result:
Attribute("my_new_feature_enabled", Boolean, "Whether my new feature is enabled")3. Wire the result in server/internal/productfeatures/snapshot.go:
MyNewFeatureEnabled: isEnabled(FeatureMyNewFeature),4. Regenerate with mise run gen:goa-server (Goa codegen updates gen/).
// inject *productfeatures.Client — it's already wired in cmd/gram/start.go
enabled, err := pf.IsFeatureEnabled(ctx, organizationID, productfeatures.FeatureMyNewFeature)
if err != nil {
return fmt.Errorf("check my_new_feature: %w", err)
}Use PlatformFeatureCheck (returns bool, logs errors, degrades to false) only in non-critical paths where you want silent degradation.
const { data: features } = useProductFeatures();
if (features?.myNewFeatureEnabled) { ... }Flag constants in server/internal/feature/flags.go. The constant's comment is the one place per flag that records where it is evaluated (server, dashboard, or both) and how it is targeted.feature.Provider (inject it; tests use feature.InMemory). The dashboard uses useFeatureFlag().distinctID is the organization ID and groups is feature.OrgProjectGroups(orgSlug, projectSlug): the organization group keyed by org slug and the slug group keyed by <org>/<project>, the same groups the dashboard registers.In production the SDK caches flag definitions (polled every minute) and evaluates locally, calling PostHog only for conditions it cannot decide from the distinct ID and group keys the server passes; IsFlagEnabledLocal never calls out and adds person properties. Expect up to a minute for a flip to land, stale definitions during an outage, and an Unable to compute flag locally (<key>) debug line whenever a condition needs data the server does not send.
In the PostHog condition set, match by the organization group type and target "organization key is one of ..." (stored as $group_key); use the slug group key for project scope. Never target a group property such as organization_slug, a cohort, or person properties, except person properties a caller supplies through IsFlagEnabledLocal: the server otherwise passes group keys only, so those conditions call PostHog on every evaluation and miss most orgs, in the dashboard too.
| Call | Returns | Use when |
|---|---|---|
IsFlagEnabled(ctx, flag, distinctID, groups) | bool, error | Plain rollout gate; cannot tell unavailable from off, so handle err |
feature.EvaluateFlag(ctx, provider, flag, distinctID, groups) | Evaluation, error | Gates that fail closed; missing key, disabled provider, or error is Indeterminate |
feature.FlagVariant(ctx, provider, flag, distinctID, groups) | Variant, error | Multivariate flags; map "" or an error to the pre-rollout behaviour |
FlagPayload(ctx, flag, distinctID, groups) | []byte, error | The flag carries config (e.g. a version pin); nil or an error means no clearance |
IsFlagEnabledLocal(ctx, flag, distinctID, groups, personProperties) | bool, error | Hot paths that must never call PostHog; inconclusive reads as false |
Fail closed: treat Indeterminate and errors as "unavailable", never as an explicit off, and never let a flag stand in for RBAC or an entitlement.
1. Declare the constant in server/internal/feature/flags.go with a comment saying where it is evaluated and how it is targeted:
const (
// FlagMyNewFeature gates X. Evaluated server-side; targeted by PostHog
// organization group (org slug). Fails closed. Removed once X is GA.
FlagMyNewFeature Flag = "my-new-feature" // must match the key in PostHog
)2. Create the flag in PostHog before the gating code merges; a missing key evaluates as Indeterminate and the gate stays closed. Write the description like gram-budgets (org-scoped) or risk-async-scan-shadow (person-property, local-only): what it gates, where it is evaluated, how it is targeted, fail-closed behaviour.
3. Verify the condition with evaluation reasons (Feature flag → Evaluation reasons, or the feature-flags-evaluation-reasons-retrieve MCP tool) using groups={"organization": "<slug>"} for at least one target org and expect condition_match.
4. Check at runtime by injecting feature.Provider:
groups := feature.OrgProjectGroups(authCtx.OrganizationSlug, "")
evaluation, err := feature.EvaluateFlag(ctx, s.features, feature.FlagMyNewFeature, authCtx.ActiveOrganizationID, groups)
if err != nil {
s.logger.WarnContext(ctx, "evaluate my-new-feature flag", attr.SlogError(err))
}
if evaluation != feature.EvaluationEnabled { // Disabled and Indeterminate both fail closed
return oops.C(oops.CodeNotFound)
}Use the typed useFeatureFlag() hook from client/dashboard/src/hooks/useFeatureFlag.ts and register keys in FEATURE_FLAGS (client/dashboard/src/lib/featureFlags.ts); never import PostHog hooks directly:
const assistants = useFeatureFlag(FEATURE_FLAGS.assistants);
if (assistants.status === "loading") return null;
if (assistants.status === "missing" || assistants.status === "error") {
return <FeatureUnavailable />;
}
const assistantsEnabled = assistants.status === "enabled";The hook stays reactive as PostHog reloads flags. On localhost, the development telemetry provider reports every flag as enabled. PostHog flags control rollout UI only, never authorization or entitlement enforcement.
productfeatures for a temporary dogfood gate. It creates API surface (getProductFeatures result field, Goa enum) that must be maintained indefinitely.productfeatures so org admins and billing can manage them.feature/flags.go.feature.Provider interface so tests can inject a noop.© speakeasy-api, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/feature-flag of speakeasy-api/gram.
Open the folder on GitHubat commit 4d32da1
Feature Flag 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Feature Flag this skillspeakeasy-api/gram | 272 | — | ~2.6k | Automated safety check: Pass | AGPL-3.0 | |
| Adding Personhog RpcPostHog/posthog-foss | 721 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Django MigrationsPostHog/posthog-foss | 721 | — | ~5k | Automated safety check: Pass | MIT | |
| Profiling Slow API EndpointsPostHog/posthog-foss | 721 | — | ~1k | Automated safety check: Pass | MIT | |
| Prod TelemetryUsefulSoftwareCo/executor | 4.1k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Adding Warehouse Person PropertiesPostHog/posthog-foss | 721 | — | ~2.9k | Automated safety check: Pass | MIT |
PostHog/posthog-foss
Guide for adding a new RPC to personhog-replica and personhog-router.
PostHog/posthog-foss
Django migration patterns and safety workflow for PostHog. An agent skill from PostHog/posthog-foss.
PostHog/posthog-foss
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
UsefulSoftwareCo/executor
Query Executor's production telemetry — Axiom traces (executor-cloud dataset), prod Postgres via PlanetScale, PostHog product analytics — through the Executor MCP.
PostHog/posthog-foss
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties already work: feature flag targeting…
PostHog/posthog-foss
Guides safe changes to the TaxonomicFilter, PostHog's picker for events, actions, properties, cohorts, and more.
speakeasy-api/gram
A skill your agent uses when automating the Gram dashboard in a browser, capturing screenshots, inspecting pages.
speakeasy-api/gram
A skill your agent uses when adding, changing, restyling, reviewing, validating, or previewing a Gram/Speakeasy transactional email, in Go or in LMX/MJML — a template<name.go, a TemplateKey…
speakeasy-api/gram
A skill your agent uses when adding, changing, or styling UI in client/admin (the Gram admin dashboard) that touches shadcn/ui — a button, dialog, table, sidebar, badge, select, tabs, tooltip, card…
speakeasy-api/gram
A skill your agent uses when adding, editing, reviewing, testing, or locating a reviewed skill distributed with the Platform MCP plugin; triggers include "Platform MCP skill", "platformmcpskills"…
speakeasy-api/gram
A skill your agent uses when changing or reviewing Gram ClickHouse schemas, migrations, queries, inserts, access principals, bootstrap SQL, Cloud compatibility, partial migration failures, or…
speakeasy-api/gram
How to build and run GCP Pub/Sub stream subscribers in Python under pystreams/ — the multi command (start at pystreams/src/pystreams/cmd/multi.py), the graminfra.pubsub publisher/subscriber library…
Works with
Categories
A skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…. Feature Flag is an agent skill from speakeasy-api/gram. Use when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product feature or PostHog flag, or working out why a flag does not apply to an organization, project, or user.
Feature Flag fits situations like: gating a feature behind a flag; gradually rolling out a change; choosing between productfeatures and PostHog feature flags; checking a product feature.
Run `npx skills add speakeasy-api/gram --skill feature-flag -a claude-code`. Or copy the skill folder (.agents/skills/feature-flag in speakeasy-api/gram) into .claude/skills/feature-flag in your project. Claude Code loads it when a task matches its description.
Run `npx skills add speakeasy-api/gram --skill feature-flag -a codex`. Or copy the skill folder (.agents/skills/feature-flag in speakeasy-api/gram) into .agents/skills/feature-flag in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add speakeasy-api/gram --skill feature-flag -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/feature-flag, .gemini/skills/feature-flag, .github/skills/feature-flag and .opencode/skills/feature-flag in your project.
Going by SKILL.md and its folder, Feature Flag needs the command-line tools its instructions call (mise).
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.
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. Review the folder before installing.
Feature Flag is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Feature Flag: Adding Personhog Rpc (PostHog/posthog-foss, 721 stars), Django Migrations (PostHog/posthog-foss, 721 stars), Profiling Slow API Endpoints (PostHog/posthog-foss, 721 stars) and Prod Telemetry (UsefulSoftwareCo/executor, 4.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
speakeasy-api (a GitHub organization) maintains it in speakeasy-api/gram, which has 272 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 7, 2026.
Source: speakeasy-api/gram on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.