fix(skills): stop syncing bookkeeping dirs to sandboxes

iter_skills_files() walked the skills tree with a bare rglob("*"), so the
.hub download cache, .archive, curator backups, and any node_modules/.git
under a skill package were uploaded to the sandbox on every sync. The
sandbox never reads them: skill content is resolved host-side.

EXCLUDED_SKILL_DIRS is already the canonical exclusion set, honoured by
discovery and backup. Apply it to the sync path too, across all three
roots iter_skills_files() walks (local, external, project-local), and add
.curator_backups to the set.

Measured on a local install: 900 files / 67.3 MB -> 771 files / 8.4 MB.

This is not just wasted bandwidth on the SSH backend, where the oversized
payload can exceed the 120s _ssh_bulk_upload deadline and surface as the
agent hanging on every tool call.

The filter intentionally does not reuse is_excluded_skill_path(), which
also prunes references/, templates/, assets/ and scripts/ -- those hold
support files and bundled scripts the sandbox does read and execute.
This commit is contained in:
Carry00
2026-08-27 23:33:50 +08:00
committed by kshitij
parent c4e394cdf8
commit edac49e473
3 changed files with 69 additions and 3 deletions
+1
View File
@@ -31,6 +31,7 @@ EXCLUDED_SKILL_DIRS = frozenset(
".github",
".hub",
".archive",
".curator_backups",
".venv",
"venv",
"node_modules",