create-cowork-plugin: verify SKILL.md byte-equality after zip in Phase 5#219
Open
Corvanadasha wants to merge 1 commit intoanthropics:mainfrom
Open
create-cowork-plugin: verify SKILL.md byte-equality after zip in Phase 5#219Corvanadasha wants to merge 1 commit intoanthropics:mainfrom
Corvanadasha wants to merge 1 commit intoanthropics:mainfrom
Conversation
Adds an inline Python check between zip and cp in Phase 5 step 4 so a mid-word truncated SKILL.md halts the build before reaching the user's outputs folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Phase 5 packages the plugin with
zip -r ... && cpand ships the archive straight to the user's outputs folder. There is no check that the files actually inside the.pluginarchive match the source on disk. Silent mid-word truncation has been observed in practice (e.g. ourcontent-research-writerregression in late April 2026, where a SKILL.md ended mid-sentence in the shipped archive). It is very hard to spot post-install because the truncation only shows up when the relevant section of the SKILL.md is exercised.Change
Wraps the existing zip+cp into a
set -eblock and inserts an inline Python step between them that:zipfile,SKILL.md,set -e) on any mismatch or missing source file.No external script dependency; pure stdlib. The check is fast (single-digit ms even for large plugins) and only runs once per build.
Why inline rather than a shipped script
Kept it inline so the plugin's installable footprint doesn't change and reviewers don't have to assess a new file. If you'd prefer a shipped
scripts/verify-build.py, happy to factor it out.Smoke tested
cpruns.[FAIL] skills/test-skill/SKILL.md: archive 57B vs source 47B, exits 1,set -ehalts the flow beforecp.