Repository navigation
fix(skills): quiet startup skill conflicts for duplicated shared skill dirs - #246
Merged
Merged
Conversation
…l dirs Users who run both Codex and Claude Code often have the same skills copied into ~/.agents/skills and ~/.claude/skills. Each copy produced a collision entry, flooding startup even though the shadowed copy is never loaded. - Skip a colliding skill silently when its SKILL.md is byte-identical to the winner, the same way symlinked duplicates are already skipped. - Without the full resource listing, collapse remaining skill/prompt collisions into one line per (skipped dir, winning dir) pair; --verbose still lists each one. Warnings and errors are shown in full as before.
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.
Problem
Users who run both Codex and Claude Code often have the same skills installed in
~/.agents/skills(Codex) and~/.claude/skills(Claude Code). Skill installers usually copy rather than symlink, so the existing realpath dedupe doesn't catch them. Every duplicate produced a[Skill conflicts]entry. Step mode always shows diagnostics on startup, so users got dozens of lines like this:These entries are informational only:
.agentstakes precedence over.claude, the shadowed copy is never loaded, and the user can't remove it without breaking Claude Code.Changes
packages/coding-agent/src/core/skills.ts): when two skills share a name and theirSKILL.mdfiles are byte-identical, the later one is skipped without a diagnostic, the same way symlinked duplicates already are.apps/cli/src/ui/interactive-mode.ts): without the full resource listing, skill and prompt collisions collapse into one line per (skipped dir, winning dir) pair:--verboseand the full listing mode still show the per-name breakdown. Warnings and errors (e.g. frontmatter parse failures) are shown in full as before.Precedence and the winning skill are unchanged.
Note: only
SKILL.mdcontent is compared. If two copies have identicalSKILL.mdbut different bundled scripts, the shadowed copy is now skipped silently; the winner (higher-precedence dir) is still what gets used.Validation
skill-loading-regressions.test.ts: identical copies produce no collision; differing copies still report.agentsas winner and.claudeas loser.interactive-mode-status.test.ts: Step mode summarizes unless--verbose; summary groups by directory pair and keeps non-collision diagnostics.skills,resource-loader,skill-loading-regressions,2781-skill-collision-precedence, andinteractive-mode-statussuites pass (132 tests).pnpm run check(biome, repo checks,tsgo --noEmit) passes.