Skip to content

docs: add 16MB size limit note for plugin publishing#8108

Merged
Soulter merged 1 commit into
AstrBotDevs:masterfrom
Pleiades1726:docs/plugin-publish-16mb-limit
May 9, 2026
Merged

docs: add 16MB size limit note for plugin publishing#8108
Soulter merged 1 commit into
AstrBotDevs:masterfrom
Pleiades1726:docs/plugin-publish-16mb-limit

Conversation

@Pleiades1726
Copy link
Copy Markdown
Contributor

@Pleiades1726 Pleiades1726 commented May 9, 2026

修改内容

在插件发布文档(中/英文)中补充了 16MB 大小限制 的说明,并给出了优化建议。

中文文档 (docs/zh/dev/star/plugin-publish.md)

English Docs (docs/en/dev/star/plugin-publish.md)

背景

Issue #8091 的讨论中,有插件发布者因 zip 包超出 16MB(超了 9KB)被 CI/CD 自动拒绝,而发布者对此并不知情。

具体内容

  • 明确说明插件压缩包(zip)大小不得超过 16MB,超出后 CI/CD 流水线会自动拒绝
  • 建议措施:
    • 压缩图片等静态资源
    • 清理不必要的文件(.git__pycache__node_modules 等),建议添加 .gitignore
    • 优化依赖体积
    • 使用 .gitattributes 或发布分支策略
  • 提供了无法满足限制时的处理方式:联系维护者手动 bypass

Summary by Sourcery

Documentation:

  • Update English and Chinese plugin publishing docs to describe the 16MB plugin zip size limit, recommend ways to reduce package size, and document how to request a manual bypass when necessary.

Add documentation to clarify the 16MB zip size limit for plugin
marketplace submissions, along with practical recommendations:
- Compress static assets like images
- Clean up unnecessary files (.git, __pycache__, etc.)
- Optimize dependency sizes
- Use .gitattributes or release branches

Also mention the option to contact maintainers for manual bypass
when the limit cannot be met.
@auto-assign auto-assign Bot requested review from Fridemn and LIghtJUNction May 9, 2026 13:51
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 9, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Consider clarifying whether the 16MB limit refers to the raw ZIP file size on disk or a specific CI check metric (e.g., GitHub artifact size) so users know exactly what is being measured.
  • In the Chinese version, you might replace the English word “bypass” with a clearer localized phrase (e.g., “手动放行/豁免该限制”) to keep the tone consistent with the rest of the document.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider clarifying whether the 16MB limit refers to the raw ZIP file size on disk or a specific CI check metric (e.g., GitHub artifact size) so users know exactly what is being measured.
- In the Chinese version, you might replace the English word “bypass” with a clearer localized phrase (e.g., “手动放行/豁免该限制”) to keep the tone consistent with the rest of the document.

## Individual Comments

### Comment 1
<location path="docs/zh/dev/star/plugin-publish.md" line_range="7" />
<code_context>
 你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GTIHUB` 按钮,你将会被导航到 AstrBot 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。

 ![fill out the form](https://files.astrbot.app/docs/source/images/plugin-publish/image.png)
</code_context>
<issue_to_address>
**issue (typo):** Fix the transposed letters in `GTIHUB` to correctly spell `GitHub`.

Please change `GTIHUB` to the correct brand spelling (e.g. `GitHub`), matching the actual button label casing if it differs.

```suggestion
你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GitHub` 按钮,你将会被导航到 AstrBot 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -7,3 +7,14 @@ AstrBot 使用 GitHub 托管插件,因此你需要先将插件代码推送到
你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GTIHUB` 按钮,你将会被导航到 AstrBot 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (typo): Fix the transposed letters in GTIHUB to correctly spell GitHub.

Please change GTIHUB to the correct brand spelling (e.g. GitHub), matching the actual button label casing if it differs.

Suggested change
你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GTIHUB` 按钮,你将会被导航到 AstrBot 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。
你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GitHub` 按钮,你将会被导航到 AstrBot 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation in both English and Chinese regarding a 16MB size limit for plugin submissions, along with recommendations for reducing package size. Review feedback suggests clarifying that the ZIP package is automatically generated from the repository to prevent users from looking for an upload button, and distinguishing between bundled resources and external dependencies to avoid confusion for Python developers. Further improvements include specifically mentioning the export-ignore attribute in .gitattributes and using more formal terminology in the Chinese translation.


![fill out the form](https://files.astrbot.app/docs/source/images/plugin-publish/image.png)

> ⚠️ **大小限制**:发布到插件市场的插件压缩包(zip)大小**不得超过 16MB**。如果超过此限制,CI/CD 流水线将自动拒绝该发布请求。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

建议明确说明是“从仓库生成的压缩包”,因为用户是通过提交仓库 URL 进行发布的,而非直接上传 ZIP。这可以避免用户误以为有上传 ZIP 的入口。

Suggested change
> ⚠️ **大小限制**发布到插件市场的插件压缩包(zip)大小**不得超过 16MB**。如果超过此限制,CI/CD 流水线将自动拒绝该发布请求。
> ⚠️ **大小限制**从仓库生成的插件压缩包(ZIP)大小**不得超过 16MB**。如果超过此限制,CI/CD 流水线将自动拒绝该发布请求。

>
> - **压缩图片等静态资源**:对插件中的图片、音频等资源文件进行压缩,减小体积。
> - **清理不必要的文件**:避免将 `.git` 目录、`__pycache__`、`node_modules`、开发用配置文件等非必需文件提交到插件仓库中。建议在仓库根目录添加 `.gitignore` 来排除它们。
> - **优化依赖体积**:如果插件包含体积较大的依赖库,可考虑精简或按需引入。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

对于 Python 插件,requirements.txt 中的依赖在安装时下载,不计入仓库体积。建议明确指代“内置资源”或“内嵌库”,以免误导用户去精简正常的外部依赖。

Suggested change
> - **优化依赖体积**如果插件包含体积较大的依赖库,可考虑精简或按需引入
> - **优化内置资源体积**如果插件包含体积较大的内置依赖库或数据文件,可考虑精简或通过外部下载

> - **压缩图片等静态资源**:对插件中的图片、音频等资源文件进行压缩,减小体积。
> - **清理不必要的文件**:避免将 `.git` 目录、`__pycache__`、`node_modules`、开发用配置文件等非必需文件提交到插件仓库中。建议在仓库根目录添加 `.gitignore` 来排除它们。
> - **优化依赖体积**:如果插件包含体积较大的依赖库,可考虑精简或按需引入。
> - **使用 `.gitattributes` 或发布分支**:通过只包含发布所需文件的策略来减小 zip 包体积。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

建议提到 .gitattributes 中的 export-ignore 属性,这是控制 GitHub 归档(ZIP)内容的关键配置。

Suggested change
> - **使用 `.gitattributes` 或发布分支**通过只包含发布所需文件的策略来减小 zip 包体积。
> - **使用 .gitattributes 或发布分支**利用 .gitattributes 中的 export-ignore 属性排除非必要文件,或通过专门的发布分支来减小生成的 ZIP 包体积。

> - **优化依赖体积**:如果插件包含体积较大的依赖库,可考虑精简或按需引入。
> - **使用 `.gitattributes` 或发布分支**:通过只包含发布所需文件的策略来减小 zip 包体积。
>
> 如果插件确实因业务需要无法压缩到 16MB 以内,可以联系维护者手动 bypass 此限制。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

建议将 "bypass" 替换为更正式的中文词汇,如“绕过”或“豁免”,以保持文档风格的一致性。

Suggested change
> 如果插件确实因业务需要无法压缩到 16MB 以内,可以联系维护者手动 bypass 此限制
> 如果插件确实因业务需要无法压缩到 16MB 以内,可以联系维护者手动绕过此限制


![fill out the form](https://files.astrbot.app/docs/source/images/plugin-publish/image.png)

> ⚠️ **Size Limit**: The plugin zip package submitted to the marketplace **must not exceed 16MB**. If it exceeds this limit, the CI/CD pipeline will automatically reject the submission.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

建议明确说明是“从仓库生成的压缩包”(generated from your repository),以避免用户寻找上传 ZIP 的按钮。

Suggested change
> ⚠️ **Size Limit**: The plugin zip package submitted to the marketplace **must not exceed 16MB**. If it exceeds this limit, the CI/CD pipeline will automatically reject the submission.
> ⚠️ **Size Limit**: The plugin ZIP package generated from your repository **must not exceed 16MB**. If it exceeds this limit, the CI/CD pipeline will automatically reject the submission.

>
> - **Compress static assets**: Compress images, audio, and other resource files in your plugin to reduce their size.
> - **Clean up unnecessary files**: Avoid including directories like `.git`, `__pycache__`, `node_modules`, or development configuration files in your plugin repository. Add a `.gitignore` file to your repository root to exclude them.
> - **Optimize dependency size**: If your plugin depends on large libraries, consider trimming them down or importing only what is needed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

理由同中文版建议,建议明确指代“内置资源”或“内嵌库”。

Suggested change
> - **Optimize dependency size**: If your plugin depends on large libraries, consider trimming them down or importing only what is needed.
> - **Optimize bundled resources**: If your plugin includes large bundled libraries or data files, consider trimming them down or hosting them externally.

> - **Compress static assets**: Compress images, audio, and other resource files in your plugin to reduce their size.
> - **Clean up unnecessary files**: Avoid including directories like `.git`, `__pycache__`, `node_modules`, or development configuration files in your plugin repository. Add a `.gitignore` file to your repository root to exclude them.
> - **Optimize dependency size**: If your plugin depends on large libraries, consider trimming them down or importing only what is needed.
> - **Use `.gitattributes` or a release branch**: Reduce the zip package size by including only the files necessary for distribution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

建议提到 export-ignore 属性。

Suggested change
> - **Use `.gitattributes` or a release branch**: Reduce the zip package size by including only the files necessary for distribution.
> - **Use .gitattributes or a release branch**: Use the export-ignore attribute in .gitattributes to exclude unnecessary files, or use a dedicated release branch to reduce the ZIP package size.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 9, 2026
@Soulter Soulter merged commit 224915f into AstrBotDevs:master May 9, 2026
21 checks passed
murphys7017 pushed a commit to murphys7017/AstrBot that referenced this pull request May 11, 2026
Add documentation to clarify the 16MB zip size limit for plugin
marketplace submissions, along with practical recommendations:
- Compress static assets like images
- Clean up unnecessary files (.git, __pycache__, etc.)
- Optimize dependency sizes
- Use .gitattributes or release branches

Also mention the option to contact maintainers for manual bypass
when the limit cannot be met.

Co-authored-by: Seio <seio@astrbot.app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants