[plugin-creator] Keep custom plugin and marketplace roots consistent
Source
Verified at openai/skills commit 49f948faa9258a0c61caceaf225e179651397431.
Reproduction
plugin-creator/scripts/create_basic_plugin.py independently resolves:
--pathfor the generated plugin directory.--marketplace-pathfor the marketplace file.
But build_marketplace_entry() always writes:
"path": "./plugins/<plugin-name>"
That source path is relative to the marketplace root. If a caller overrides only one of --path or --marketplace-path, the generated plugin and the marketplace entry can point to different directories.
For example, a custom plugin parent /tmp/example/plugins with the default marketplace still writes ./plugins/<name> relative to the working-directory marketplace, not /tmp/example/plugins/<name>.
Expected behavior
The generated marketplace entry should resolve to the plugin directory that was actually created, or the CLI should reject incompatible one-sided overrides.
Actual behavior
Both operations succeed, but the marketplace can reference a different or nonexistent plugin.
Proposed narrow fix
Derive the marketplace source path from the resolved plugin root relative to the resolved marketplace root. If the path cannot be represented by the supported portable convention, require paired compatible roots and fail with a clear message.
Acceptance test
Cover:
- Untouched defaults.
--pathonly.--marketplace-pathonly.- Paired custom roots.
- A plugin root outside the marketplace root.
For every successful case, resolve the written source.path against the marketplace root and assert it equals the generated plugin directory.
Source: openai/skills