Files
Agrici Daniel b3b0790707 fix(install): move the launcher to scripts/ so hosted marketplaces accept the plugin
The claude.ai-hosted marketplace refuses to sync any plugin that ships a
top-level bin/ directory, failing with
marketplace_sync_bin_directory_not_allowed. The runtime launcher lived in
bin/claude-seo, so the hosted listing could never sync and users could not
install the plugin from claude.ai at all.

bin/claude-seo is now scripts/claude-seo and resolves runtime.py as a sibling
(${launcher_dir}/runtime.py) rather than reaching up through ../scripts. No
top-level bin/ remains.

Skill and agent instructions no longer depend on bin/ PATH injection, which is
undocumented. The single canonical invocation is now:

    "${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo" run <script.py>

Claude Code substitutes ${CLAUDE_PLUGIN_ROOT} in SKILL.md body content and in
allowed-tools Bash rules, and exports it to hook processes, so the launcher is
found without any PATH entry. The path is quoted so a plugin root containing
spaces still works. AGENTS.md, which documents working in the checkout itself,
uses the repository-relative ./scripts/claude-seo instead.

Manual installs keep their existing behaviour. install.sh and install.ps1 copy
the launcher to ~/.claude/skills/seo/scripts/claude-seo, where runtime.py
already sits, and rewrite the canonical ${CLAUDE_PLUGIN_ROOT} token to that
absolute path in every Markdown file they install, because a manual install has
no plugin root. The rewrite stays atomic (temp file plus mv on Unix, single
UTF-8 write on Windows) and is idempotent: it consumes the plugin-root token,
so a second pass matches nothing. extensions/banana/install.sh does the same
for the files it installs.

tests/test_hosted_plugin_layout.py locks the contract: no top-level bin/, an
executable scripts/claude-seo that resolves its sibling runtime, no bare
launcher invocation left in any tracked skill, agent, or doc file, installers
that reference scripts/claude-seo, and a launcher smoke run that needs neither
network nor a provisioned venv.

Refs #298, #199.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015qjDbqj88SjLGY4MdQKGB8
(cherry picked from commit 1e1afc067db65463212e74b136d4212fefaa9416)
2026-09-10 17:26:23 +03:00
..