Skip to content
Back to skills

Shipping Api Changes To Sdks

ASecurity

Takes a finished PostHog feature that SDKs should expose, such as a new API endpoint, a new option on an existing call, or a new capability, and brings it to the docs, the sdk-specs contract, and a merged PR in every SDK it applies to. Use after the backend work is merged, when asked to document a feature and add it "to the SDKs" or "to sdk-specs".

  • 41,325 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 3, 2026
developmentpythonrustgorubyphpnodegitapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add PostHog/posthog --skill shipping-api-changes-to-sdks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shipping Api Changes To Sdks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Shipping Api Changes To Sdks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/posthog-shipping-api-changes-to-sdks/badge)](https://www.skillsdirectory.com/skills/posthog-shipping-api-changes-to-sdks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: shipping-api-changes-to-sdks
description: Takes a finished PostHog feature that SDKs should expose, such as a new API endpoint, a new option on an existing call, or a new capability, and brings it to the docs, the sdk-specs contract, and a merged PR in every SDK it applies to. Use after the backend work is merged, when asked to document a feature and add it "to the SDKs" or "to sdk-specs".
---

# Shipping a feature to the SDKs

Start here once the backend work is merged. What is left is often a dozen PRs across several repositories: the spec, one per SDK, and the docs. This skill sets their order and the checks that keep a reviewer from finding the gaps late.

Work the steps in order. Start a step only when the one before it is merged or, where a step says so, open as a draft that names it.

## 1. Read what shipped

The SDK contract follows the feature as it shipped, so read it from the merged backend PRs and the code, not from memory or the original plan.

- List what an SDK must expose: each new endpoint or operation, and each new field or option with its name, shape, default and limits.
- List each error the server returns and its code. An SDK passes those codes through; it does not repeat the server's rules.
- Check that the feature is on for every team. When a feature flag or per-team setting still holds it back, stop and ask a person to confirm before you start: the SDKs would ship an option that the server refuses.

Done when you can list everything an SDK must expose and its errors, and the feature is on for every team or a person confirmed it.

## 2. sdk-specs

[PostHog/sdk-specs](https://github.com/PostHog/sdk-specs) holds the contract every SDK implements. Follow its AGENTS.md and its OpenSpec skills (`openspec-propose`, `openspec-apply-change`, `openspec-archive-change`, `writing-acceptance-tests`).

1. Find the capability spec under `openspec/specs/<capability>/spec.md`, and read its Applicability section for which SDKs it covers, such as server SDKs only. A feature with no capability yet gets a new one; the README table lists them all.
2. List the open PRs for that capability with `gh pr list --repo PostHog/sdk-specs --search "<capability>"`. When your feature builds on a part that an open PR specifies, stack on that PR instead of copying it, and say so in your PR body.
3. Propose, apply and archive the change in one PR. Add a scenario to `acceptance/public/<capability>.feature` for each new behavior.
4. Have the SDK check only what it must to build a valid request, such as a field's type, and leave values and limits to the server. A later server-side change then needs no SDK release.
5. Run `npx -y @fission-ai/openspec validate --all --no-interactive` and read its totals.
6. Ask for review when you open the PR, not at the end. `@PostHog/team-client-libraries` owns every file; post the ask in #approvals-client-libraries.

Done when the spec PR is open and ready for review, and its validation passes.

## 3. SDK PRs

`compliance/<sdk>.md` in sdk-specs names each SDK's repository and the package that holds the capability. Open one PR per SDK the spec applies to. Some SDKs share a repository, such as posthog-node in the posthog-js monorepo.

Check how each SDK's reference reaches `/docs/libraries/<sdk>` before you start, because it decides where the docs for that SDK live:

- **Generated** (Python, Node, Go, Rust): a "Generate references" workflow builds the reference from the doc comments. The SDK PR's doc comments are its docs.
- **Hand-written** (Ruby, PHP, .NET, Elixir): no generator exists. The doc comments still matter for the SDK's own users, but the reference is `contents/docs/libraries/<sdk>/index.mdx` on posthog.com, written by hand in step 5.

An SDK that is not in either list: check its repository for a references workflow, and treat it as hand-written when there is none.

Run the SDKs as parallel lanes, one agent per SDK, each in its own clone or worktree branched from the SDK's default branch. Give each lane:

- the spec PR as the contract, with the requirement names and acceptance scenarios to satisfy;
- the backend PRs for context;
- the instruction to read the SDK repository's AGENTS.md or CONTRIBUTING first and follow its changeset, test and lint rules;
- the instruction to mirror the closest existing operation or option in that SDK, with no refactors;
- one test per behavior in the spec, written first, including each refusal the SDK makes before sending a request;
- full doc comments on each new option: what it does, its limits, the release that adds it, and each refusal code. Those comments are the SDK reference (see step 5);
- the instruction to run the repository's reference generator and commit the regenerated `references/` in the same PR, whether or not CI checks it. The "Generate references" workflow needs a maintainer's app secret, so an agent can't run it after merge, and `references/` on `main` can already be behind;
- a changeset for the release that ships the feature;
- the instruction to open a draft PR that links the spec PR, and to report the PR URL, head SHA, the release version, and the test command with its result.

Keep the feature PR apart from a docs-only PR in the same SDK: reviewers approve a docs change and a behavior change differently.

Lanes share one GitHub API limit, so tell them not to poll `gh` in loops. A delegated lane can't watch its PR: the conductor watches each one and marks it ready once CI is green and every bot thread is answered.

Done when every SDK has a draft PR with green tests.

## 4. Merge and release

1. Merge the spec PR once client libraries approve it. Merge a stacked spec PR into its base first, so the stack lands on `main` in one merge.
2. Mark each SDK PR ready once the spec is merged, and merge it through that repository's own process. StampHog doesn't approve SDK repositories, so a person from client libraries reviews each one. Post one message in #team-client-libraries that links every PR.
3. Merging releases the SDK when the PR carries a changeset. Check that each release is published, and note its version for the docs step.

Done when the spec and every SDK PR are merged and released.

## 5. Docs

Start only once every SDK that exposes the feature has a published release. The docs must never name an option that users can't install yet. Follow [PostHog/posthog.com](https://github.com/PostHog/posthog.com)'s AGENTS.md.

- **Generated SDK references** (Python, Node, Go, Rust): the doc comments from step 3 are the docs. They reach `references/` on `main` only when the PR commits the generated files (see step 3). If a merged PR left them out, open a PR that commits only the generator's output. Strapi pulls `references/` from `main` at 10:00 and 22:00 UTC, and the next posthog.com build serves them at `/docs/libraries/<sdk>`. Check that the generator passes on `main` first: a broken one stops every update.
- **Hand-written SDK references** (Ruby, PHP, .NET, Elixir): add the option to `contents/docs/libraries/<sdk>/index.mdx` yourself, from the SDK's source and changelog. Match a generated reference, such as Python's `references/posthog-python-reference.md`: a heading per method, its signature, then Parameters, Returns, Raises and Examples tables, with each parameter's type, default and the release that added it.
- **Product docs:** show each option once, on the feature's shared page, with a value a caller would set, its limits and its refusal codes. Add the release that ships it to the SDK version table. Keep per-SDK install pages short, and link to the references for every option.

Done when the docs PR is merged and every SDK reference shows the option.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.