fix(skills): skip mirror fan-out to agents that read the universal store - #3325
Open
santhiprakash wants to merge 1 commit into
Open
fix(skills): skip mirror fan-out to agents that read the universal store#3325santhiprakash wants to merge 1 commit into
santhiprakash wants to merge 1 commit into
Conversation
miga-heygen
reviewed
Aug 18, 2026
miga-heygen
left a comment
Contributor
There was a problem hiding this comment.
LGTM — clean, minimal fix.
The problem is well-defined: Pi discovers ~/.agents/skills natively, so the mirror's per-agent fan-out created a duplicate that Pi resolved by keeping the per-agent copy and skipping the universal one — the wrong winner.
The fix is a single continue in the fan-out loop gated on a UNIVERSAL_STORE_READERS set. Good design choices:
- Set lives in
skillsMirror.ts, not inagentDirs.generated.ts. The generated file is a plain(agent, base, sub)list synced from vercel-labs/skills — it can't carry per-agent capabilities, and a hand edit would be clobbered. Correct placement. - No stale-entry cleanup. Removing entries in a directory the mirror no longer manages risks deleting user-placed content. The replace-on-refresh precedent only applies to dirs still mirrored. Right call.
- Test is specific. Seeds both Pi and Cursor markers, asserts Pi is excluded and Cursor included, verifies no
~/.pi/agent/skills/hyperframesentry was created. Covers both the positive and negative cases.
No SSOT concerns — the skip check is one line, one source of truth for which agents are universal-store readers, and the comment explains the invariant it protects.
Review by Miga
miguel-heygen
approved these changes
Aug 18, 2026
Collaborator
|
@santhiprakash sign the commit pls |
Pi discovers both ~/.pi/agent/skills and the universal ~/.agents/skills globally, so the per-agent mirror copy collided with the universal copy and Pi skipped the universal entry on name conflict (heygen-com#3294). Skip agents that natively consume the universal store instead of fanning out to them. Fixes heygen-com#3294
santhiprakash
force-pushed
the
fix/skills-mirror-skip-pi
branch
from
August 20, 2026 05:46
6c9d5c6 to
4dc197d
Compare
Contributor
Author
|
Done — commits are now signed. You should see the Verified badge on the latest commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The global skills mirror no longer fans out into agent directories whose agent already discovers the universal
~/.agents/skillsstore globally. Currently that set is{ pi }.Why
Pi discovers skills from both
~/.pi/agent/skills/and~/.agents/skills/as global locations (see pi'spackages/coding-agent/docs/skills.md→ Locations). The global install already writes real files into the universal store, so mirroring an additional per-agent copy into~/.pi/agent/skillsmakes Pi discover every HyperFrames skill twice. Pi then reports a name collision, keeps the~/.pi/agent/skillsentry, and skips the universal entry:Fixes #3294 (the deterministic duplicate-discovery half; the broader target-control surface proposed there is left for maintainers to design).
How
UNIVERSAL_STORE_READERScapability set inpackages/cli/src/utils/skillsMirror.ts(currentlypi) and skip those agents in the fan-out loop, before the installed-marker check.agentDirs.generated.ts: that file is@generatedfrom vercel-labs/skills and a plain(agent, base, sub)list — it cannot carry per-agent capabilities, and any hand edit would be clobbered by the nextgen:agent-dirssync.~/.pi/agent/skillsentries from earlier runs. Removing entries in a directory we no longer manage would risk deleting user-placed content (the mirror's replace-on-refresh precedent only applies to dirs it still mirrors). A one-time stale-link cleanup can be a follow-up if maintainers want it.Test plan
skillsMirror.test.ts: with both Pi (~/.pi/agent) and cursor markers present,mirroredcontains cursor and not pi, and no~/.pi/agent/skills/hyperframesentry is created.skillsMirror,skillsManifest,skillsUpdateCheck,commands/skills— 116/116.oxlint/oxfmt --checkclean on changed files; repocheck-skill-mirrorinvariant still passes; lefthook pre-commit gates (format, fallow against synced main, typecheck after generating core runtime artifacts) pass.