Skip to content

feat: distribute PGX through Claude Code Plugin Marketplace - #34

Merged
alexshapalov merged 2 commits into
mainfrom
feat/claude-plugin-marketplace
Oct 26, 2026
Merged

alexshapalov merged 2 commits into
mainfrom
feat/claude-plugin-marketplace

Conversation

@alexshapalov

@alexshapalov alexshapalov commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

PGX becomes installable inside Claude Code through its native plugin manager, without leaving the session:

/plugin marketplace add pgrundev/pgx
/plugin install pgx@pgrundev
/pgx:pgx Set up isolated Postgres databases for this project.
  • Marketplace pgrundev at .claude-plugin/marketplace.json (one plugin today, reusable for more PostgreSQL tools).
  • Plugin pgx at plugins/pgx/: .claude-plugin/plugin.json (version 0.1.1), README.md, and skills/pgx/, a verbatim copy of the canonical Skill. plugins/sync.sh regenerates the copy; plugins/sync.sh --check fails CI on drift. 84 KB installed, 16 files, ~190–270 tokens of always-on context. No hooks, MCP servers, commands or binaries.
  • Skill (skills/pgx/SKILL.md): adds the plugin install path for its helper scripts (${CLAUDE_PLUGIN_ROOT}/skills/pgx/scripts/…, substituted by Claude Code when loaded from the plugin); metadata.version β†’ 0.1.1 to match the plugin. references/claude-code.md documents both install routes and running them side by side.
  • No duplicate hooks: hooks keep coming from pgx agent setup only. Installing, updating, disabling or removing the plugin never touches .claude/settings.json (tested). A user-scope install does nothing in projects without .pgx.toml.
  • Skills CLI unchanged: npx skills add pgrundev/pgx --skill pgx still installs the plain skill /pgx; with both installed Claude Code lists /pgx and /pgx:pgx.
  • Tests/CI: plugins/tests/pgx/run.sh (validate --strict on plugin + marketplace, directory profile, drift, hygiene, isolated install β†’ list β†’ details β†’ disable β†’ enable β†’ update β†’ project/local scope β†’ uninstall β†’ reinstall β†’ marketplace remove, hooks untouched, Skills-CLI copy alongside); new CI job plugin with a pinned Claude Code CLI (2.1.310) and gitleaks over the package.
  • Docs: README install block, docs/pgx/local-dev/claude-plugin.md, agents.md, validation note.

Validation

  • claude plugin validate --strict plugins/pgx and --strict .: passed (Claude Code 2.1.310). --profile directory: no refusals (icon recommended).
  • Local marketplace install cycle: all plugin tests pass; Skill contract tests and skills-ref validate pass.
  • Public install from this branch (pgrundev/pgx#feat/claude-plugin-marketplace): full clone 53 s / 2.2 GB on disk (192 MB fetch); --sparse .claude-plugin plugins 8 s / 72 MB; plugin installs, claude plugin details pgx β†’ Skills (1) pgx, Hooks (0), MCP servers (0); cache holds only the 84 KB package.
  • Interactive session (pty-driven, screens recorded): /plugin marketplace add, /plugin install pgx@pgrundev β†’ scope dialog β†’ "Plugin is now active", Installed tab lists it, /pgx: autocompletes /pgx:pgx, invoking it loads the skill from the plugin cache.
  • Live Rails run through the plugin (3 sessions, $1.87): setup via /pgx:pgx (schema-only template, pgx agent setup, hooks once), feature work in a hook-provided branch (migration + tests green; column only in the branch), third session with its own branch; developer PostgreSQL schema byte-identical; all branches cleaned up by the supervisor after the grace period. Uninstall leaves databases, templates, .pgx.toml and hooks intact. Details: docs/pgx/local-dev/validation/2026-10-26-claude-plugin-live.md.

Known cost

/plugin marketplace add pgrundev/pgx clones the repository (fuzz corpora and benchmark logs): 192 MB fetch, 2.2 GB on disk, about a minute. The installed plugin is 84 KB. The in-session command has no sparse option; documented in claude-plugin.md. PGX is not submitted to Anthropic's directory; the submission material is in the doc.

Not merged: awaiting review and authorization.

πŸ€– Generated with Claude Code

alexshapalov and others added 2 commits October 26, 2026 11:05
Add a Claude Code plugin marketplace (`pgrundev`, .claude-plugin/marketplace.json)
with one plugin, `pgx` (plugins/pgx), so Claude Code users install the PGX
Agent Skill inside a session:

    /plugin marketplace add pgrundev/pgx
    /plugin install pgx@pgrundev
    /pgx:pgx Set up isolated Postgres databases for this project.

The plugin packages the canonical Skill (skills/pgx) unchanged: plugins/sync.sh
copies it into plugins/pgx/skills/pgx and `--check` fails CI on drift. It ships
no hooks, MCP servers or binaries; project hooks keep coming from `pgx agent
setup`, so installing the plugin at user scope does nothing in projects that
have not opted in, and install/uninstall never touch .claude/settings.json.

SKILL.md gains the plugin install path for its helper scripts
(${CLAUDE_PLUGIN_ROOT}/skills/pgx/scripts/…, substituted when loaded from the
plugin) and its metadata.version moves to 0.1.1 to match the plugin version.

Tests: plugins/tests/pgx/run.sh (manifests with `claude plugin validate
--strict`, directory profile, drift, hygiene, isolated install/enable/disable/
update/scope/uninstall/reinstall cycle, hooks untouched, Skills-CLI copy
alongside). CI job `plugin` runs it with a pinned Claude Code CLI and scans
the package with gitleaks. Docs: README, agents.md, new claude-plugin.md,
references/claude-code.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Three headless Claude Code sessions in a Rails project with the plugin
installed from the public branch (setup through /pgx:pgx, feature work in a
hook-provided branch, a third session with its own branch), the interactive
/plugin flow with recorded screens, removal/reinstall, coexistence with a
Skills CLI copy, measured clone and install sizes, and the directory
submission material.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alexshapalov
alexshapalov marked this pull request as ready for review October 26, 2026 18:37
@alexshapalov
alexshapalov merged commit 1930b68 into main Oct 26, 2026
10 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.

1 participant