mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Replace duplicated runCollectSkills/runCollectAgents (~110 lines of 95% identical code) with a single runCollectPlan function driven by a collectPlan struct + toCollectResources[T] generic converter. Key changes: - Add collectPlan/collectResources types and runCollectPlan unified flow - Add toCollectResources[T] generic to bridge typed slices into the shared pipeline (scan → display → dry-run → confirm → pull → render) - Replace fragile err.Error() == "already exists in source" string matching with ErrAlreadyExists sentinel error + errors.Is() - Move os.MkdirAll from per-agent PullAgent to PullAgents (call once) - Add FindLocalAgents/PullAgent/PullAgents to match FindLocalSkills API - Add target selection, --force/--dry-run/--json support for agent collect - Add integration tests for agent collect (target filter, dry-run, force, JSON, oplog, project mode) - Update collect.md, agents.md, ui.md docs for agent collect support