Repository navigation
feat: build a ChatGPT plugin archive from a plugin folder - #4
Merged
Merged
Conversation
scripts/build_chatgpt_archive.py writes a plugin in the portable Agent Plugins layout that ChatGPT reads: plugin.json at the root, the skills without their eval folders, and mcp.json for the hosted connector when its address is given. The listing text comes from plugins/<plugin>/platforms/chatgpt.json. The same source always gives the same archive.
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.
This brings the commit of pull request 2 to
main. That pull request was merged intofeat/scaffold-and-linterafter pull request 1 had already been merged, so it never reachedmain.What and why
The plugin folders in this repository are laid out for one assistant's marketplace. Charities also use ChatGPT, which takes a plugin as an uploaded archive in the portable Agent Plugins layout. Keeping a second copy of each plugin by hand would drift, so this adds a build step that writes the archive from the one source.
scripts/build_chatgpt_archive.py <plugin>writesdist/<plugin>-chatgpt-<version>.zipholding:plugin.jsonat the root, made from the plugin's own manifest, with the listing text ChatGPT shows taken fromplugins/<plugin>/platforms/chatgpt.json;skills/, without the eval folders and hidden files;mcp.jsonnaming the hosted Kindtech connector as one remote server with no sign-in, only when--connector-urlis given;It refuses a plugin with no skill, a skill that breaks the Agent Skills specification, listing text over OpenAI's published length limits, and a connector address that is not plain https. The same source always gives the same archive, byte for byte.
This branch sits on top of the scaffold branch and should be merged after it.
How I tested it
uv run pytest: 42 tests pass, 11 of them new. They build an archive from a small invented plugin and check the file list, the manifest, the connector entry, the refusals above and that two builds are identical.uv run ruff format --check .,uv run ruff check .anduv run python scripts/lint_skills.pypass.uk-open-datawith the first skill present (on a local merge with the skill branch) and read the file list andplugin.jsonby eye.categoryandcapabilities, and the placement of the no-sign-in setting inside the server entry.Tools that helped
Claude Code wrote this change.
Checklist
git commit -s). They are not: an agent made them, and the sign-off is a person's statement.