Agent skill

Posthog Upgrade Migration

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback.

MITAuto-check passedDevelopment

Install Posthog Upgrade Migration

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-upgrade-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-upgrade-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/posthog-upgrade-migration .claude/skills/posthog-upgrade-migration && rm -rf skills-src

Use ~/.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/

Facts

Skill name
posthog-upgrade-migration
GitHub stars
2.8k
Token cost
~1.8k tokens
SKILL.md length
444 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback.

  • Works in 6 steps: Audit Current Versions → Build the Version Delta → Upgrade Procedure → …
  • Changing a PostHog package version
  • SKILL.md covers Overview, Prerequisites, Instructions and Upgrade Evidence, plus 5 more sections
  • Calls npm, pip3 and git; reaches us.i.posthog.com; needs NEXT_PUBLIC_POSTHOG_KEY and POSTHOG_FEATURE_FLAGS_SECURE_API_KEY

What it does

Posthog Upgrade Migration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback. Use when changing a PostHog package version or defaults date. Trigger with "upgrade PostHog SDK", "PostHog breaking change", or "PostHog version migration".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/official-docs.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Changelog and release notes and Deployment. It works with PostHog. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Changing a PostHog package version
  • With upgrade PostHog SDK
  • PostHog breaking change
  • PostHog version migration

Example prompts

  • “upgrade PostHog SDK”
  • “PostHog breaking change”
  • “PostHog version migration”
  • “/posthog-upgrade-migration”

Requirements

  • Python 3
  • Node.js
  • A credential in NEXT_PUBLIC_POSTHOG_KEY
  • A credential in POSTHOG_FEATURE_FLAGS_SECURE_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Bash(npm:*), Bash(npx:*), Bash(git:*), Bash(pip:*), Bash(pip3:*), Bash(grep:*)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Audit Current Versions
  2. Build the Version Delta
  3. Upgrade Procedure
  4. Search for Deprecated Patterns
  5. Validate in Staging
  6. Rollback if Needed

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Bash(npm:*)
    • Bash(npx:*)
    • Bash(git:*)
    • Bash(pip:*)
    • Bash(pip3:*)
    • Bash(grep:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • pip3
    • git
    • npx
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • us.i.posthog.com

    Also links to:

    • github.com
    • posthog.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NEXT_PUBLIC_POSTHOG_KEY
    • POSTHOG_FEATURE_FLAGS_SECURE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Posthog Upgrade Migration loads about 1.8k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 444 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 444 words, ~1,846 tokens.

Download SKILL.mdSave it as .claude/skills/posthog-upgrade-migration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
posthog-upgrade-migration
description
Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback. Use when changing a PostHog package version or defaults date. Trigger with "upgrade PostHog SDK", "PostHog breaking change", or "PostHog version migration".
allowed-tools
Read, Write, Edit, Grep, Bash(npm:*), Bash(npx:*), Bash(git:*), Bash(pip:*), Bash(pip3:*), Bash(grep:*)
compatibility
Designed for Claude Code
argument-hint
[project-path] [target-version]
version
1.14.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, posthog, api, migration

PostHog Upgrade & Migration

Overview

Upgrade PostHog SDKs from the versions actually locked by the target project to explicit target versions. Build the change list from current release notes and type surfaces, then prove capture, identity, consent, flags, flushing, and rollback behavior in the environments the application uses.

Prerequisites

  • PostHog SDK currently installed
  • Git for branching
  • Test suite covering PostHog integration
  • Staging environment for validation

Instructions

Tool discipline

Use Read and Grep to inspect manifests, lockfiles, initialization, and release-sensitive options before proposing changes. Use Write only for a new, explicitly requested artifact inside the target project. Use Edit for minimal changes to existing project files after the evidence pass. Use npm, npx, pip, and git Bash commands only in the selected project and preserve the recorded rollback versions.

Step 1: Audit Current Versions
bash
set -euo pipefail
# Check installed versions
echo "=== posthog-js ==="
npm list posthog-js 2>/dev/null || echo "Not installed"
echo "=== posthog-node ==="
npm list posthog-node 2>/dev/null || echo "Not installed"
echo "=== Python posthog ==="
pip3 show posthog 2>/dev/null | grep Version || echo "Not installed"

# Check latest available versions
echo "=== Latest available ==="
npm view posthog-js version 2>/dev/null
npm view posthog-node version 2>/dev/null
Step 2: Build the Version Delta

Read every release note between the locked and target versions, plus the current SDK reference for each configured option. Produce a small evidence table with: package, locked version, target version, runtime requirement, changed default or API, affected source locations, required test, and rollback version. Pay particular attention to browser defaults dates, autocapture and persistence, consent, replay, server flush semantics, feature-flag evaluation, and whether events attach flag properties. Do not infer compatibility from a major-version number or a remembered migration note.

Step 3: Upgrade Procedure
bash
set -euo pipefail
# Create upgrade branch
git checkout -b upgrade/posthog-sdks

: "${POSTHOG_NODE_TARGET:?Set the reviewed posthog-node target version}"
: "${POSTHOG_JS_TARGET:?Set the reviewed posthog-js target version}"

# Install the exact reviewed versions and let the lockfile record them.
npm install "posthog-node@$POSTHOG_NODE_TARGET" "posthog-js@$POSTHOG_JS_TARGET"
# Check for type errors
npx tsc --noEmit 2>&1 | grep -i posthog || echo "No PostHog type errors"

# Run tests
npm test

# If Python
pip install --upgrade posthog
Step 4: Search for Deprecated Patterns
bash
set -euo pipefail
# Find files using PostHog
grep -rn "posthog\|PostHog" --include="*.ts" --include="*.tsx" --include="*.js" src/ | \
  grep -v node_modules | grep -v ".d.ts"

# Check for patterns that may need updating
echo "=== Checking for deprecated patterns ==="

# Direct API key in code (should be env var)
grep -rn "phc_\|phx_" --include="*.ts" --include="*.tsx" src/ && \
  echo "WARNING: Hardcoded API key found" || echo "No hardcoded keys"

# Inventory options whose behavior must be checked against the target release.
grep -rn "defaults\|autocapture\|before_send\|sendFeatureFlags\|personalApiKey\|flushAt\|flushInterval" \
  --include="*.ts" --include="*.tsx" --include="*.js" src/ || true
Step 5: Validate in Staging
typescript
// Post-upgrade validation script
import { PostHog } from 'posthog-node';

async function validateUpgrade() {
  const ph = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
    host: 'https://us.i.posthog.com',
    personalApiKey: process.env.POSTHOG_FEATURE_FLAGS_SECURE_API_KEY,
  });

  const checks = {
    capture: false,
    flags: false,
    identify: false,
  };

  try {
    // Test capture
    ph.capture({ distinctId: 'upgrade-test', event: 'sdk_upgrade_validated' });
    checks.capture = true;

    // Test feature flags
    const flags = await ph.getAllFlags('upgrade-test');
    checks.flags = typeof flags === 'object';

    // Test identify
    ph.identify({ distinctId: 'upgrade-test', properties: { upgraded: true } });
    checks.identify = true;

    await ph.flush();
  } catch (error) {
    console.error('Validation failed:', error);
  } finally {
    await ph.shutdown();
  }

  console.log('Upgrade validation:', checks);
  const allPassed = Object.values(checks).every(Boolean);
  process.exit(allPassed ? 0 : 1);
}

validateUpgrade();
Step 6: Rollback if Needed
bash
set -euo pipefail
: "${POSTHOG_NODE_PREVIOUS:?Set the previously locked posthog-node version}"
: "${POSTHOG_JS_PREVIOUS:?Set the previously locked posthog-js version}"
npm install "posthog-node@$POSTHOG_NODE_PREVIOUS" "posthog-js@$POSTHOG_JS_PREVIOUS" --save-exact

# Verify rollback
npm test

Upgrade Evidence

Attach the completed version-delta table, dependency and lockfile diff, focused test output, staging event/flag evidence, canary window, observed ingestion warnings, and exact rollback commands. If any behavior cannot be confirmed from current official documentation or a controlled test, stop and record it as unresolved rather than guessing.

Show full SKILL.md (157 more words)Show less

Error Handling

IssueCauseSolution
Type errors after upgradeAPI changedCheck changelog, update types
Flags differ after upgradeChanged evaluation or event-enrichment behaviorCompare release notes, targeting context, and controlled flag tests
Autocapture differs after upgradeChanged default or configuration interpretationCompare the chosen defaults date and emitted event sample
Test failuresMock structure changedUpdate mocks to match new SDK exports

Output

  • Upgraded PostHog SDK to the explicit reviewed target version
  • Deprecated patterns identified and fixed
  • All tests passing with new version
  • Rollback procedure documented

Examples

For a posthog-js upgrade, record the current and target versions, compare the configured defaults date and changed options, run capture, identity, flag, consent, and replay tests, then canary with a reversible version pin. Never infer compatibility from a stale hard-coded major-version table.

Resources

See official PostHog references for current authority and verification boundaries.

Next Steps

For CI integration during upgrades, see posthog-ci-integration.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/posthog-upgrade-migration of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/official-docs.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Posthog Upgrade Migration 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.

Posthog Upgrade Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Posthog Upgrade Migration this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.8kAutomated safety check: PassMIT
Cline Desktop App Releasecline/cline70k—~4.5kAutomated safety check: PassApache-2.0
EverOS Release WorkflowEverMind-AI/EverOS13k—~1.3kAutomated safety check: PassApache-2.0
Releasengrok/ngrok-operator272—~2.7kAutomated safety check: PassMIT
Remotion Bits Releaseav/remotion-bits490—~1.2kAutomated safety check: PassNone
Cline CLI Release Publishercline/cline70k—~3.4kAutomated safety check: WarnApache-2.0

Similar skills

  • Covers preparing, tagging and publishing a Cline desktop app release on the stable, beta or nightly channel through the desktop-publish GitHub workflow.

    70k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • EverOS Release Workflow

    EverMind-AI/EverOS

    Walks through cutting a versioned everos release: bump the version, update the changelog, tag it, and review the drafted GitHub Release page before publishing.

    13k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Release

    ngrok/ngrok-operator

    Automates the ngrok-operator release process: gathers PR data, classifies changes by component (container, Helm chart, CRDs chart), generates changelogs, updates version files, and prepares the…

    272 GitHub stars~2.7k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Remotion Bits Release

    av/remotion-bits

    Runs the full release of the remotion-bits package: version bump, changelog, registry build, release commit, GitHub release, docs deploy and npm publish.

    490 GitHub stars~1.2k tokensUpdated 25 days ago
    DevelopmentAuto-check passed
  • Walks through releasing the Cline CLI package to npm: release notes, version bump, matching git tag, and either the GitHub workflow or a local publish.

    70k GitHub stars~3.4k tokensUpdated today
    DevelopmentAuto-check: warnings
  • ClawRouter Release Checklist

    BlockRunAI/ClawRouter

    Walks the agent through every ClawRouter release step in order, from the version bump and changelog entry to build, tests, npm publish, git tag and GitHub release.

    6.6k GitHub stars~1.4k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Posthog Upgrade Migration

What does Posthog Upgrade Migration do?

Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback. Posthog Upgrade Migration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Upgrade PostHog SDKs through release-note review, configuration-default comparison, focused tests, canary evidence, and rollback.

When should I use Posthog Upgrade Migration?

Posthog Upgrade Migration fits situations like: changing a PostHog package version; with upgrade PostHog SDK; postHog breaking change; postHog version migration.

How do I install Posthog Upgrade Migration in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-upgrade-migration -a claude-code`. Or copy the skill folder (skills/.curated/posthog-upgrade-migration in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/posthog-upgrade-migration in your project. Claude Code loads it when a task matches its description.

How do I install Posthog Upgrade Migration in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-upgrade-migration -a codex`. Or copy the skill folder (skills/.curated/posthog-upgrade-migration in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/posthog-upgrade-migration in your project. Codex loads it when a task matches its description.

Can I use Posthog Upgrade Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-upgrade-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/posthog-upgrade-migration, .gemini/skills/posthog-upgrade-migration, .github/skills/posthog-upgrade-migration and .opencode/skills/posthog-upgrade-migration in your project.

What does Posthog Upgrade Migration need to run?

Going by SKILL.md and its folder, Posthog Upgrade Migration needs the command-line tools its instructions call (npm, pip3, git, npx and pip) and credentials named NEXT_PUBLIC_POSTHOG_KEY and POSTHOG_FEATURE_FLAGS_SECURE_API_KEY. Our summary lists: Python 3; Node.js; A credential in NEXT_PUBLIC_POSTHOG_KEY; A credential in POSTHOG_FEATURE_FLAGS_SECURE_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Bash(npm:*), Bash(npx:*), Bash(git:*), Bash(pip:*), Bash(pip3:*), Bash(grep:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Posthog Upgrade Migration access the network?

SKILL.md names 3 domains. In commands or code: us.i.posthog.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com and posthog.com. This is read from the text; nothing was executed.

Is Posthog Upgrade Migration safe to install?

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.

What licence does Posthog Upgrade Migration use?

Posthog Upgrade Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Posthog Upgrade Migration use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 204 tokens, read only when the agent opens those files.

What are the alternatives to Posthog Upgrade Migration?

Skills that share tags, products or a category with Posthog Upgrade Migration: Cline Desktop App Release (cline/cline, 70k stars), EverOS Release Workflow (EverMind-AI/EverOS, 13k stars), Release (ngrok/ngrok-operator, 272 stars) and Remotion Bits Release (av/remotion-bits, 490 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Posthog Upgrade Migration?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.