Skip to content

feat(publish): relax skill upload constraints#80

Merged
yun-zhi-ztl merged 17 commits intomainfrom
feature/project-fixbug
Mar 18, 2026
Merged

feat(publish): relax skill upload constraints#80
yun-zhi-ztl merged 17 commits intomainfrom
feature/project-fixbug

Conversation

@yun-zhi-ztl
Copy link
Collaborator

@yun-zhi-ztl yun-zhi-ztl commented Mar 18, 2026

Changes

1. Size Limit Adjustments

  • Single file size limit: 1MB → 10MB
  • Total extracted package size limit: 10MB → 100MB

2. Expanded Allowed File Extensions

Added 21 common file types:

  • Config: .toml .xml .ini .cfg .env
  • Docs: .html .css .csv .pdf
  • Images: .jpeg .gif .webp .ico
  • Scripts/Languages: .rb .go .rs .java .kt .lua .sql .r .bat .ps1 .zsh .bash

3. Support Zip with Single Root Directory Wrapper

When a zip extracts to a single root directory (e.g. my-skill/), the wrapper directory is automatically stripped. The existing behavior (files directly at root) is preserved.

4. Other Improvements

  • Refactored SkillPackageArchiveExtractor to inject SkillPublishProperties instead of using hardcoded constants
  • Added magic byte validation for new image types (jpeg/gif/webp/ico/pdf)
  • Extended secret scanning to cover newly added text file types
  • Expanded determineContentType() MIME type mapping for new extensions

Tests

  • SkillPackageValidatorTest: 14 tests passed
  • SkillPackageArchiveExtractorTest: 7 tests passed
  • BasicPrePublishValidatorTest: passed

@yun-zhi-ztl yun-zhi-ztl changed the title feat(publish): 放宽 skill 上传约束 feat(publish): relax skill upload constraints Mar 18, 2026
@yun-zhi-ztl yun-zhi-ztl merged commit 0e764d8 into main Mar 18, 2026
2 checks passed
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.

3 participants