fix: download full skill bundle instead of SKILL.md only#1
Merged
Conversation
Skills often bundle SKILL.md with references/, scripts/, assets/, templates/, and other subdirs. The install flow previously hardcoded SKILL.md + references/*.md + scripts/*.sh, which silently dropped every other file. Skills with .py/.js scripts or unlisted subdirs were installed broken. - Add scripts/fetch-skill-bundle.sh: parses GitHub blob/tree/raw URLs, enumerates the skill root via git tree API, downloads every file preserving subtree layout - Rewrite installation-guide.md §3d (GitHub + Direct URL sources) to use tree enumeration instead of hardcoded subdirs/extensions - Update SKILL.md Step 4 to walk the full installed tree and verify bundle completeness against relative paths SKILL.md references - Update scan scope and integrity hashing to cover every file in the bundle - Add rationalization/red-flag entries for partial-download mistakes Verified against anthropics/skills/skills/pdf: old flow produced 1 file, new flow produces 12 files (SKILL.md + forms.md + reference.md + LICENSE.txt + 8 Python scripts) with correct scripts/ subtree. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Skills often bundle
SKILL.mdwithreferences/,scripts/,assets/,templates/, and other subdirs. The install flow previously hardcodedSKILL.md+references/*.md+scripts/*.sh, which silently dropped every other file — skills with.py/.jsscripts or unlisted subdirs were installed broken.This PR makes the installer fetch the entire skill root directory via the git tree API, preserving the subtree layout.
Changes
scripts/fetch-skill-bundle.sh— parses GitHubblob/tree/raw.githubusercontent.comURLs, enumerates the skill root viagit/trees/{ref}?recursive=1, downloads every file preserving layout. Handles SKILL.md URLs by auto-deriving the parent dir.installation-guide.md§3d rewrite — GitHub + Direct URL sources now use tree enumeration instead of hardcoded subdirs/extensions.SKILL.mdStep 4 rewrite — walks the full installed tree; verifies bundle completeness against relative paths SKILL.md references.find -type f), not justSKILL.md/references/*.md/scripts/*.sh.Test plan
Verified end-to-end against
anthropics/skills/skills/pdf(9 Python scripts):SKILL.mdonly)fetch-skill-bundle.sh)SKILL.md+forms.md+reference.md+LICENSE.txt+ 8×scripts/*.py)--severity=warning) passes for the new script (CI config)bash -n install.sh,py_compile install.py)tree/,blob/SKILL.md,raw.githubusercontent.com— all produce identical 12-file outputBreaking changes
None. The change only affects the internal install flow; user-facing skill directory layout is unchanged.
🤖 Generated with Claude Code