Skip to content

fix(agent): stop double-loading .claude/skills as synthetic plugins#3351

Closed
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-dedupe-repo-skills-discovery
Closed

fix(agent): stop double-loading .claude/skills as synthetic plugins#3351
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-dedupe-repo-skills-discovery

Conversation

@MattPua

@MattPua MattPua commented Jul 10, 2026

Copy link
Copy Markdown
Member

Problem

Skills in .claude/skills showed up twice in the session skill list: once bare (e.g. canvas-templates) and once under a synthetic plugin prefix (e.g. repo-skills-<hash>:canvas-templates). Same for ~/.claude/skills under user-skills:.

Changes

The Claude Agent SDK already auto-loads ~/.claude/skills and <repoPath>/.claude/skills natively as @skills-dir plugins. discover-plugins.ts was additionally symlinking those same directories into synthetic user-skills/repo-skills-<hash> plugins, so every skill loaded twice under two different names. Removed discoverUserSkills/discoverRepoSkills — only sources the SDK can't see on its own (marketplace-installed plugins, the user's Codex skills dir) still need manual discovery.

How did you test this?

  • npx vitest run packages/workspace-server/src/services/agent/discover-plugins.test.ts — updated tests pass.
  • pnpm --filter @posthog/workspace-server typecheck — no new errors (2 pre-existing unrelated failures confirmed present on main too).
  • biome check on touched files — clean.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

The Claude Agent SDK already auto-loads ~/.claude/skills and
<repoPath>/.claude/skills natively as @skills-dir plugins. Wrapping
them again in synthetic user-skills/repo-skills-<hash> plugins made
every skill show up twice in the session's skill list.

Generated-By: PostHog Code
Task-Id: bd56bbcd-cc4e-4d96-9913-0ff3c22968a5
@trunk-io

trunk-io Bot commented Jul 10, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 67dbff7.

@MattPua MattPua closed this Jul 10, 2026
@MattPua MattPua deleted the posthog-code/fix-dedupe-repo-skills-discovery branch July 10, 2026 15:45
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.

1 participant