feat: add pack command to create .skill files#645
feat: add pack command to create .skill files#645rh42-ic wants to merge 5 commits intovercel-labs:mainfrom
Conversation
Add skills pack command that packages skills into .skill files (ZIP format). Supports packing from local paths, GitHub/GitLab repos, and installed skills.
- Add unit tests for validateSkill function (frontmatter, name, description) - Add CLI integration tests for pack command - Add showPackHelp() function and --help handling for pack command
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
elliotllliu
left a comment
There was a problem hiding this comment.
The pack command is a solid addition to the skills workflow — being able to create .skill files directly from the CLI closes a gap in the current toolchain.
1748 lines is a big PR though. A few questions:
- Does it validate SKILL.md frontmatter before packing?
- Is there a size limit for the output .skill file?
- How does it handle symlinks inside the skill directory?
Great work on this 🔥
Add pre-clone and post-clone size validation for skill packing: CLI options: - --max-size <size> -- Maximum skill size limit (default: 50MB) - --max-repo-size <size> -- Maximum repository size limit (default: 500MB) - --skip-size-check -- Skip size validation Implementation: - Add calculateSkillSize() for local skill size calculation - Add fetchRemoteRepoSize() using GitHub Trees API and GitLab Projects API - Add SizeInfo and RepoSizeResult types - Check repository size before cloning (GitHub/GitLab only) - Check skill size before packing - Display formatted error messages with suggestions Tests: - Add 8 new test cases for size checking functionality
- Add warnings field to ValidationResult interface - Add ValidateSkillOptions interface with strictProperties option - Default behavior: unexpected properties generate warnings (valid=true) - Strict mode: unexpected properties generate errors (valid=false) - Add --strict-properties CLI flag to pack command - Update README with new option
Yes, I've added validation functionality based on the latest version of Based on recent testing, the validation might be a bit too strict—it currently rejects all custom properties (such as those used by OpenClaw). I am considering adding an extra option to handle this more flexibly.
Thanks for the heads-up! I will add two parameters to control and limit the size of both the skill and the repository, ensuring these checks happen before the download whenever possible.
Thanks for the heads-up! This is definitely an area that needs improvement. I'll look into a better way to handle these. |
Add skills pack command that packages skills into .skill files (ZIP format) (like
skill-creator/SKILL.md).Supports packing from local paths, GitHub/GitLab repos, and installed skills.