Repository navigation
Description
Hi! Thanks for skillshare. I track ~17 repos in one source and sync them to Claude Code, opencode, Gemini CLI, pi and hermes.
Problem. Two tracked repos that ship a skill with the same name: (in my source: prototype, from both emilkowalski/skills and mattpocock/skills) cannot both reach a tool:
flatkeeps the folders apart, but every tool I tested lists skills by the SKILL.mdname:. opencode 2.0.20 silently keeps one of the two.standardexcludes both (1 name collision(s) excluded), so neither arrives.
A second reason: a prefix tells the agent and the human where a skill comes from. Claude Code shows plugin skills as plugin:skill; nothing gives the other tools an equivalent.
Proposal. An opt-in third value, default unchanged:
targets:
universal:
skills:
mode: copy
target_naming: prefixed- For a skill inside a tracked repo, the target folder and the
name:in the copy become<repo>-<name>, e.g.mattpocock-skills-prototype. The source is never touched, sogit pullstays clean. <repo>is the tracked repo dir without_, normalised to the spec charset;--nameat install already gives a shorter prefix (--name mp→mp-prototype). No double prefix:_bmad+bmad-uxstaysbmad-ux.- Skills outside tracked repos keep their name. Results go through
skillpkg.ValidateName, so they always meet the spec; remaining collisions behave as instandard. - Copy mode only, the same rule
extensionfollows, since the name is rewritten in the copy.
Happy to turn this into a proposals/ PR and to test a build against my setup.
How it fits existing features
| Feature | Effect |
|---|---|
include / exclude, .skillignore, metadata.targets |
Unchanged: they match the source flat name. |
projects:, project mode |
Work as-is: both accept target_naming. |
| Copy-mode manifest | Unchanged: keys are target names, values the source checksum. |
Switching an existing target to prefixed |
Needs the legacy-name migration (LegacyFlatNames, selectActiveTargetNameForSync, target_naming_migration.go) generalised beyond flat↔standard. |
| Targets sharing one folder | sameSkillsSettings (internal/config/path_overlap.go) ignores target_naming today, so two targets sharing a folder with different naming would rewrite each other. |
../sibling/ references in skill bodies |
Break as they already do under flat in copy mode. Optionally rewrite ../<sibling>/ for same-repo siblings in the copy. |
Sketch and test cases (only to pin down the semantics)
A third branch in ResolveTargetSkillsForTarget, reusing the standard-mode collision handling:
// prefixedTargetName returns "<repo>-<name>" for skills inside a tracked repo,
// and the plain name otherwise. It never prefixes twice.
func prefixedTargetName(skill DiscoveredSkill, skillName string) string {
if !skill.IsInRepo {
return skillName
}
repo := normalizeSpecName(strings.TrimPrefix(filepath.Base(skill.RepoRelPath), "_"))
if repo == "" || skillName == repo || strings.HasPrefix(skillName, repo+"-") {
return skillName
}
return repo + "-" + skillName
}Then skillpkg.ValidateName(target, target) instead of checking against the source dir, and in SyncTargetCopyWithSkillsOptions, after copyDirectoryWithIgnore, a line-based rewrite of name: in the copied SKILL.md (like ToggleFrontmatterFlag, so formatting survives).
| Source | name: |
Target |
|---|---|---|
_emil-design/skills/prototype |
prototype |
emil-design-prototype |
_mattpocock-skills/skills/engineering/prototype |
prototype |
mattpocock-skills-prototype |
_bmad/skills/bmad-ux |
bmad-ux |
bmad-ux |
my-skill (not tracked) |
my-skill |
my-skill |
| repo + name over 64 chars | — | skipped with a warning |
Activity
runkids commentedon Oct 8, 2026
Thanks for the detailed write-up. I checked it against the current code and against how other tools handle this, and I'd like to take
prefixed.Your analysis holds.
standarddoes drop both colliders (internal/sync/target_naming.go: every candidate whose name is in the collision set is skipped, and there is an integration test that asserts it).flatonly warns. The symbols you named exist and do what you describe, andinstall --name mpdoes produce_mp, so the short-prefix story works.Two small corrections to the sketch:
normalizeSpecNamedoesn't exist yet; it needs to be written (lowercase, map anything outside[a-z0-9]to-, collapse--, trim-).ToggleFrontmatterFlagonly adds or removes a boolean flag, so rewritingname:needs a new string setter. The line-based approach is still the right model.Why
prefixedand not the smaller alternative. I looked at how the tools resolve duplicate names. opencode, Goose and Amp keep one silently; pi and Gemini CLI keep the first and warn; Hermes errors on an ambiguous name. Only plugins get a namespace (plugin:skill), and that is composed at runtime, never written intoname:, since the Agent Skills spec only allowsa-z0-9-and requiresnameto match the directory. So<repo>-<name>, applied to both the folder andname:, is the spec-valid way to do this. Prefixing only the colliders would make a skill's name depend on what else is installed, so it can change the day another repo adds a same-named skill. A fixed rule is easier to reason about, and it also covers your provenance point.Planned scope:
target_naming: prefixed, opt-in, copy mode only (validation error otherwise, the same wayextensionbehaves). This isn't a cut: a merge-mode symlink points at the source, so there is no copy whosename:could be rewritten.standard(namemust match its folder), then the prefixed result is validated withskillpkg.ValidateName. Over-length names are skipped with a warning; collisions that remain after prefixing behave as instandard.flat,standard,prefixed) renames existing entries in place instead of leaving orphans. Today the migration only knows the flat name as the old name, so it needs generalising..skillshare-manifest.json) records which naming produced each entry. A switch then knows the old name exactly, and an entry whose naming changed is re-copied so itsname:matches, even when the source is unchanged. Manifests written before this fall back to checking the flat, standard and prefixed names in turn.../sibling/references are not rewritten, the same asflatin copy mode today. Rewriting markdown bodies is easy to get wrong, so I'd rather wait for a concrete case.Separately: you're right that
sameSkillsSettingsignorestarget_naming. It also ignoresmode. I reproduced it: two targets sharing one folder, oneflatand onestandard, only get the generic "targets share skill folders" hint, not the "each sync undoes the other" warning. They do fight, though: the flat target linksfrontend__dev, the standard target migrates it todev, and the next sync prunes and links again. It's a bug independent of this feature, so I opened #498 and will fix it first.No need for a
proposals/PR; this issue covers it. I'll ping you here when it ships.One thing to be aware of for Claude Code: the prefixed name becomes the slash command, e.g.
/mattpocock-skills-prototype, so--nameis worth using when you want something shorter.cescox commentedon Oct 8, 2026
Thanks so much! Recording the naming in the manifest is more reliable than my "manifest unchanged".
One thing to confirm: the no-double-prefix rule from the sketch stays (
_bmad+bmad-ux→bmad-ux), and skills outside tracked repos keep their plain name?My
universaltarget (~/.agents/skills) will move frommerge+flattocopy+prefixed, so it'll exercise the flat → prefixed migration. Happy to test a build against it before release.fix(sync): close gaps found while simulating the prefixed naming swit…
feat(sync): make prefixed target naming misconfigurations visible (#503)
runkids commentedon Oct 10, 2026
Shipped in v0.25.4. To confirm both points:
_bmad+bmad-uxstaysbmad-ux.name:get the prefix.For your
universaltarget, the switch is:--modeand--target-namingare applied together in one command. Switching naming renames managed entries in place and re-copies them soname:matches. If a local skill already holds a new name, that skill stays under its old entry andskillshare diffreports it asLocal only, skill kept under old name.Since you offered: running it against your real
merge+flatsetup would be the best check of the flat → prefixed migration. Please let me know how it goes.cescox commentedon Oct 10, 2026
Thanks so much, and for #498 too!
I tried it on 0.25.4 against my real
universaltarget (merge+flat→copy+prefixed, 46 skills: 40 from 6 tracked repos, 6 local). The migration went through cleanly: every entry was renamed in place with a matchingname:, no double prefixes (last30days,playwright-cli), local skills kept their names, and myinclude/excludepatterns written for the old flat names still matched.gemini skills listshows the new names.One thing I hit:
skillshare target universal --mode copy --target-naming prefixedrewroteconfig.yamland dropped its comments. The values it wrote were right, but I keep a generated block between# BEGIN …/# END …comment markers, so losing them quietly broke a check of mine. I restored the file from git and set the two keys by hand. Would you consider keeping comments when the config is written? Happy to open a separate issue for it.runkids commentedon Oct 11, 2026
Thanks for testing on your real target; that migration is the one I could not reproduce myself, so this confirms it.
Dropped comments in
config.yaml: confirmed, and it affects every command that writes the config, not justtarget. I'll fix it. Please open a separate issue for it; I'll link it from here and close this one.runkids commentedon Oct 11, 2026
Tracking the comment loss in #525. Closing this one;
prefixedshipped in v0.25.4.