Skip to content

posthog-integration publishes the wrong skill under skills/all #309

Description

@peter-trost

Fix in #308.

posthog-integration currently ships omnibus-instrument-product-analytics under skills/all. The SDK-integration omnibus (omnibus-instrument-integration) is absent from the published plugin entirely — anyone installing the plugin gets the wrong skill and never receives the integration one.

Reproduce

Live, no clone needed:

gh api repos/PostHog/skills/contents/skills/posthog/integration/skills/all/SKILL.md \
  --jq '.content' | base64 -d | grep '^name:'
name: omnibus-instrument-product-analytics     # expected: omnibus-instrument-integration

Locally, the count mismatch is the tell:

pnpm build | grep 'posthog-integration'                          # ✓ posthog-integration (40 skills)
ls dist/marketplace/plugins/posthog-integration/skills | wc -l   # 39

Cause

shortId is a skill's variant id within its group (skill-generator.js:315-329), so it is unique only per-group. A plugin aggregates many groups, so marketplace-generator.js:181 puts a group-scoped key into a plugin-scoped namespace.

omnibus/instrument-integration and omnibus/instrument-product-analytics both declare category: integration with a single variant id: all, so both resolve to plugins/posthog-integration/skills/all.

The mega-plugin at :200 already keys by skill.id and is unaffected.

It is not a clean overwrite

copyDirSync (:50-61) does mkdirSync + copyFileSync with no clearing, so it merges file-by-file. The survivor keeps the loser's files that it does not itself have. The published all/ is a hybrid: product-analytics' SKILL.md over 8 orphan integration references — js.md, node.md, react.md, posthog-js.md, posthog-node.md, EXAMPLE-javascript-web.md, EXAMPLE-javascript-node.md, EXAMPLE-react-vite.md. All 8 are in the published tree today:

gh api repos/PostHog/skills/contents/skills/posthog/integration/skills/all/references \
  --jq '.[].name' | grep -E '^(js|node|react|posthog-js|posthog-node)\.md$'

Why it stayed silent

The build logs ✓ posthog-integration (40 skills) from the input count while writing 39 dirs, and marketplace-generator.js has no test coverage.

Only posthog-integration is affected — every other plugin's dir count already matches its log line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions