Skip to content

feat: add pack command to create .skill files#645

Open
rh42-ic wants to merge 5 commits intovercel-labs:mainfrom
rh42-ic:main
Open

feat: add pack command to create .skill files#645
rh42-ic wants to merge 5 commits intovercel-labs:mainfrom
rh42-ic:main

Conversation

@rh42-ic
Copy link

@rh42-ic rh42-ic commented Mar 15, 2026

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.

# Pack a local skill
npx skills pack ./my-skill

# Pack from GitHub repository
npx skills pack owner/repo

# Pack specific skill from repo with multiple skills
npx skills pack owner/repo --skill my-skill

# List available skills in a source
npx skills pack ./my-skills --list

# Pack an installed skill
npx skills pack --installed --skill git-commit

# List installed skills available for packing
npx skills pack --installed --list

# Pack all skills from a source
npx skills pack ./my-skills --all -o ./output

# Pack without confirmation prompts
npx skills pack owner/repo --skill my-skill -y

rh42-ic added 3 commits March 15, 2026 14:32
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
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​archiver@​7.0.01001007181100
Addedarchiver@​7.0.11001009980100

View full report

Copy link
Contributor

@elliotllliu elliotllliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🔥

rh42-ic added 2 commits March 18, 2026 14:10
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
@rh42-ic
Copy link
Author

rh42-ic commented Mar 18, 2026

  • Does it validate SKILL.md frontmatter before packing?

Yes, I've added validation functionality based on the latest version of skill-creator. Currently, this only affects the pack process because I want to keep the merge overhead low and avoid modifying the add workflow for now. I may consider integrating it into the add flow after gathering more feedback.

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.

  • Is there a size limit for the output .skill file?

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.

  • How does it handle symlinks inside the skill directory?

Thanks for the heads-up! This is definitely an area that needs improvement. I'll look into a better way to handle these.

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.

2 participants