Skip to content

feat(plugin): emit an installable Claude Code marketplace - #1176

Merged
zzet merged 1 commit into
zzet:mainfrom
sronix:feat/970-plugin-marketplace
Oct 29, 2026
Merged

zzet merged 1 commit into
zzet:mainfrom
sronix:feat/970-plugin-marketplace

Conversation

@sronix

@sronix sronix commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Part of #970. gortex plugin emit now writes a Claude Code plugin marketplace, so gortexhq/claude-plugin can be installed with:

claude plugin marketplace add gortexhq/claude-plugin
claude plugin install gortex@gortex

Those commands work once the next release, or a manual run of publish-claude-plugin, publishes the new layout. The issue can close then.

Changes

  • New EmitMarketplace writes .claude-plugin/marketplace.json (marketplace gortex, one entry with source ./plugins/gortex), a root README and LICENSE, and the existing plugin bundle under plugins/gortex/. The entry carries no version, so plugin.json stays the single source.
  • gortex plugin emit uses it. A target that still holds the old flat layout (.claude-plugin/plugin.json at its root) is refused with an error instead of cleaned, because the emitter cannot tell its old files from files someone added. make claude-plugin clears ./claude-plugin first, so local rebuilds keep working.
  • Removed the legacy cleanup added in fix(plugin): emit each workflow once as a namespaced skill #1173. It only ever applied at the old root, which is now refused, and it deleted by file name.
  • Docs: a Claude Code plugin section in docs/installation.md, a pointer to it from docs/onboarding.md, and install commands in the plugin and marketplace READMEs. They say to run gortex install / gortex init with --agents-skip claude-code alongside the plugin, since setting up both duplicates the MCP server, workflows and hooks, and that the skip also drops the CLAUDE.md blocks and per-repo community skills. The plugin README also no longer says the installer runs gortex install and gortex init; it only prints them.
  • publish-claude-plugin.yml needs no logic change: CI emits into a fresh checkout and rsync --delete replaces the old flat files in the target repo. I only corrected its comment about README/LICENSE excludes.

Open question: the skip is a trade-off. The plugin does not provide the CLAUDE.md blocks or the per-repo community skills, and someone who already ran gortex install / init has no Claude-only uninstall. Would you like gortex init to keep writing the repo context while leaving out the MCP entry and hooks when the plugin is installed? I kept this PR to documenting the current flag.

Testing

  • go test ./internal/agents/claudecode/: passes. New tests cover the layout, the manifest pointing at a plugin.json with the same name, the flat-layout refusal leaving the target untouched, unrelated files surviving, and idempotence.
  • claude plugin validate --strict on the emitted marketplace and on plugins/gortex: both pass (only the plugin icon warning remains).
  • claude plugin marketplace add <emitted dir> then claude plugin install gortex@gortex in a clean Claude Code config (CLAUDE_CONFIG_DIR set to an empty directory): both succeed; claude plugin details gortex shows 21 skills, 2 agents, 7 hooks and the gortex MCP server.
  • All tests pass (go test -race ./...): not run in full locally
  • New tests added for new functionality
  • Benchmarks run if performance-relevant

Checklist

  • Code follows existing patterns in the codebase
  • No unnecessary abstractions added
  • Language extractor includes Meta["methods"] for interfaces (n/a)
  • Methods have EdgeMemberOf edges to their containing type (n/a)

gortex plugin emit now writes .claude-plugin/marketplace.json, a root
README and LICENSE, and the plugin under plugins/gortex/, so
gortexhq/claude-plugin can be added with `claude plugin marketplace add`
and installed as gortex@gortex.

A target that still holds the older flat layout is refused rather than
cleaned, since the emitter cannot tell its old files from added ones.
The by-name legacy cleanup from zzet#1173 is removed for the same reason.

Document the plugin install, and that `--agents-skip claude-code`
avoids registering Gortex twice at the cost of the CLAUDE.md blocks
and per-repo community skills.

Part of zzet#970
@zzet
zzet merged commit 5ab2847 into zzet:main Oct 29, 2026
27 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.

2 participants