Skip to content

Commit 1b41204

Browse files
committed
feat: add plugin.json manifest for community marketplace
1 parent 9d48b62 commit 1b41204

4 files changed

Lines changed: 38 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
to full commit SHAs, checkout credentials are not persisted when unused, non-release
1818
workflows declare read-only token permissions, and release publishing uses the GitHub CLI
1919
instead of a third-party action in the write-token job.
20+
- `skills/b2-cloud-storage/.claude-plugin/plugin.json` plugin manifest, so the skill can be
21+
submitted to the Anthropic community plugin marketplace and pass `claude plugin validate`.
22+
Its `version` is kept in sync by `release.py` and enforced by `check_version.py`.
2023

2124
### Changed
2225

scripts/check_version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- .claude-plugin/marketplace.json metadata.version
1212
- .claude-plugin/marketplace.json plugins[].version (every entry)
1313
- skills/b2-cloud-storage/SKILL.md frontmatter metadata.version
14+
- skills/b2-cloud-storage/.claude-plugin/plugin.json version
1415
1516
Used by .github/workflows/release.yml as the gate before building artifacts,
1617
and by humans before running `git tag` if they want belt-and-suspenders.
@@ -26,6 +27,7 @@
2627
REPO = Path(__file__).resolve().parent.parent
2728
MARKETPLACE = REPO / ".claude-plugin" / "marketplace.json"
2829
SKILL_MD = REPO / "skills" / "b2-cloud-storage" / "SKILL.md"
30+
PLUGIN_JSON = REPO / "skills" / "b2-cloud-storage" / ".claude-plugin" / "plugin.json"
2931

3032
SKILL_VERSION_RE = re.compile(r'^\s*version:\s*"([^"]+)"', re.MULTILINE)
3133

@@ -51,6 +53,9 @@ def collect_versions() -> dict[str, str]:
5153
m = SKILL_VERSION_RE.search(text)
5254
versions["SKILL.md metadata.version"] = m.group(1) if m else "<not found>"
5355

56+
plugin = json.loads(PLUGIN_JSON.read_text())
57+
versions["plugin.json version"] = str(plugin.get("version", "<missing>"))
58+
5459
return versions
5560

5661

scripts/release.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
Updates version in:
1919
- skills/b2-cloud-storage/SKILL.md (frontmatter `metadata.version`)
2020
- .claude-plugin/marketplace.json (`metadata.version` and every `plugins[].version`)
21+
- skills/b2-cloud-storage/.claude-plugin/plugin.json (`version`)
2122
2223
Rotates CHANGELOG.md:
2324
- Moves the body of `## [Unreleased]` into a new `## [X.Y.Z] - YYYY-MM-DD` section.
@@ -42,6 +43,7 @@
4243
REPO = Path(__file__).resolve().parent.parent
4344
SKILL_MD = REPO / "skills" / "b2-cloud-storage" / "SKILL.md"
4445
MARKETPLACE = REPO / ".claude-plugin" / "marketplace.json"
46+
PLUGIN_JSON = REPO / "skills" / "b2-cloud-storage" / ".claude-plugin" / "plugin.json"
4547
CHANGELOG = REPO / "CHANGELOG.md"
4648

4749
SEMVER_RE = re.compile(r"^(\d+)\.(\d+)\.(\d+)$")
@@ -96,6 +98,12 @@ def update_marketplace_json(new_version: str) -> None:
9698
MARKETPLACE.write_text(json.dumps(data, indent=2) + "\n")
9799

98100

101+
def update_plugin_json(new_version: str) -> None:
102+
data = json.loads(PLUGIN_JSON.read_text())
103+
data["version"] = new_version
104+
PLUGIN_JSON.write_text(json.dumps(data, indent=2) + "\n")
105+
106+
99107
def rotate_changelog(new_version: str, previous_version: str) -> bool:
100108
"""Move `## [Unreleased]` body to a new `## [X.Y.Z] - YYYY-MM-DD` section.
101109
@@ -199,10 +207,12 @@ def main() -> None:
199207

200208
update_skill_md(new_version)
201209
update_marketplace_json(new_version)
210+
update_plugin_json(new_version)
202211
print(f" Updated {SKILL_MD.relative_to(REPO)}")
203212
print(f" Updated {MARKETPLACE.relative_to(REPO)}")
213+
print(f" Updated {PLUGIN_JSON.relative_to(REPO)}")
204214

205-
files_to_stage: list[Path] = [SKILL_MD, MARKETPLACE]
215+
files_to_stage: list[Path] = [SKILL_MD, MARKETPLACE, PLUGIN_JSON]
206216
if not args.no_changelog and rotate_changelog(new_version, current):
207217
files_to_stage.append(CHANGELOG)
208218

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "b2-cloud-storage",
3+
"version": "1.2.0",
4+
"description": "Manage Backblaze B2 cloud storage from the terminal: list, audit, cleanup, security review, and lifecycle.",
5+
"author": {
6+
"name": "Backblaze Labs",
7+
"url": "https://github.com/backblaze-labs"
8+
},
9+
"homepage": "https://github.com/backblaze-labs/claude-skill-b2-cloud-storage",
10+
"repository": "https://github.com/backblaze-labs/claude-skill-b2-cloud-storage",
11+
"license": "MIT",
12+
"keywords": [
13+
"backblaze",
14+
"b2",
15+
"cloud-storage",
16+
"object-storage",
17+
"claude-skills"
18+
]
19+
}

0 commit comments

Comments
 (0)