managing-endpoint-versions
できること
このスキルは、エンドポイントのバージョンの仕組みと、本番の利用に影響を与えずにロールバックや変更のプレビューを行う方法を説明します。エンドポイントを編集し、驚きを避けたい人向けです。
使う場面
- ✓エンドポイントを古いバージョンに戻したいとき。
- ✓ライブにする前に、プレイグラウンドでクエリの変更をテストしたいとき。
- ✓新しいバージョンを作らずに、1つのバージョンの説明や鮮度の設定を更新したいとき。
スキルのリンク
https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/managing-endpoint-versions/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のエンドポイントをバージョン3に戻すにはどうすればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
設定を変更すると、対象のバージョンがその場で更新されます。クエリを変更すると、新しいバージョンが作られ、現在のバージョン番号が上がります。このスキルは、安全にテストしてロールバックする方法を示します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Managing endpoint versions
This skill is the practical guide to endpoint versioning. It covers the today-workflow, which has some sharp edges worth being explicit about.
When to use this skill
- "How do I roll back to v3?"
- "I want to test changes before they go live"
- "How do I update the description /
data_freshness_secondson a specific version?" - "Can I disable v4 without affecting v5?"
- The user is uncertain whether a query change will cut a new version
Versioning model — what to know
| 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.
Available tools
| 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) |
Workflows
Previewing a draft before publishing
There is no "draft" concept in the model. Editing the query commits it as a new version immediately. To preview safely:
- Test the new query first with the
execute-sqltool (or the SQL editor) — not on the live endpoint - When ready, update the endpoint — this creates the new version automatically
- Use
endpoint-runwith?version=Nto confirm the new version returns what you expect - Old callers still hit the latest version (which is now your new version) — there is no "soft launch"
If 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.
Rolling back to an older version
The forward-only model means "rollback" requires forking:
endpoint-versionsto find the version with the good query (say v3)endpoint-getwith?version=3to retrieve that version's query JSONendpoint-updatewith the v3 query as the new query — this creates a new version (e.g. v6) with the same query as v3- All callers without
?version=Nnow 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
よくある質問
設定を変更すると新しいバージョンが作られますか?
いいえ。説明や鮮度などの設定は、対象のバージョンをその場で更新します。
クエリを変更すると新しいバージョンが作られますか?
はい。クエリを保存すると、自動的に新しいバージョンが作られ、現在のバージョン番号が上がります。
新しいバージョンに影響せずに古いバージョンを無効にできますか?
はい。特定のバージョンを無効にでき、他のバージョンは変わりません。このスキルはその方法も扱います。
詳細
作者による元の説明
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.
repo: PostHog/posthog
人気
- GitHubのスター
- 41k
- ランキング
- #6863
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
depot-ci
41kエージェントが、GitHub Actionsの代替であるDepot CIのワークフローを設定し実行できるよう支援します。既存のワークフローの移行や、実行ログの確認も含みます。
depot-container-builds
41kエージェントが、Depotのリモート・ビルダーでDockerイメージを作れるよう支援します。マルチプラットフォームのイメージ、レジストリへのプッシュ、ビルド失敗の修正を含みます。
depot-github-runners
41kエージェントが、GitHub Actionsのジョブを Depot が管理するランナーに移し、ランナーのサイズとラベルを選び、ランナー設定の問題を解決できるよう支援します。
editing-agents-md
41kエージェントが、AGENTS.mdとCLAUDE.mdのどちらにルールを書くべきかを判断し、ファイルを膨らませずに守られやすい形で書けるよう支援します。
似ているスキル
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
clickhouse-io
280kエージェントがClickHouseデータベースのクエリとスキーマを最適化できるようにします。高性能な分析処理向けのベストプラクティスを適用します。分析クエリが遅すぎるときに使います。
scientific-db-pubmed-database
280kエージェントが生物医学分野の科学論文を検索するのに役立ちます。特定の医療情報が必要な研究に便利です。