Skip to content

library: desktop.ini and Thumbs.db are no more an edit of a skill tha… - #1072

Open
TryWorld2026 wants to merge 1 commit into
yetone:mainfrom
TryWorld2026:fix/skill-walkers-skip-os-metadata
Open

TryWorld2026 wants to merge 1 commit into
yetone:mainfrom
TryWorld2026:fix/skill-walkers-skip-os-metadata

Conversation

@TryWorld2026

@TryWorld2026 TryWorld2026 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

library: desktop.ini and Thumbs.db are no more an edit of a skill than .DS_Store is

What is wrong

A skill given to an agent as a copy (#896) sits in a folder the user opens in a
file manager: Explorer writes desktop.ini and Thumbs.db into it, Finder
.DS_Store. Four walkers of a skill's files each had its own list of what
isn't the skill:

  • hashDir left all three in — so the file manager's own bytes changed the skill's hash;
  • treeOf and readSkill left .DS_Store out but not desktop.ini or Thumbs.db;
  • copyDir wrote whatever the source folder held.

So a copy with Explorer's files in it read as edited: the library took them
into its own folder, every agent was given a copy again, the page said the copy
differed from the library's, and a bundle carried them to another computer with
the skill.

While fixing it: hashDir and readSkill answered .git with return nil
rather than filepath.SkipDir, which kept walking into it — .git's contents
were being hashed as part of the skill.

What changed

SkipInSkill, in skill_edits.go where the list already was, now holds all of
them — magpie's own mark, .git, .DS_Store, desktop.ini and Thumbs.db,
compared without regard to case — and hashDir, treeOf, readSkill and
copyDir all walk by it, so a hash, a tree, a copy and a bundle agree on what a
skill is. The two .git walkers now answer filepath.SkipDir.

Semantic change (Library)

  • Before: a skill's hash, tree, copy and bundle each disagreed about what was
    part of the skill, so Explorer's or Finder's own files made a copy read as
    edited and were carried into the library and into bundles.
  • After: one list decides it for all four, so a copy with the file manager's
    files in it reads as current and the files are left where they are.
  • Reference: docs/subsystems/library.md (updated
    in this PR — the copy's hash contract is where this belongs);
    implementation SkipInSkill in internal/library/skill_edits.go, and its four
    callers in skillcheck.go, skills.go, carry.go.

Verification

Verified on Windows, where Explorer's names are the ones written.

  • Without the change TestSkillCopyIgnoresExplorerMetadata fails with
    the file manager's files made the copy look edited: [claude]; its assertions
    run past that one find the library's own folder and codex's copy holding
    desktop.ini, Thumbs.db and THUMBS.DB, and the library's skill kept with
    the backups for the edit.
  • TestCarryLeavesExplorerMetadataOut fails with the bundle carries .DS_Store
    and the two Explorer names.
  • Both pass with it. go test -tags nogui ./internal/library,
    go vet -tags nogui ./... and the windows, darwin and linux builds pass.

Not in this PR

#916 is a different bug with a different root cause and is untouched here.

…n .DS_Store is

A skill given to an agent as a copy (yetone#896) sits in a folder the user opens
in a file manager: Explorer writes desktop.ini and Thumbs.db into it, and
Finder .DS_Store. Four walkers of a skill's files each had its own list of
what isn't the skill — hashDir left all three in, treeOf and readSkill left
.DS_Store out but not desktop.ini or Thumbs.db, and copyDir wrote whatever
the source folder held. So a copy with Explorer's files in it read as
edited: the library took them into its own folder, every agent was given a
copy again, the page said the copy differed from the library's, and a
bundle carried them to another computer with the skill.

SkipInSkill, in skill_edits.go where the list already was, now holds all of
them — the mark, .git, .DS_Store, desktop.ini and Thumbs.db, compared
without regard to case — and hashDir, treeOf, readSkill and copyDir all
walk by it, so a hash, a tree, a copy and a bundle agree on what a skill
is.

Verified on Windows, where Explorer's names are the ones written. Without
the change TestSkillCopyIgnoresExplorerMetadata fails with "the file
manager's files made the copy look edited: [claude]"; its assertions run
past that one find the library's own folder and codex's copy holding
desktop.ini, Thumbs.db and THUMBS.DB, and the library's skill kept with
the backups for the edit. TestCarryLeavesExplorerMetadataOut fails with
"the bundle carries .DS_Store" and the two Explorer names. Both pass with
it. go test -tags nogui ./internal/library, go vet -tags nogui ./... and
the windows, darwin and linux builds pass.
@TryWorld2026
TryWorld2026 force-pushed the fix/skill-walkers-skip-os-metadata branch from a1d0428 to 1cfee8f Compare October 7, 2026 01:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant