Repository navigation
Description
Problem
Some skill repos package multiple host-specific skill trees in one source directory, for example:
.cursor/skills/....factory/skills/...openclaw/skills/....agents/skills/...
When those nested SKILL.md files do not declare targets: frontmatter, discovery currently leaves Targets as nil. During sync, nil means "sync to every target", so a Cursor target can receive skills that were actually packaged for another host.
In practice, this makes the same logical skill appear multiple times in a target tool's skill picker. I hit this mostly with gstack-style repos that contain several host-specific skill trees.
Local Evidence
In my Cursor target, I saw multiple entries for the same gstack skills after sync. The root gstack skill and host-specific flattened skills could both be present, and Cursor recursively indexes nested SKILL.md files.
The rough local shape was:
~/.cursor/skills/gstack
~/.cursor/skills/gstack__.cursor__skills__gstack-setup-browser-cookies
~/.cursor/skills/gstack__.cursor__skills__...
This makes the skill picker noisy and hard to use.
Proposed Fix
PR #144 keeps this as a small bug fix: infer targets from known host-specific project skill paths during full discovery.
Examples:
.cursor/skills/<skill>->cursor.factory/skills/<skill>->droidopenclaw/skills/<skill>->openclaw.skills/<skill>->letta.agents/skills/<skill>->universal
Generic skills without host-specific paths still keep Targets == nil, so they continue syncing everywhere. DiscoverSourceSkillsLite intentionally keeps the previous behavior.
Validation
PR #144 includes unit and integration coverage. I ran:
go test ./internal/sync
go test ./internal/...
go build -o bin/skillshare ./cmd/skillshare
SKILLSHARE_TEST_BINARY=/Users/larry_1/Opensource/skillshare/bin/skillshare go test ./tests/integration -run TestSkillTargetsThe PR also addresses the bot review feedback about non-*/skills/* project paths and repeated project-target map construction.
Activity