diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8f62fb5..c338168 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -7,8 +7,12 @@ "plugins": [ { "name": "doc-tools", - "source": "./", - "description": "Diataxis and ASD-STE100 documentation skill" + "source": "./skills", + "strict": false, + "skills": ["./documentation"], + "description": "Diataxis and ASD-STE100 documentation skill", + "license": "MIT", + "repository": "https://github.com/OpenRAE/doc-tools" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json deleted file mode 100644 index e68ea2d..0000000 --- a/.claude-plugin/plugin.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "doc-tools", - "description": "Diataxis and ASD-STE100 documentation skill", - "license": "MIT", - "repository": "https://github.com/OpenRAE/doc-tools" -} diff --git a/README.md b/README.md index 7c1f9e6..0608044 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ bash tools/ste-lint.sh docs/how-to-install.md Install the skill in Claude Code: ```text -/plugin install doc-tools --marketplace OpenRAE/doc-tools +/plugin marketplace add OpenRAE/doc-tools#v0.1.1 +/plugin install doc-tools@openrae-doc-tools ``` ## Documentation diff --git a/docs/how-to-install.md b/docs/how-to-install.md index 1ef86f6..21e1eb7 100644 --- a/docs/how-to-install.md +++ b/docs/how-to-install.md @@ -17,7 +17,7 @@ Do not copy the package files into the consumer repository. 4. Download and verify the archive with the recorded values: ```shell - VERSION=0.1.0 + VERSION=0.1.1 SHA256= ARCHIVE="doc-tools-${VERSION}.tar.gz" curl --proto '=https' --fail --silent --show-error --location -o "$ARCHIVE" \ @@ -49,7 +49,7 @@ A checksum mismatch stops the installation and the check. 1. Add the release `DocTools.zip` URL to `Packages` in `.vale.ini`: ```ini - Packages = https://github.com/OpenRAE/doc-tools/releases/download/v0.1.0/DocTools.zip + Packages = https://github.com/OpenRAE/doc-tools/releases/download/v0.1.1/DocTools.zip ``` 2. Add `DocTools` to `BasedOnStyles`. @@ -69,24 +69,32 @@ Two skills with the same name can both show. Add the marketplace at a release tag, then install the plugin: ```text -/plugin marketplace add OpenRAE/doc-tools#v0.1.0 +/plugin marketplace add OpenRAE/doc-tools#v0.1.1 /plugin install doc-tools@openrae-doc-tools ``` -To share the marketplace with a repository team, run this command in the repository. -Then commit the `.claude/settings.json` file that it writes: +To share the plugin with a repository team, run these commands in the repository: ```shell -claude plugin marketplace add OpenRAE/doc-tools#v0.1.0 --scope project +claude plugin marketplace add OpenRAE/doc-tools#v0.1.1 --scope project +claude plugin install doc-tools@openrae-doc-tools --scope project ``` +The first command adds the marketplace to `.claude/settings.json`. +The second command enables the plugin in the same file. +Commit `.claude/settings.json`. +Each team member runs the same two commands in a clone to download the plugin. + +The plugin contains only the `documentation` skill. +It adds no MCP server, hook, agent, or LSP server. + ### Codex Run the script of the preinstalled `skill-installer` skill with the repository, path, and release tag: ```shell python3 "${CODEX_HOME:-$HOME/.codex}/skills/.system/skill-installer/scripts/install-skill-from-github.py" \ - --repo OpenRAE/doc-tools --path skills/documentation --ref v0.1.0 + --repo OpenRAE/doc-tools --path skills/documentation --ref v0.1.1 ``` You can also give the same repository, path, and tag to `$skill-installer` in a Codex session. diff --git a/docs/reference.md b/docs/reference.md index b0dd83d..e8fb0cf 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -9,7 +9,7 @@ | `.ste.yml` | ste-cli configuration. | | `vale/DocTools/` | Vale style rules. The release asset `DocTools.zip` contains this directory. | | `skills/documentation/` | Agent skill and its license notice. | -| `.claude-plugin/` | Claude Code marketplace `openrae-doc-tools` and plugin `doc-tools`. | +| `.claude-plugin/marketplace.json` | Claude Code marketplace `openrae-doc-tools`. Its plugin `doc-tools` uses `skills/` as the plugin root and contains only the `documentation` skill. | | `tests/` | Behavior tests for the checks, the style, and the package layout. | ## `tools/ste-lint.sh` diff --git a/tests/test_package.py b/tests/test_package.py index fd1751e..c133013 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -37,16 +37,19 @@ def test_skill_has_client_frontmatter_and_license() -> None: assert "Tudor Andrei Dumitrascu" in notice -def test_claude_marketplace_lists_the_root_plugin() -> None: +def test_claude_plugin_contains_only_the_skill() -> None: marketplace = json.loads((ROOT / ".claude-plugin/marketplace.json").read_text()) - plugin = json.loads((ROOT / ".claude-plugin/plugin.json").read_text()) assert marketplace["owner"]["name"] [entry] = marketplace["plugins"] - assert entry["name"] == plugin["name"] - assert entry["source"] == "./" + assert entry["name"] == "doc-tools" + # The plugin root must not be the repository root: Claude Code loads the root .mcp.json as a plugin server. + assert entry["source"] == "./skills" + assert entry["strict"] is False + assert entry["skills"] == ["./documentation"] assert "version" not in entry - assert "version" not in plugin - assert (ROOT / "skills" / "documentation" / "SKILL.md").is_file() + assert not (ROOT / ".claude-plugin/plugin.json").exists() + assert sorted(path.name for path in (ROOT / "skills").iterdir()) == ["documentation"] + assert sorted(path.name for path in SKILL.iterdir()) == ["LICENSE", "SKILL.md"] def test_vale_style_rules_are_portable() -> None: