From 47a95ba6cbbc4589621a7d3fc1ae03cdd1bafc27 Mon Sep 17 00:00:00 2001 From: naudachu Date: Fri, 5 Jun 2026 22:20:54 +0500 Subject: [PATCH] readme: fix install via plugin marketplace The install steps used a non-existent "plugins" settings key, so a fresh clone loaded nothing. Add .claude-plugin/marketplace.json and document the supported /plugin marketplace add + /plugin install tea@tea flow. Co-Authored-By: Claude Opus 4.8 --- .claude-plugin/marketplace.json | 13 +++++++++++++ README.md | 34 +++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 .claude-plugin/marketplace.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..55577f4 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,13 @@ +{ + "name": "tea", + "owner": { + "name": "naudachu" + }, + "plugins": [ + { + "name": "tea", + "source": "./", + "description": "Gitea CLI (tea) reference plus a mandatory-login guard. Ships /tea:login, /tea:use, and a PreToolUse hook that blocks any tea command that would touch Gitea without --login." + } + ] +} diff --git a/README.md b/README.md index 3fc5942..ffda5f5 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,29 @@ A Claude Code plugin that gives Claude a reference for the `tea` CLI and enforce ## Installation -Clone this repo into your Claude Code plugins directory: +This is a Claude Code plugin — install it through the plugin marketplace, not by hand-editing `settings.json`. -```bash -git clone ~/.claude/plugins/tea -``` +1. Register this repo as a marketplace: -Then add it to your project's `.claude/settings.json`: + ``` + /plugin marketplace add https://git.noodles.cam/claude-skills/tea.git + ``` -```json -{ - "plugins": ["~/.claude/plugins/tea"] -} -``` + Already have a local clone? Point at the directory instead: -Or to your global settings (`~/.claude/settings.json`) to enable it everywhere. + ``` + /plugin marketplace add /path/to/tea + ``` + +2. Install the plugin: + + ``` + /plugin install tea@tea + ``` + +The skills (`/tea:login`, `/tea:use`) and the `tea-guard` hook load immediately. Use `/plugin` to enable, disable, or update it later. + +> The marketplace registration is written to `extraKnownMarketplaces` and the plugin to `enabledPlugins` in your settings automatically — you don't edit those by hand. There is **no** top-level `"plugins"` settings key; if you've added one from older instructions, remove it. ## First use @@ -61,7 +69,9 @@ This prevents silent fallback to the machine's default login (often a personal a ## Project layout ``` -.claude-plugin/plugin.json plugin manifest +.claude-plugin/ + plugin.json plugin manifest + marketplace.json marketplace catalog (makes `/plugin install` work) hooks/ hooks.json registers the PreToolUse hook tea-guard.sh the guard (Python 3, no deps)