skills/managing-endpoint-versions/SKILL.md
Work safely with endpoint versions — preview a draft in the playground, roll back to an older version, update settings on one version without bumping query history, deactivate a specific version. Use when the user asks "how do I roll back my endpoint", "preview my changes before publishing", "I want to fix v5 without bumping the version", or anything involving the version history. Calls out today's limitations honestly: there is no pointer flip; "rollback" means forking the old query into a new top version.
npx skillsauth add posthog/ai-plugin managing-endpoint-versionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill is the practical guide to endpoint versioning. It covers the today-workflow, which has some sharp edges worth being explicit about.
data_freshness_seconds on a specific version?"| Behaviour | Reality |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
| Query change | Auto-cuts a new version. Saving any edit to the query creates a new version and bumps the current version number |
| Settings change (description, data_freshness_seconds, materialisation) | Does not cut a new version. Updates the targeted version in place |
| The "current" version | Always the highest version number — it's not a pointer you can move backwards |
| Calling without ?version=N | Runs the latest version. So unpinned callers always hit the newest |
| Disabling the whole endpoint | endpoint-update with is_active: false (no version) takes every version offline at once |
| Disabling a single version | endpoint-update with version + is_active: false retires one version without affecting the others |
The model is forward-only. There is no "make v3 the default again" operation today. Practically
this means "rollback" requires either creating a new top version that re-uses the old query, or
pinning callers to ?version=N.
| Tool | Purpose |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| endpoint-versions | List all versions for an endpoint, latest first |
| endpoint-get | Full config; supports ?version=N to fetch a specific version |
| endpoint-update | The workhorse — supports version body param to target a specific version |
| endpoint-run | Execute a version directly via ?version=N (without affecting which version other callers hit) |
There is no "draft" concept in the model. Editing the query commits it as a new version immediately. To preview safely:
execute-sql tool (or the SQL editor) — not on the live endpointendpoint-run with ?version=N to confirm the new version returns what you expectIf the user needs a true staging endpoint, the only workaround today is a sibling endpoint
with a _v2 or _staging suffix. Document this honestly — there is no in-product staging path.
The forward-only model means "rollback" requires forking:
endpoint-versions to find the version with the good query (say v3)endpoint-get with ?version=3 to retrieve that version's query JSONendpoint-update with the v3 query as the new query — this creates a new version (e.g.
v6) with the same query as v3?version=N now hit v6 (== v3's query)The old version (v5, the broken one) still exists and is still callable via ?version=5 until
explicitly deactivated.
Faster mitigation if you can change every caller: have them pin to ?version=3 until a real
fix is ready. Lower-impact than cutting a new version.
endpoint-update accepts a version field in the body. When set, settings updates apply to
that version only — they do not cut a new version. Useful when:
data_freshness_seconds on an old version that some callers still pin toImportant: passing query together with version is rejected — query changes always cut a new
top version, never modify history. The version arg only affects settings.
To take v3 out of service while keeping v4 and v5 callable:
endpoint-update {name: "...", version: 3, is_active: false}
This sets is_active: false on v3 only. Callers pinned to ?version=3 start getting an error;
other callers are unaffected.
To re-enable: same call with is_active: true.
The whole-endpoint is_active field (without version) is a separate switch — it disables
every version at once. Use the version-scoped form for surgical takedowns.
Old versions accumulate over time. To find which are dead, call endpoint-versions and read each
version's last_executed_at: a version that's null or long stale hasn't been called recently.
Materialised dead versions are the costly ones — disable their materialisation with
endpoint-update + version + is_materialized: false, and deactivate with is_active: false
to signal they're retired.
Confirm with the user before retiring a version: last_executed_at counts only personal-API-key
calls and is recorded only for runs since that tracking was added (so a used version can still
read null), and a caller may be pinned to ?version=N. The full audit flow lives in
auditing-endpoints.
User: "I shipped a broken query last night, v5. How do I roll back?"
Agent:
- endpoint-versions <name> → v5 (latest), v4, v3, v2, v1
- endpoint-get <name> ?version=4 → query JSON for v4
- "Rolling back means creating v6 with v4's query. v5 stays as a
historical version but nobody hits it unless they explicitly
pass ?version=5. Sound right?"
- User confirms
- endpoint-update <name> {query: <v4 query>} → creates v6
- endpoint-run <name> ?version=6 to confirm shape
- "Done. v6 is live with v4's query. Want me to also deactivate v5
so it's clear it's defunct?"
- User: "Yes"
- endpoint-update <name> {version: 5, is_active: false}
{endpoint_name}_v{version}. Disabling materialisation on one version doesn't affect others.?version=N are
insulated from query edits; unpinned callers always hit the latest and can be surprised by a new
version. Encourage consumers to pin, validate a new version, then bump the pin deliberately.posthog-cli exp endpoints {pull,push,diff} lets the user
keep endpoint definitions as YAML in version control and review changes before pushing — a
cleaner workflow than editing live when query changes need review.agent-feedback). Don't pretend endpoint-update does it.tools
Focused Signals scout for PostHog projects with web traffic. Watches the acquisition and site-health layer the web analytics product reports on: per-channel session volume diverging from the site's own rhythm (an acquisition source silently collapsing or surging), attribution breakage (paid/campaign traffic reclassifying into Direct or Unknown when tagging breaks), landing pages that break (bounce-rate steps, 404 spikes, entry-path cliffs), and page-performance regressions (web vitals p75 steps). Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet.
tools
Focused Signals scout for PostHog projects using session replay. Watches two promises the replay product makes: that sessions are actually being recorded (capture integrity — recording volume vanishing while site traffic doesn't), and that the friction evidence inside recordings gets seen (rage-click / dead-click clusters concentrating on a page or element, error-after-interaction cohorts, recurring replay vision themes nobody aggregates). Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet.
tools
Focused Signals scout for PostHog setup health. Reads the project's active health issues — the deterministic findings of PostHog's own health checks (no live events, outdated SDKs, missing reverse proxy, absent web vitals, ingestion warnings, failing data-warehouse models, and more) — and decides which are genuinely worth surfacing. Unlike a one-signal-per-issue push, it bundles kind-clusters into a single finding, weights by real blast radius (cross-referencing actual event volume and reach), and prioritizes issues an agent can resolve via the MCP. Emits only above the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on other skills.
tools
Focused Signals scout for PostHog projects using feature flags. Watches the flag roster and the `$feature_flag_called` evaluation stream for contradictions between a flag's configured state and its real traffic: evaluation cliffs on healthy flags, ghost flags (code calling keys that no longer exist), response-distribution shifts with no corresponding flag edit, and flag debt (stale, fully-rolled-out, or dead flags still burning evaluations). Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on other skills.