Skip to content

feat: ship the plugin with no bundled skills - #311

Open
JakeRuth wants to merge 7 commits into
mainfrom
remove-bundled-skills
Open

JakeRuth wants to merge 7 commits into
mainfrom
remove-bundled-skills

Conversation

@JakeRuth

@JakeRuth JakeRuth commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Order of the whole change: PostHog/posthog#135733 → PostHog/posthog#135734 → flag fully on → #311 together with PostHog/context-mill#527, PostHog/posthog#135736 and PostHog/posthog.com#22349.

Changes

  • The plugin ships no skills. An agent loads a skill through learn when a task needs one.
  • Every client config sends the consumer value plugin-learn. The server gives that value learn, and can tell these installs from old ones that still send plugin.
  • Claude Code is the one client that cannot simply change the header. Its saved PostHog sign-in is tied to the static headers, so a changed header signs the user out. It keeps the static plugin header and sends the new value through headersHelper, a command Claude Code runs on each connection.
  • The helper prints claude-code-headers.json with cat, or with type where cat is missing. Claude Code runs the helper through sh on macOS and Linux and through cmd.exe on Windows, and an echo with quotes does not survive both.
  • The daily sync no longer copies skills. It still regenerates the read-tool list and the Gemini commands, and bumps versions.
  • The skill-use telemetry hook goes with the skills. The README says where skills come from now.
  • Manifests move to the next minor version, so this release is not a patch number the daily sync also produces.

Do not merge until

Merge together with

After the merge

  • Listings that hold their own copy of this plugin need a manual update: the two Anthropic plugin listings and the Cursor Marketplace.
  • A bot commits new skills and a version bump to main every day. This branch deletes the skills and sets the versions, so it has to be brought up to date with main right before it merges.
  • The new daily sync job has never run. Watch its first run after the merge, or start it by hand.

How did you test this code?

Claude Code, 2.1.325:

  • With a real PostHog sign-in on macOS: a changed static header signs the user out, and changing it back does not restore the sign-in. With the helper the user stays signed in, the server receives plugin-learn, and learn lists the skills. Without the helper learn answers "not available for this client".
  • When the helper fails or prints invalid JSON, Claude Code stays signed in and sends the static plugin value with no error. So a broken helper means no learn and no skills.
  • A first version of the helper (echo with single quotes) did exactly that on Windows. A probe with the real CLI on a Windows runner showed the server receiving plugin, from cmd.exe, PowerShell and Git Bash alike.
  • The new claude-code CI job covers this. On Linux, macOS and Windows it installs this plugin through claude plugin marketplace add and claude plugin install, connects, and checks the header a local server receives. It passes on all three, and it fails when the headers file is removed.

Other clients:

  • Codex 0.166.0 with a real PostHog sign-in: the sign-in status is the same with plugin, with plugin-learn and with no header.
  • Cursor 3.30.8: kept its sign-in when the header value changed, and loaded a skill through learn on exec mode with a non-plugin value.

Also run: python3 -m pytest tests/test_plugin_paths.py telemetry/tests/test_session_parser.py telemetry/tests/test_posthog_llma.py, the three hook test scripts, and claude plugin validate ..

Not tested: Gemini CLI and Antigravity sign-in after the value change, and the new daily sync job.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Claude Opus 5.5 and Claude Fable 5.2

🤖 Generated with Claude Code

JakeRuth and others added 3 commits November 13, 2026 15:42
PostHog skills now come from the MCP server, so the plugin stops copying
them. Remove skills/, the manifest skills paths, and the skill telemetry
hook that only counted bundled skills. The daily job keeps regenerating
the read-tool list and Gemini commands and bumping versions. Bump the
plugin versions by hand so existing installs pick this up. A test now
fails if a skills/ folder or a manifest skills path comes back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every client config now identifies as plugin-learn, so the MCP server can
tell this release from older installs and give it skills through learn.

Claude Code keys a saved MCP sign-in on the server's type, url and static
headers, so .mcp.json keeps its headers block exactly as before and adds a
headersHelper that returns plugin-learn; dynamic headers override static
ones of the same name. A test pins those fields to their previous bytes.
Cursor, Codex, Antigravity and Gemini change the value directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…windows

Removes one skill the daily sync added since this branch started, moves the
manifests to the next minor version so the release is not a patch the
daily sync also produces, and runs the Claude Code headers helper tests on
a Windows runner in Git Bash and PowerShell.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The test timed out on the Linux runner, where pwsh is installed but slow
to start. Claude Code only uses PowerShell on Windows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
JakeRuth and others added 3 commits November 13, 2026 17:22
Real Claude Code on Windows runs headersHelper through cmd.exe, whatever
shell launched it. The quoted echo printed invalid JSON there, so Claude
Code fell back to the static plugin header and the install got no learn.
The helper now prints a file with cat, or with type where cat is missing.

A new CI job installs the plugin with the real Claude Code CLI on Linux,
macOS and Windows and checks the header a local server receives. It
replaces the job that ran the helper in Git Bash and PowerShell, which
are not the shells Claude Code uses.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@JakeRuth
JakeRuth marked this pull request as ready for review November 16, 2026 21:11
@JakeRuth
JakeRuth requested a review from a team as a code owner November 16, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants